From 9a259772ccf1e9708baecc559323ac5b6229e954 Mon Sep 17 00:00:00 2001 From: Tianjie Xu Date: Thu, 28 Jul 2016 14:15:00 -0700 Subject: Add docs on regeneration background text image Also add a missing string in the recovery_l10n APP. Bug: 30415666 Change-Id: Ice2a9f7cad4ebe332b427bc0c7a9adccb6cf3af3 --- tools/recovery_l10n/README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 tools/recovery_l10n/README.md (limited to 'tools/recovery_l10n/README.md') 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 -- cgit v1.2.3