diff options
author | Tianjie Xu <xunchang@google.com> | 2016-07-28 23:15:00 +0200 |
---|---|---|
committer | Tianjie Xu <xunchang@google.com> | 2016-07-29 01:45:45 +0200 |
commit | 9a259772ccf1e9708baecc559323ac5b6229e954 (patch) | |
tree | 671643099424e1157505c2724e387ff95d44afea /tools | |
parent | Merge "Update background text images under recovery" (diff) | |
download | android_bootable_recovery-9a259772ccf1e9708baecc559323ac5b6229e954.tar android_bootable_recovery-9a259772ccf1e9708baecc559323ac5b6229e954.tar.gz android_bootable_recovery-9a259772ccf1e9708baecc559323ac5b6229e954.tar.bz2 android_bootable_recovery-9a259772ccf1e9708baecc559323ac5b6229e954.tar.lz android_bootable_recovery-9a259772ccf1e9708baecc559323ac5b6229e954.tar.xz android_bootable_recovery-9a259772ccf1e9708baecc559323ac5b6229e954.tar.zst android_bootable_recovery-9a259772ccf1e9708baecc559323ac5b6229e954.zip |
Diffstat (limited to 'tools')
-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 |
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 000000000..bf41ff241 --- /dev/null +++ b/tools/recovery_l10n/README.md @@ -0,0 +1,31 @@ +# Steps to regenerate background text images under res-*dpi/images/ + +1. Build the recovery_l10n app: + + cd bootable/recovery && mma -j32 + +2. Install the app on the device (or emulator) with the intended dpi. + + * For example, we can use Nexus 5 to generate the text images under + res-xxhdpi. + * When using the emulator, make sure the NDK version matches the current + repository. Otherwise, the app may not work properly. + + adb install $PATH_TO_APP + +3. Run the app, select the string to translate and press the 'go' button. + +4. After the app goes through the strings for all locales, pull the output png + file from the device. + + adb root && adb pull /data/data/com.android.recovery_l10n/files/text-out.png + +5. Compress the output file put it under the corresponding directory. + + * "pngcrush -c 0 ..." converts "text-out.png" into a 1-channel image, + which is accepted by Recovery. This also compresses the image file by + ~60%. + * If you're using other png compression tools, make sure the final text + image works by running graphic tests under the recovery mode. + + 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 f6193ab17..48d18daca 100644 --- a/tools/recovery_l10n/res/values/strings.xml +++ b/tools/recovery_l10n/res/values/strings.xml @@ -9,6 +9,7 @@ <item>erasing</item> <item>no_command</item> <item>error</item> + <item>installing_security</item> </string-array> <!-- 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 3f2bebe60..a974fa37a 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 { case 1: mStringId = R.string.recovery_erasing; break; case 2: mStringId = R.string.recovery_no_command; break; case 3: mStringId = R.string.recovery_error; break; + case 4: mStringId = R.string.recovery_installing_security; break; } } @Override public void onNothingSelected(AdapterView parent) { } |