aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorTianjie Xu2016-07-28 16:15:00 -0500
committerTianjie Xu2016-07-28 18:45:45 -0500
commit9a259772ccf1e9708baecc559323ac5b6229e954 (patch)
tree671643099424e1157505c2724e387ff95d44afea /tools
parent286848e7543107609d14cdf7eaf4f49828009393 (diff)
downloadplatform-bootable-recovery-9a259772ccf1e9708baecc559323ac5b6229e954.tar.gz
platform-bootable-recovery-9a259772ccf1e9708baecc559323ac5b6229e954.tar.xz
platform-bootable-recovery-9a259772ccf1e9708baecc559323ac5b6229e954.zip
Add docs on regeneration background text image
Also add a missing string in the recovery_l10n APP. Bug: 30415666 Change-Id: Ice2a9f7cad4ebe332b427bc0c7a9adccb6cf3af3
Diffstat (limited to 'tools')
-rw-r--r--tools/recovery_l10n/README.md31
-rw-r--r--tools/recovery_l10n/res/values/strings.xml1
-rw-r--r--tools/recovery_l10n/src/com/android/recovery_l10n/Main.java1
3 files changed, 33 insertions, 0 deletions
diff --git a/tools/recovery_l10n/README.md b/tools/recovery_l10n/README.md
new file mode 100644
index 00000000..bf41ff24
--- /dev/null
+++ b/tools/recovery_l10n/README.md
@@ -0,0 +1,31 @@
1# Steps to regenerate background text images under res-*dpi/images/
2
31. Build the recovery_l10n app:
4
5 cd bootable/recovery && mma -j32
6
72. Install the app on the device (or emulator) with the intended dpi.
8
9 * For example, we can use Nexus 5 to generate the text images under
10 res-xxhdpi.
11 * When using the emulator, make sure the NDK version matches the current
12 repository. Otherwise, the app may not work properly.
13
14 adb install $PATH_TO_APP
15
163. Run the app, select the string to translate and press the 'go' button.
17
184. After the app goes through the strings for all locales, pull the output png
19 file from the device.
20
21 adb root && adb pull /data/data/com.android.recovery_l10n/files/text-out.png
22
235. Compress the output file put it under the corresponding directory.
24
25 * "pngcrush -c 0 ..." converts "text-out.png" into a 1-channel image,
26 which is accepted by Recovery. This also compresses the image file by
27 ~60%.
28 * If you're using other png compression tools, make sure the final text
29 image works by running graphic tests under the recovery mode.
30
31 pngcrush -c 0 text-out.png $OUTPUT_PNG
diff --git a/tools/recovery_l10n/res/values/strings.xml b/tools/recovery_l10n/res/values/strings.xml
index f6193ab1..48d18dac 100644
--- a/tools/recovery_l10n/res/values/strings.xml
+++ b/tools/recovery_l10n/res/values/strings.xml
@@ -9,6 +9,7 @@
9 <item>erasing</item> 9 <item>erasing</item>
10 <item>no_command</item> 10 <item>no_command</item>
11 <item>error</item> 11 <item>error</item>
12 <item>installing_security</item>
12 </string-array> 13 </string-array>
13 14
14 <!-- Displayed on the screen beneath the animated android while the 15 <!-- Displayed on the screen beneath the animated android while the
diff --git a/tools/recovery_l10n/src/com/android/recovery_l10n/Main.java b/tools/recovery_l10n/src/com/android/recovery_l10n/Main.java
index 3f2bebe6..a974fa37 100644
--- a/tools/recovery_l10n/src/com/android/recovery_l10n/Main.java
+++ b/tools/recovery_l10n/src/com/android/recovery_l10n/Main.java
@@ -139,6 +139,7 @@ public class Main extends Activity {
139 case 1: mStringId = R.string.recovery_erasing; break; 139 case 1: mStringId = R.string.recovery_erasing; break;
140 case 2: mStringId = R.string.recovery_no_command; break; 140 case 2: mStringId = R.string.recovery_no_command; break;
141 case 3: mStringId = R.string.recovery_error; break; 141 case 3: mStringId = R.string.recovery_error; break;
142 case 4: mStringId = R.string.recovery_installing_security; break;
142 } 143 }
143 } 144 }
144 @Override public void onNothingSelected(AdapterView parent) { } 145 @Override public void onNothingSelected(AdapterView parent) { }