aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorTianjie Xu2016-07-28 19:12:42 -0500
committerandroid-build-merger2016-07-28 19:12:42 -0500
commit698f75467a8ffb8665024d1292f729dc1108d144 (patch)
treed7d8df034fb6e479de62e4cd86dbdbe2b2c4d8f9 /tools
parenta26823d96deee9752a7f21ad6bba5e5276f52a00 (diff)
parentb02a58740ec285e715d169c11801dd33a2dc7086 (diff)
downloadplatform-bootable-recovery-698f75467a8ffb8665024d1292f729dc1108d144.tar.gz
platform-bootable-recovery-698f75467a8ffb8665024d1292f729dc1108d144.tar.xz
platform-bootable-recovery-698f75467a8ffb8665024d1292f729dc1108d144.zip
Merge \\"Add docs on regeneration background text image\\" am: 5aa2e104c0
am: b02a58740e Change-Id: Ib15f443946a97eeb6609b0aab9b91bcd3ca91d4c
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 971e038d..d56d0733 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 817a3ad7..ac94bde1 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) { }