Commit Graph

8345 Commits

Author SHA1 Message Date
Alex Buynytskyy
375ea3b457 Don't stop on bump sdk failures.
This is a known issue, fix is in progress.

Bug: 243966946
Test: run locally
Change-Id: Iafcfacc61654838bf0f9ca2321461058ca9afa5b
2023-03-02 21:16:48 +00:00
Kelvin Zhang
0452128f09 Fix sparse image detection
Instead of relying on image build flags, check the actual file to
determine if input is sparse image.

Test: th
Change-Id: I6e58603535039eb3c4e799c61ed9f4783f1888dd
2023-03-02 09:42:52 -08:00
Treehugger Robot
34376c15fe Merge "Update GetTargetFilesZipForCustomImagesUpdates zip2zip call" am: d1f79d4e63 am: be165422c0
Original change: https://android-review.googlesource.com/c/platform/build/+/2462953

Change-Id: I7d96ff797dcb10385db0f5a3f147e70930ad979a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-02 05:06:45 +00:00
Gregory Montoir
10e0dec463 Update GetTargetFilesZipForCustomImagesUpdates zip2zip call
This changes the generation of the target files with oem images to
operate in two passes. 1/ zip2zip is called without any filespec.
2/ oem images are replaced.

This allows to generate the target-files faster (as entries do not
need to be iterated one by one) and removes the need to escape
special file names.

Bug: 269397842
Change-Id: Ic1cf398b90344e01b2f1658079903d45bcc00b46
2023-03-01 14:44:56 +08:00
Treehugger Robot
32420bb8e1 Merge "Reject SPL downgrade OTAs on release-keys devices" am: b9dd9dd417 am: 923d0cc1b8
Original change: https://android-review.googlesource.com/c/platform/build/+/2457448

Change-Id: I7c21457c3ba16b9f9ed3cf173969c1356881f2a3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-25 02:41:03 +00:00
Treehugger Robot
b9dd9dd417 Merge "Reject SPL downgrade OTAs on release-keys devices" 2023-02-24 22:17:01 +00:00
Kelvin Zhang
3d05f68f3a Reject SPL downgrade OTAs on release-keys devices
Test: th
Bug: 270459308
Change-Id: I013324b5b97336366d8e8cbe05e6ade91778b747
2023-02-24 10:50:53 -08:00
Dennis Song
90ceb79e17 Merge "Allow rebuild sepolicy even though the image does not exist." am: 1d35f905fd am: df1cdb8f53
Original change: https://android-review.googlesource.com/c/platform/build/+/2452627

Change-Id: I9acd7ad5945cb0cc07eb50cd7aedbf4a41e4588b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-24 03:50:04 +00:00
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