Commit Graph

9037 Commits

Author SHA1 Message Date
Dennis Song
1d35f905fd Merge "Allow rebuild sepolicy even though the image does not exist." 2023-02-24 02:10:00 +00:00
Alex Buynytskyy
90e10f30b4 Merge "Finalize SDK in CI using local_mode." am: dc7e98b9a1 am: 9cb3477141
Original change: https://android-review.googlesource.com/c/platform/build/+/2448664

Change-Id: I7437db5c33dd34e853275321aaef6ab949b3ba09
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-23 19:45:43 +00:00
Dennis Song
16d6fe099d Allow rebuild sepolicy even though the image does not exist.
The `--rebuild-sepolicy` option should work when the target
files folder `ODM/` or `VENDOR/` exists. We should not
assume that there is always an image to remove.

Bug: 270529723
Test: m otatools; Create merged builds with rebuild_sepolicy.
Change-Id: I93aeea2cd084fdc7f8179732d77a78bb1d144616
2023-02-23 23:37:42 +08:00
Alex Buynytskyy
775ad5fe2a Finalize SDK in CI using local_mode.
Bug: 260755259
Test: run locally
Change-Id: I72aabbd69865e4648ba01230dd2354431ec2e650
2023-02-23 01:42:48 +00:00
Treehugger Robot
a3f8ca7640 Merge "Refresh the latest script versions + preparation for local mode." am: c28c48b439 am: fbe980bf0c
Original change: https://android-review.googlesource.com/c/platform/build/+/2445702

Change-Id: I34224623650ecf00ba8ed24b4154ba0ef46c4290
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-21 22:47:42 +00:00
Alex Buynytskyy
bdcef7bfb8 Refresh the latest script versions + preparation for local mode.
Bug: 260755259
Test: local run
Change-Id: I45d3651bd4b837e1338535f98d7256ca9b47e089
2023-02-21 04:56:37 +00:00
Vincent Donnefort
f74012fd97 Merge "Fix missing dev nodes in init_boot.img ramdisk" am: 65af9993b3 am: 07738c42b2
Original change: https://android-review.googlesource.com/c/platform/build/+/2442241

Change-Id: I09c97d6d099179f7760a7ab17467d08b19710455
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-20 11:36:17 +00:00
Vincent Donnefort
65af9993b3 Merge "Fix missing dev nodes in init_boot.img ramdisk" 2023-02-20 09:24:04 +00:00
Treehugger Robot
208f01470b Merge "Move final script to the new folder." am: a0c591db0f am: ba02dbd041
Original change: https://android-review.googlesource.com/c/platform/build/+/2444139

Change-Id: I60f4fe13aa04828f7af5e7e5c96994ab72f4e92a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-18 03:23:20 +00:00
Alex Buynytskyy
32ce1381ca Move final script to the new folder.
Bug: 264308911
Test: run locally
Change-Id: Ice954b7d5ff6c1831e9899c9028e8fd6555ab050
2023-02-17 12:51:24 -08:00
Wei Li
b5a9336179 Merge "Tool for generating GTS open-sourced report" am: 4e7daf6546 am: 0237cb30f0
Original change: https://android-review.googlesource.com/c/platform/build/+/2441962

Change-Id: I1af36bdaf20abf2fb009d72d5687f58951abe9a3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-17 11:14:02 +00:00
Vincent Donnefort
6e861e9cf8 Fix missing dev nodes in init_boot.img ramdisk
Previously ("Add null and console dev nodes to the Android initramfs")
introduced into init_boot.img the /dev/console and /dev/null nodes.
Sadly, it missed changing the release tools which are also generating
images in their own way.

Bug: 254835242
Change-Id: I4d2893ac24c09cf0d117422cbe2bde66083e7118
2023-02-17 10:52:28 +00:00
Wei Li
4e7daf6546 Merge "Tool for generating GTS open-sourced report" 2023-02-17 09:12:01 +00:00
Treehugger Robot
aa651b93b0 Merge "Use zip2zip to copy zipfiles" am: a59e5b7a29 am: 8c53b320ed
Original change: https://android-review.googlesource.com/c/platform/build/+/2439632

Change-Id: Iec87d556be8d028464c81d377d65241fca254057
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-16 23:55:10 +00:00
Treehugger Robot
a59e5b7a29 Merge "Use zip2zip to copy zipfiles" 2023-02-16 22:18:15 +00:00
Yihan Dong
881461fb90 Tool for generating GTS open-sourced report
The report contains:
1. whether gts-verifier need to be open-sourced
2. gts test modules that need to be open-sourced

Test: m gts
Change-Id: I1ce48f7e612556162d5ce1c76b3168ee7f35f826
Merged-In: I1ce48f7e612556162d5ce1c76b3168ee7f35f826
2023-02-16 21:54:23 +00:00
Treehugger Robot
a0899f4045 Merge "Automate frameworks/libs/modules-utils." am: 98426ec5dc am: e1aeea5c0f
Original change: https://android-review.googlesource.com/c/platform/build/+/2438513

Change-Id: If76985241ef67c1057c1d4c7535527767013fe35
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-16 03:59:51 +00:00
Kelvin Zhang
c8ff84b219 Use zip2zip to copy zipfiles
ZipDelete() works by copying every non-deleted entry to a new zipfile.
Current implementation uses python's zipfile module to perform entry
copying, which is inefficient, as every entry must be decompressed and
then re-compressed. Instead, use zip2zip which avoid re-compression.

Improvement: deleting META/dynamic_partitions_info.txt from
raven-target_files-9465001.zip improved from 500+ seconds to 13 seconds.

Change-Id: I0548255bc29380303314763f6d81e74bf3dbb76e
2023-02-15 16:55:48 -08:00
Alex Buynytskyy
221c723106 Automate frameworks/libs/modules-utils.
Bug: 264308911
Test: run locally
Change-Id: I3ae27708bee4c940051ec766c875b6ab55577e42
2023-02-15 17:00:58 +00:00
Alex Buynytskyy
c5328baa15 Merge "More finalization script fixes." am: aa055f064e am: 7154ed28c8
Original change: https://android-review.googlesource.com/c/platform/build/+/2433578

Change-Id: I05a2dc43e1db00782077727e3d0e60a52231b310
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-14 07:23:17 +00:00
Alex Buynytskyy
0fa58fa21d More finalization script fixes.
+ add an automation for bionic api-levels.h

Bug: 264308911
Test: local runs
Change-Id: I6ee24fce9b6de1b9bc1ddecde7b05c2e58002b9e
2023-02-14 00:14:19 +00:00
Treehugger Robot
236defbab2 Merge "Finalization scripts bugfixes." am: 2857d26608 am: b2f52e6497
Original change: https://android-review.googlesource.com/c/platform/build/+/2431266

Change-Id: Ib3cfcd7ffa2b502a9df0d2fceeff0ed39e46c25a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-13 21:08:15 +00:00
Alex Buynytskyy
1d2833ad2d Finalization scripts bugfixes.
Bug: 264308911
Test: local runs
Change-Id: Ie0812593fc41e1bb5d03e7912c3d526647f32725
2023-02-12 02:12:02 +00:00
TreeHugger Robot
8bdaa29ab1 Merge "Support SHA minSdkVersion in APK in APEX" into tm-dev am: 240c63fba3 am: 73214a06a4 am: 7b9f430cec
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/+/21337794

Change-Id: I9a9f1c7a09d71defc019cbb0ce877b2730ae181e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-11 04:44:58 +00:00
Alex Buynytskyy
afddc07570 Refactor finalization scripts.
Bug: 264308911
Test: run locally
Change-Id: I60fa1e1121fafb617d8508403fae07f0bdf39e66
2023-02-10 02:32:42 +00:00
Paul Duffin
a03f1265fb Support SHA minSdkVersion in APK in APEX
Bug: 266903788
Test: rm -fr out/dist
      UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true UNBUNDLED_BUILD_TARGET_SDK_WITH_API_FINGERPRINT=true TARGET_BUILD_APPS="com.google.android.rkpd" vendor/google/build/mainline_modules_bundles.sh
      # Without this change it fails, with this change it passes at
      # which point run the following.
      mkdir contents
      cd contents
      unzip ../out/dist/dev_keys_signed/com.google.android.rkpd/com.google.android.rkpd.apks
      deapexer extract standalones/standalone-x86.apex apex-contents
      aapt2 dump badging apex-contents/priv-app/rkpdapp.google@*/rkpdapp.google.apk  | grep Version
      # The sdkVersion and targetSdkVersion should both be set to SHA
      # versions.
Change-Id: I9ca54affd30f0a6cf561f1274b991d39e7cf1bce
(cherry picked from commit 730d0c437a)
Merged-In: I9ca54affd30f0a6cf561f1274b991d39e7cf1bce
2023-02-08 17:28:29 +00:00
Sorin Basca
d107351a3a Pin signapk to Java 11
Bug: 267608166
Test: TH
Change-Id: I4fe29ced62f385c0d22e5d3806fd5aa6e852b193
2023-02-03 18:06:46 +00:00
Dennis Shen
0dfb3aea75 Fix signing test failure
BUG: b/266137486
TEST: manual run target file signing pass with change
Change-Id: I4b8127937ba726560a69c79619a7f1a2882c9972
2023-01-31 13:28:09 +00:00
Hongguang Chen
1a7323390b Overwrite prop.default in all ramdisk fragments
default.prop can be linked to prop.default. To rewrite the fingerprints,
the original prop.default should be overwritten.

Bug: 264853953
Test: sign_target_files_apks, check artifacts
Change-Id: I8d22b8391dbfe13e74880ffad0619ef7fc4e20e0
2023-01-29 19:43:04 +00:00
Cole Faust
e03153b2bd Convert auto_gen_test_config.py to python 3
This script is run by soong, but without specifying
the python launcher, so it uses the default "python"
in the path, which is python 2.

Convert the script to use python 3.

Bug: 203436762
Test: Building an internal product that uses this
Change-Id: I4496c03b8669c54d080aa45c446dd1f27d91259e
2023-01-26 17:29:13 -08:00
Kelvin Zhang
e8ce38450f Disable imgdiff for non-AB OTA
imgdiff assumes that libz produces identical output across different
platforms, which is sometimes not the case. This causes incremental OTA
on non-AB targets to fail ocassionally. For stability, disable imgdiff.

Test: th
Bug: 265895599
Change-Id: I92d09a50762ec69a79caa37ed4d6e0db1ec8a47a
2023-01-23 20:43:09 -08:00
Kelvin Zhang
f80e886273 Fix non-AB OTA signing issue
After aosp/2201756 , caller must explicitly pass signing key as a
parameter to FinalizeMetadata . We forgot to update non_ab.py ,
therefore causing non-AB OTAs to be unsigned.

Test: th
Bug: 265895599
Change-Id: Ia54b1105f37b6574742b9b55d715fc9c61c223eb
2023-01-20 10:18:11 -08:00
Baligh Uddin
9f63b29083 Merge "Switch check_targetfiles_vintf to use the correct blkid binary." 2023-01-20 05:07:18 +00:00
Baligh Uddin
66dbfde748 Switch check_targetfiles_vintf to use the correct blkid binary.
BUG: 264426585
Test: TH
Change-Id: Iefe86e78c3e607ac27a5197d45fa832fa281c09d
2023-01-20 00:56:54 +00:00
Ibrahim Kanouche
aef5110fbe Fixed typos and naming for SPDX validation
Test: m compliance_sbom
Change-Id: I39edb73e11afc9050a2481a899b19f8f10eb7e72
2023-01-18 22:49:17 +00:00
Ibrahim Kanouche
cf066f01f3 Merge "Add deps tracking for SBOMs" 2023-01-18 16:11:49 +00:00
Ibrahim Kanouche
649b4d741c Add deps tracking for SBOMs
Test: m compliance_sbom

Bug: 242220547
Change-Id: Ife93e0e1cdc43490818798922d574ae1b1d441d1
2023-01-16 16:44:22 +00:00
Treehugger Robot
b80d9d6c33 Merge "Allow vendors to add custom vbmeta partitions" 2023-01-14 00:23:02 +00:00
Treehugger Robot
1ecedfc353 Merge "Allow otatools to deduce partial partition list from input" 2023-01-13 18:00:34 +00:00
Elliott Hughes
12d8a59513 Merge "zipalign/ziptime: use ftello()/fseeko()." 2023-01-13 14:52:05 +00:00
Kelvin Zhang
b81b4e3621 Allow vendors to add custom vbmeta partitions
Currently we only have vbmeta_system and vbmeta_vendor. Add
BOARD_AVB_VBMETA_CUSTOM_PARTITIONS , which allows OEMs to define
their own vbmeta_*.img partitions. example: aosp/2381823

Bug: 263568805
Change-Id: Id671e2c3aee9ada90256381cce432927df03169b
2023-01-12 17:34:42 -08:00
Elliott Hughes
04434739a2 zipalign/ziptime: use ftello()/fseeko().
Even if we were shipping 64-bit Windows host tools (which we still
aren't), this would still be a bug. Windows is LLP64 instead of LP64,
so the long that ftell()/fseek() uses isn't big enough for a 64-bit off_t.

Test: treehugger
Change-Id: I4e24afe811ff9b7d5696887cc5ee92e54e4a3b76
2023-01-13 00:41:38 +00:00
Kelvin Zhang
30669e6c29 Ovewrite build props in all ramdisk fragments
Under some build configuration, there could be build prop stored under
path VENDOR_BOOT/RAMDISK_FRAGMENTS/recovery/RAMDISK/default.prop .
When signing, we must overwrite all build props, or device would display
incorrect build fingerprint.

Bug: 264853953
Change-Id: Id3b176b4ce4efa348ecfb3c9848f72273c5ccca8
2023-01-10 21:09:14 -08:00
Chih-hung Hsieh
380635abec Merge "Fix uninitialized value warnings." 2023-01-10 18:46:09 +00:00
Chih-hung Hsieh
951f8c3130 Merge "Make DeprecatedOrUnsafeBufferHandling not high severity" 2023-01-10 02:15:35 +00:00
Chih-Hung Hsieh
fed64e390f Fix uninitialized value warnings.
Bug: 263274255
Test: presubmit; make tidy-build-make_subset
Change-Id: I33c8b0b006732e4351a15774b50036d10ffd26b5
2023-01-10 00:52:02 +00:00
Chih-Hung Hsieh
1a1f90e49a Make DeprecatedOrUnsafeBufferHandling not high severity
This tidy check has been disabled by default globally,
in build/soong/cc/config/tidy.go.
Local projects can enable it to find/fix such issues,
but if not fixed, it should not be treated as a
high severity one and not to alarm daily builds.

Bug: 227361697
Test: warn.py --url=http://cs/android --separator='?l=' build.log > warnings.html
Test: warn.py --gencsv build.log > warnings.csv
Change-Id: Ifa65a788ddc6a67ed3250d5bed737c6e3b153617
2023-01-09 14:19:11 -08:00
Kelvin Zhang
9f0379bd60 Fix VB 1.0 failure due to openssl output format change
Openssl changed output format, the 'keyid:' prefix is removed, hence old
regex is unable to extract key id.

Bug: 262902909
Change-Id: Iea5b6fffed7c27855d87e35292f07a56686e4197
Merged-In: I446a0b16e482c43542a1c0e41b24e80eb9fbc8e6
Merged-In: Iea5b6fffed7c27855d87e35292f07a56686e4197
(cherry picked from commit b7d70a2cb1)
2023-01-05 12:02:13 +00:00
Kelvin Zhang
a10528c7a8 Allow otatools to deduce partial partition list from input
Different devices/builds might have different constraints on what
partitions should be updated together in a partial OTA. Add a convenient
feature to auto detect.

Test: generate ota with --partial , make sure output OTA contains only 4
partitions

Change-Id: Id79e4bc4c5fb9d1225cb2aa7c1823afccc0b61f2
2023-01-03 16:04:49 -08:00
Bob Badour
f9d23a9f51 Fix concurrency bug in bottom-up resolution walk.
Concurrency is hard, and now that we no longer track origin it doesn't
improve performance in any meaningful way.

Bug: 261787132

Test: m droid dist compliance_dumpgraph compliance_dumpresolutions \
        compliance_sbom compliance_listshare compliance_rtrace \
        compliance_checkshare xmlnotice textnotice htmlnotice \
        compliancenotice_shippedlibs compliancenotice_bom

Test: m compliance_checkshare cts && \
        out/host/linux-x86/bin/compliance_checkshare out/host/linux-x86/gen/META/lic_intermediates/out/host/linux-x86/cts/android-cts.zip.meta_lic

Test: similar command as above for gts on internal

Test: m compliance_checksare droid dist && \
        out/host/linux-x86/bin/compliance_checkshare out/target/product/sunfish/gen/META/lic_intermediates/out/target/product/sunfish/obj/PACKAGING/systemimage_intermediates/system.img.meta_lic

Change-Id: I57a75927bf879c3ce6603049d8d583211dc0ce29
2023-01-04 00:02:02 +00:00