diff options
author | Tianjie Xu | 2016-07-28 19:27:34 -0500 |
---|---|---|
committer | android-build-merger | 2016-07-28 19:27:34 -0500 |
commit | f136e71f7aef5ced324c6534f395c91b35f1af12 (patch) | |
tree | a8cab1ad83339605a63bed24cfe279c82895bddb | |
parent | 529a36907217fe92d7fac917cccd83d54c0d847c (diff) | |
parent | 0df6011d0f1a9b34158912f6b44eb12d4c4a782e (diff) | |
download | platform-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
-rw-r--r-- | minui/minui.h | 4 | ||||
-rw-r--r-- | tools/recovery_l10n/README.md | 31 | ||||
-rw-r--r-- | tools/recovery_l10n/res/values/strings.xml | 1 | ||||
-rw-r--r-- | tools/recovery_l10n/src/com/android/recovery_l10n/Main.java | 1 |
4 files changed, 35 insertions, 2 deletions
diff --git a/minui/minui.h b/minui/minui.h index cddfe77f..5362d3fe 100644 --- a/minui/minui.h +++ b/minui/minui.h | |||
@@ -113,8 +113,8 @@ int res_create_alpha_surface(const char* name, GRSurface** pSurface); | |||
113 | // given locale. The image is expected to be a composite of multiple | 113 | // given locale. The image is expected to be a composite of multiple |
114 | // translations of the same text, with special added rows that encode | 114 | // translations of the same text, with special added rows that encode |
115 | // the subimages' size and intended locale in the pixel data. See | 115 | // the subimages' size and intended locale in the pixel data. See |
116 | // development/tools/recovery_l10n for an app that will generate these | 116 | // bootable/recovery/tools/recovery_l10n for an app that will generate |
117 | // specialized images from Android resources. | 117 | // these specialized images from Android resources. |
118 | int res_create_localized_alpha_surface(const char* name, const char* locale, | 118 | int res_create_localized_alpha_surface(const char* name, const char* locale, |
119 | GRSurface** pSurface); | 119 | GRSurface** pSurface); |
120 | 120 | ||
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 | |||
3 | 1. Build the recovery_l10n app: | ||
4 | |||
5 | cd bootable/recovery && mma -j32 | ||
6 | |||
7 | 2. 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 | |||
16 | 3. Run the app, select the string to translate and press the 'go' button. | ||
17 | |||
18 | 4. 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 | |||
23 | 5. 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) { } |