summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTianjie <xunchang@google.com>2020-12-21 04:46:11 +0100
committerTianjie <xunchang@google.com>2020-12-21 05:00:30 +0100
commit6450acf0322b4288b1935a2dfc0c83fd0c3b3c56 (patch)
tree49409231437647cacced72d3c573b9fff0b7ec7c
parentMerge "Do not call exit() immediately after serving sideload" (diff)
downloadandroid_bootable_recovery-6450acf0322b4288b1935a2dfc0c83fd0c3b3c56.tar
android_bootable_recovery-6450acf0322b4288b1935a2dfc0c83fd0c3b3c56.tar.gz
android_bootable_recovery-6450acf0322b4288b1935a2dfc0c83fd0c3b3c56.tar.bz2
android_bootable_recovery-6450acf0322b4288b1935a2dfc0c83fd0c3b3c56.tar.lz
android_bootable_recovery-6450acf0322b4288b1935a2dfc0c83fd0c3b3c56.tar.xz
android_bootable_recovery-6450acf0322b4288b1935a2dfc0c83fd0c3b3c56.tar.zst
android_bootable_recovery-6450acf0322b4288b1935a2dfc0c83fd0c3b3c56.zip
-rw-r--r--README.md14
-rw-r--r--tools/image_generator/README.md10
2 files changed, 24 insertions, 0 deletions
diff --git a/README.md b/README.md
index bd1cf7dea..5ab19d14c 100644
--- a/README.md
+++ b/README.md
@@ -143,3 +143,17 @@ Note that this mechanism applies to both of normal boot and recovery modes.
Both of the two conditions need to be satisfied. Although `ro.adb.secure` is a runtime property, its
value is set at build time (written into `/prop.default`). It defaults to `1` on `-user` builds, and
`0` for other build variants. The value is overridable via `PRODUCT_DEFAULT_PROPERTY_OVERRIDES`.
+
+Localization of the background texts
+------------------------------------
+
+The recovery image supports localization of several background texts, e.g. installing, error,
+factory reset warnings, etc. For devices using `xxhdpi` and `xxxhdpi`, the build system generates
+these localization images dynamically since android-10 when building the recovery image. While
+the static images under res-*dpi/images/ is used for other display resolutions and as a
+backup.
+
+Check the invocation of the image_generator tool in the [makefile]. And the detailed usage of the
+image_generator is documented [here](./tools/image_generator/README.md).
+
+[makefile]: https://android.googlesource.com/platform/build/+/refs/heads/master/core/Makefile#1800
diff --git a/tools/image_generator/README.md b/tools/image_generator/README.md
index 5d70354e4..1230ad510 100644
--- a/tools/image_generator/README.md
+++ b/tools/image_generator/README.md
@@ -19,3 +19,13 @@ emulators with different dpi.
4. `resourceDirectory`: The resource directory that contains all the translated
strings in xml format, e.g. bootable/recovery/tools/recovery_l10n/res/
5. `outputFilename`: Path to the generated image.
+
+# Locales
+Supported locales and background texts are located in
+[tools/recovery_l10n/res/](../recovery_l10n/res/values). For each background text, the tool renders
+a localized image for every supported locale.
+
+Each individual localized image contains an encoded locale header string, and the rendered
+background text. The locale header string is generated by `Locale.forLanguageTag`. And sample
+result include `en-US`, `zh-CN`, etc. These individual images are then concatenated together to
+form the final resource image that locates in res/images, e.g. `install_text.png`