a78b2d2256
Locale texts are missing in the recovery log due to an extra empty locale chunk in the png file. Fix the bug in the app and regenerate all the background texts and compress the file with pngcrush + zopflipng. Bug: 34054052 Test: Locale texts logged successfully on angler Change-Id: I89f823a53c1eb69756183e8e11113216d093304f |
||
---|---|---|
.. | ||
res | ||
src/com/android/recovery_l10n | ||
Android.mk | ||
AndroidManifest.xml | ||
README.md |
Steps to regenerate background text images under res-*dpi/images/
-
Build the recovery_l10n app:
cd bootable/recovery && mma -j32
-
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
-
Run the app, select the string to translate and press the 'go' button.
-
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
-
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%.
- zopflipng could further compress the png files by ~10%, more details in https://github.com/google/zopfli/blob/master/README.zopflipng
- 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