aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorTianjie Xu2016-07-28 19:27:34 -0500
committerandroid-build-merger2016-07-28 19:27:34 -0500
commitf136e71f7aef5ced324c6534f395c91b35f1af12 (patch)
treea8cab1ad83339605a63bed24cfe279c82895bddb /tools
parent529a36907217fe92d7fac917cccd83d54c0d847c (diff)
parent0df6011d0f1a9b34158912f6b44eb12d4c4a782e (diff)
downloadplatform-bootable-recovery-f136e71f7aef5ced324c6534f395c91b35f1af12.tar.gz
platform-bootable-recovery-f136e71f7aef5ced324c6534f395c91b35f1af12.tar.xz
platform-bootable-recovery-f136e71f7aef5ced324c6534f395c91b35f1af12.zip
Merge \\\\"Add docs on regeneration background text image\\\\" am: 5aa2e104c0 am: b02a58740e am: 698f75467a
am: 0df6011d0f Change-Id: I9bf3d8a5357811700e7e09aec146eaf1969f6eb9
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) { }