diff options
Diffstat (limited to 'tools/recovery_l10n/README.md')
-rw-r--r-- | tools/recovery_l10n/README.md | 31 |
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 00000000..bf41ff24 --- /dev/null +++ b/tools/recovery_l10n/README.md | |||
@@ -0,0 +1,31 @@ | |||
1 | # Steps to regenerate background text images under res-*dpi/images/ | ||
2 | |||
3 | 1. Build the recovery_l10n app: | ||
4 | |||
5 | cd bootable/recovery && mma -j32 | ||
6 | |||
7 | 2. Install the app on the device (or emulator) with the intended dpi. | ||
8 | |||
9 | * For example, we can use Nexus 5 to generate the text images under | ||
10 | res-xxhdpi. | ||
11 | * When using the emulator, make sure the NDK version matches the current | ||
12 | repository. Otherwise, the app may not work properly. | ||
13 | |||
14 | adb install $PATH_TO_APP | ||
15 | |||
16 | 3. Run the app, select the string to translate and press the 'go' button. | ||
17 | |||
18 | 4. After the app goes through the strings for all locales, pull the output png | ||
19 | file from the device. | ||
20 | |||
21 | adb root && adb pull /data/data/com.android.recovery_l10n/files/text-out.png | ||
22 | |||
23 | 5. Compress the output file put it under the corresponding directory. | ||
24 | |||
25 | * "pngcrush -c 0 ..." converts "text-out.png" into a 1-channel image, | ||
26 | which is accepted by Recovery. This also compresses the image file by | ||
27 | ~60%. | ||
28 | * If you're using other png compression tools, make sure the final text | ||
29 | image works by running graphic tests under the recovery mode. | ||
30 | |||
31 | pngcrush -c 0 text-out.png $OUTPUT_PNG | ||