summaryrefslogtreecommitdiffstats
path: root/tools/recovery_l10n/README.md
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2016-07-29 02:09:45 +0200
committerandroid-build-merger <android-build-merger@google.com>2016-07-29 02:09:45 +0200
commitb02a58740ec285e715d169c11801dd33a2dc7086 (patch)
tree98ec211105a9ecf27d870b51ec2e14c83d180bfb /tools/recovery_l10n/README.md
parentMerge \"Regenerate the background text with pngcrush\" (diff)
parentMerge "Add docs on regeneration background text image" (diff)
downloadandroid_bootable_recovery-b02a58740ec285e715d169c11801dd33a2dc7086.tar
android_bootable_recovery-b02a58740ec285e715d169c11801dd33a2dc7086.tar.gz
android_bootable_recovery-b02a58740ec285e715d169c11801dd33a2dc7086.tar.bz2
android_bootable_recovery-b02a58740ec285e715d169c11801dd33a2dc7086.tar.lz
android_bootable_recovery-b02a58740ec285e715d169c11801dd33a2dc7086.tar.xz
android_bootable_recovery-b02a58740ec285e715d169c11801dd33a2dc7086.tar.zst
android_bootable_recovery-b02a58740ec285e715d169c11801dd33a2dc7086.zip
Diffstat (limited to 'tools/recovery_l10n/README.md')
-rw-r--r--tools/recovery_l10n/README.md31
1 files changed, 31 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