platform_bootable_recovery/tools/recovery_l10n
Tianjie Xu 698f75467a Merge \\"Add docs on regeneration background text image\\" am: 5aa2e104c0
am: b02a58740e

Change-Id: Ib15f443946a97eeb6609b0aab9b91bcd3ca91d4c
2016-07-29 00:12:42 +00:00
..
res Merge \\"Add docs on regeneration background text image\\" am: 5aa2e104c0 2016-07-29 00:12:42 +00:00
src/com/android/recovery_l10n Merge \"Add docs on regeneration background text image\" 2016-07-29 00:09:45 +00:00
Android.mk Move recovery_l10n here from development/tools. 2016-03-26 08:45:51 -07:00
AndroidManifest.xml Move recovery_l10n here from development/tools. 2016-03-26 08:45:51 -07:00
README.md Add docs on regeneration background text image 2016-07-28 23:45:45 +00:00

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