For VAB launched device, factory OTA will write system_other
partition to the super image. So we want to check that
sum(dynamic partitions) + system_other + overhead <= super at
build time.
Since we don't know the overhead at build time, we might instead
check sum(all partitions) < super.
Bug: 185809374
Test: m check-all-partition-sizes, unittests
Change-Id: Ia7ba5999d23924a1927e9a9463856a4d0ea90c20
Merged-In: Ia7ba5999d23924a1927e9a9463856a4d0ea90c20
(cherry-picked from commit 294ec7d9e5)
Change-Id: I479d1b399a1639b595ae5d7f1481c771a3439e51
Test: th
Test: Manual OTA test on bramble, pause/resume multiple times
Test: verity enabled, VABC enabled OTA
Test: verity enabled, VABC disabled OTA
Test: verity disabled, VABC enabled OTA
Test: verity disabled, VABC disabled OTA
Change-Id: Ia236984b158761f84f54ab7a6d3d49491c249546
If the build prop ro.build.id isn't set at build time, init will
set it at runtime. The logic is appending the vbmeta digest to
the ro.build.legacy.id.
Make the same change in ota scripts, so the correct build fingerprint
will be saved in the ota metadata.
Bug: 186786987
Test: generate an OTA, check the metadata
Change-Id: I278f59c41c1f98d4cbea749e5d9e4eaf7a6b9565
Commit I8bd8ad3acf324931b47d45fd30bc590206b1927e adds a default
value of "gki_signing_signature_args" in the misc_info.txt for
release signing to work. However, it's better to replace the default
value entirely (e.g., --prop foo:bar) as there is no need to include
them in the final release-signed image.
Bug: 178559811
Bug: 177862434
Test: atest releasetools_test
Test: atest releasetools_py3_test
Change-Id: I060b5a7076ff3e5d883abeb7d72f3db887c9fd69
Background in http://go/compatible-build-fingerprint. If we want
to append unique vbmeta digest to build id, we cannot setup the
prop value at build time. Instead, set the old value as
ro.build.legacy.id; and let init set ro.build.id at runtime.
Bug: 186786987
Test: build a target file with the flag on
Change-Id: Ie139725bb7e5c65bd3f28f43b9975ba48ee10354
Calculate the vbmeta digest if the device builds vbmeta image. The
digest will used later to determine the build fingerprint in new
format.
One sample usage is the ota package generation, where we put the
build fingerprint in the ota metadata. But we don't have the runtime
vbmeta digest provided the bootloader.
Bug: 186786987
Test: unit tests
Change-Id: If572e2b973e295a6c95a9e23a65bb20b3afbf1b0
Downgrade VABC OTA causes users to wait in recovery for merge to
complete, disable by default.
Test: th
Test: generate downgrade OTA, make sure VABC disabled
Test: generate upgrade OTA with --wipe_user_data, make sure VABC
disabled
Test: generate upgrade OTA, make sure VABC is used
Test: generate downgrade OTA with --vabc_downgrade, make sure VABC is
enabled
Bug: 187215486
Change-Id: Ib7e6165252d47f1ecaac4fc2329b580274c8d70e
* add .pylintrc to use 2 space indentation
* rename single-letter local variables
Test: ./warn.py build.log > warnings.html
Change-Id: I2ca56a6cb130a9d6c73328c5592ad7cde8a974ab
If source supports VABC, delta_generator/update_engine will attempt to
use VABC. This dangerous, as the target build won't have snapuserd to
serve I/O request when device boots. Therefore, disable VABC if source
build doesn't supports it.
Test: downgrade from VABC enabled build to a build w/o VABC
Change-Id: Ie8353e00f65354c2242ee5255b6652c6b62483a4
If dynamic partitioning is enabled and the partition size is not set,
we will get a KeyError before image_size or partition_size is calculated
when we try to catch exception in BuildImageMkfs.
Bug: 186704243
Test: build_image.py can correctly throw exception
Change-Id: I3d8c143ad5603d07fe94afb8bb911ead244f0bf7
Signed-off-by: Huang Jianan <huangjianan@oppo.com>
* Add missing function doc strings.
Suppress this warning on trivial functions in *_warn_patterns.py.
* Remove unused g-importing-memeber, g-complex-comprehension.
* Suppress pylint warning on unrecognized g-* options.
* Suppress too-few-public-methods warnings on simple classes.
* Suppress too-many-arguments and missing-function-docstring in
html_writer.py, which will be refactored later.
* Fix bad naming, long lines and line breaks, and bad quotes.
Test: compare output for build.log
Change-Id: Icdb34f014a10ec1e642c2cfe8003fc3ae245b507
Use common function LoadDictionaryFromFile(), instead
of LoadDictionaryFromLines(). Makes these codes conciser.
Change-Id: Ibb6f19744246b3415bcd639bc59dbb2aede725d9
Signed-off-by: jiajia tang <tangjiajia@xiaomi.com>
We already added support on device to write verity. Flipping a flag in
ota generation tools to enable verity.
Test: th && running OTA repeatedly on bramble
Change-Id: Id1639f644eb8c23f97e171264702a7872f41411a
This patch is intended to make build log is more
accurate if input_file is not exists, then check if
it is a zipfile.
Change-Id: I30da0141ea44fc3ce0947f868a86a15a054a4346
Signed-off-by: jiajia tang <tangjiajia@xiaomi.com>
Uses apex_utils.GetApexInfoFromTargetFiles to find and parse APEX files
in the target files partition dirs. Raises an error on failure to parse
or duplicate package names.
Bug: 177225446
Test: releasetools_test
Test: Create a merged build that provides the VNDK APEX on both vendor
and system. Observe failure.
Change-Id: I1356e263b7b32d6063129e079f3ba7ab4ff132a7
As we don't fix the grf window, we may not calculate the grf
expiration date and the required api level.
The verification of this will be covered by the tests at run time.
Bug: 176950752
Test: atest --host post_process_props_unittest
Change-Id: I1205f0d9a9da5bc508a49acbcbb7da581800bf45
Some OEMs, namely OnePlus don't use AOSP compliant build description.
Making sure that the last piece ends with -keys is more than enough.
Change-Id: Iefa3c408a3fdda0b63db257befb8ba2d36793293
RamdiskFormat class is introduced by commit : f3f842b676
But it seems _MakeRamdisk() related codes are also needed, then
both of the code style are same.
This patch takes below 2 changes:
1) adds new commom function _GetRamdiskFormat()
2) unfiy the code logic of _MakeRamdisk() and its related code logic.
Change-Id: Ibd4932a6050fbac15fcd741c70dd7854c12e887d
Signed-off-by: jiajia tang <tangjiajia@xiaomi.com>
GRF devices must define the API level of which the SoC is first
shipped by setting BOARD_SHIPPING_API_LEVEL. As this is a permanent
value, vendors may not change this value even if they implement new
features under the GRF policy.
BOARD_API_LEVEL can be optionally defined in this case to manually
set the api level of the vendor implementation.
The current api level will be set to `ro.board.api_level` property.
Bug: 176950752
Test: atest --host post_process_props_unittest
Change-Id: Ib126c1a622ded9848650f3f60c0f15005867272d
The current inode usage estimate applies a factor (1.04x) to account for
differences between the directory and file count and what mkfs.ext4
produces. Bump this to 1.06x to allow more leniency.
This increases bramble partition sizes by 32KB total.
Bug: 182365132
Test: manual test
Change-Id: I9ade82cb89422e31ae8c5df9fff31157e88278c5