Home | History | Annotate | only in /bootable/recovery/tools/recovery_l10n
Up to higher level directory
NameDateSize
Android.mk06-Dec-2017254
AndroidManifest.xml06-Dec-2017515
README.md06-Dec-20171.5K
res/06-Dec-2017
src/06-Dec-2017

README.md

      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     *   We can set up the maximum width of the final png image in res/layout/main.xml
     12         Currently, the image width is 1200px for xxxhdpi, 900px for xxhdpi and
     13         480px for xhdpi/hdpi/mdpi.
     14     *   When using the emulator, make sure the NDK version matches the current
     15         repository. Otherwise, the app may not work properly.
     16 
     17     adb install $PATH_TO_APP
     18 
     19 3.  Run the app, select the string to translate and press the 'go' button.
     20 
     21 4.  After the app goes through the strings for all locales, pull the output png
     22     file from the device.
     23 
     24     adb root && adb pull /data/data/com.android.recovery_l10n/files/text-out.png
     25 
     26 5.  Compress the output file put it under the corresponding directory.
     27 
     28     *   "pngcrush -c 0 ..." converts "text-out.png" into a 1-channel image,
     29         which is accepted by Recovery. This also compresses the image file by
     30         ~60%.
     31     *   zopflipng could further compress the png files by ~10%, more details
     32         in https://github.com/google/zopfli/blob/master/README.zopflipng
     33     *   If you're using other png compression tools, make sure the final text
     34         image works by running graphic tests under the recovery mode.
     35 
     36     pngcrush -c 0 text-out.png $OUTPUT_PNG
     37