As we plan to show localized rescue party dialogs under recovery mode
with pre-generated images, it becomes necessary to show the menu headers
and items with images.
This cl converts the menu class to a interface and derived TextMenu &
GraphicMenu classes. And the GraphicMenu uses GRSurfaces* as the menu header
and a list of GRSurfaces* as menu items.
Moreover, factor out the Draw* functions in the ScreenUI into a separate
DrawInterface. Therefore, the Menu class can access these draw functions and
use them to implement the DrawHeaders & DrawItems neatly.
Bug: 74397117
Test: unittests pass, boot into recovery and check menu
Change-Id: I95cee30f3e5eb666eb6fbcdfc873a7260fc177c1
This program uses java.awt.Graphics2D to generate the background text
files used under recovery mode. And thus we don't need to do the manual
work by running emulators with different dpi.
The program takes the following parameters:
1. imageWidth: The number of pixels per line; and the text strings will be
wrapped accordingly.
2. textName: The description of the text string, e.g. "recovery_erasing",
"recovery_installing_security"
3. fontDirectory: The directory that contains all the support .ttf | .ttc
files, e.g. $OUT/system/fonts/
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.
Bug: 74397117
Test: checks the generated png files
Change-Id: Ia5506a0a4f5da1ebfd7090345eb246f44b265075
We used to convert a pem certificate file to some intermediate plain
text format; and parse that format under recovery mode. This is
uncessary since the x509.pem can be directly parsed with openssl
functions.
Add the function to load the public key from one x509.pem file and
corresponding unit tests. And we will add more cls to extract the pem
files from otacert.zip later.
Bug: 116655889
Test: verify package with 5 supported certficate versions
Change-Id: Ibc6c696c534567f005db75143cc4ef8d4bdea6a0
If there is a "/system" in the fstab, then can not be a
system as root image.
Test: compile
Bug: 109821005
Change-Id: I2c852dcbdcf6de437d39039937799feeef949516
* changes:
[automerger skipped] DO NOT MERGE: Initialize the ZipArchive to zero before parsing skipped: 2050579b79
DO NOT MERGE: Initialize the ZipArchive to zero before parsing
* changes:
[automerger skipped] DO NOT MERGE: Initialize the ZipArchive to zero before parsing skipped: f39f139103 skipped: cce521e439 skipped: 4a53559e98
[automerger skipped] DO NOT MERGE: Initialize the ZipArchive to zero before parsing skipped: f39f139103 skipped: cce521e439
[automerger skipped] DO NOT MERGE: Initialize the ZipArchive to zero before parsing skipped: f39f139103
DO NOT MERGE: Initialize the ZipArchive to zero before parsing
The update_verifier now compares the fingerprint of a partition before
performing the blocks read. If the fingerprint of the current system property
mismatches the one embedded in the care_map, verification of this partition
will be skipped. This is useful for the possible system only updates in the
future.
Bug: 114778109
Test: unit tests pass
Change-Id: Iea309148a05109b5810dfb533d94260d77ab8540
The fields of the ZipArchive on the stack are not initialized before we
call libminzip to parse the zip file. As a result, some random memory
location is freed unintentionally when we close the ZipArchive upon
parsing failures.
Bug: 35385357
Test: recompile and run the poc with asan.
Change-Id: I7e7f8ab4816c84a158af7389e1a889f8fc65f079
dependency."
This reverts commit 26b86bb1dc.
Reason for revert: Dependencies which broke tests due to exclusion from
LOCAL_JNI_SHARED_LIBS have been added.
Change-Id: I364acfe8bd0526fb26f69cc29fb3545fc3e79764
This reverts commit a71c10b464.
Reason for revert: This breaks framework tests and blocks presubmit
Change-Id: Iae94878889c1e71e2da5336fe75af88dfd3bfcfa
At present, multiple partitions such as vendor have been added,
which reduces the coupling between mobile phone manufacturers
and Android systems. However, it may increase the generated
package size substantially (e.g. from ~200MB to ~800MB).
Causes the package size to exceed the int limit (2147483647 bytes).
Change the int length parameters to long.
Bug: http://b/112003354
Test: adb sideload ota.zip (ota.zip bigger than 2147483647 bytes)
Change-Id: Ifb656431f7b961ac0e91754107578dc8b89ff14e
Signed-off-by: katao <katao@xiaomi.com>
Enable the encoding and parsing of the property_id & partition
fingerprint by default; and add a flag "--no_fingerprint" to disable
the fingerprint generation/parsing to convert the legacy care_map.txt
Bug: 114778109
Test: run unittests in add_img_to_target_files
Change-Id: Id4216d5954e78c3a2d8e8bf19342109daf66a528