Commit graph

8005 commits

Author SHA1 Message Date
Jihoon Kang
108379310d Create a python script to list files given a directory as an input
The script will be used in generating a file that lists generated stub
files from metalava, which will be passed to soong_zip to extract
selected stub files when generating stubs from java_api_library modules
with incomplete api surface text files.

Test: build java_api_library modules in aosp/2487335
Change-Id: I36b830f14c714315f81e3fd8608d84c29f673f83
2023-04-03 17:52:41 +00:00
Alex Buynytskyy
5dfdbe12bc Move adb keys creation to CI-only step.
It's easily automatable build step, but it needs to be done way before
REL to allow enough time for manual key propagation.
As such, moving it to local step.

Bug: 243966946
Test: manual
Change-Id: I979e8500c3c0b768af30dff93c9b73ab998a0151
2023-03-31 22:20:29 +00:00
Bob Badour
00670e0c03 Merge "Revert "Updated SBOM generator module to generate JSON spdx utility bill of"" 2023-03-31 15:56:17 +00:00
Bob Badour
928ee9d9f7 Revert "Updated SBOM generator module to generate JSON spdx utility bill of"
This reverts commit e97adc5db9.

Reason for revert: Roll back until the kernel manifests are updated with the spdx-tools library.

Change-Id: Ib2327862acd928ebcea0f328daecc162b46d2c78
2023-03-31 14:51:36 +00:00
Treehugger Robot
09df4c6562 Merge "Updated SBOM generator module to generate JSON spdx utility bill of material" 2023-03-31 07:05:53 +00:00
Ibrahim Kanouche
e97adc5db9 Updated SBOM generator module to generate JSON spdx utility bill of
material

Test: m compliance_sbom

Bug: 265472710
Change-Id: Iad9ddbd2abf17ff0b034f1410c55dd99051f7127
2023-03-30 23:34:32 +00:00
Treehugger Robot
7a40e97d74 Merge "Rename rbcrun/cmd to make go install work properly" 2023-03-16 20:26:22 +00:00
Dan Willemsen
ec5e3b8d28 Rename rbcrun/cmd to make go install work properly
The standard go tooling assumes that a package's binary name should be
the name of the containing folder. Before this change, `go install` or
`go build` (without `-o`) names this binary `cmd`.

Also run `go mod tidy` while we're here, so the tooling doesn't try to
download github.com/nbutton23/zxcvbn-go, which we don't have a local
copy of.

Test: treehugger
Change-Id: I8f79724e928720caf961cdad128655ef31c3e9b2
2023-03-15 20:06:59 -04:00
Wei Li
155377c1d6 Clean up the strings and use f-strings instead of string.format().
Bug: 272356600
Test: m sbom
Change-Id: Ifc399bacf25850b896ecb003703b7637a98c8907
2023-03-15 14:07:41 -07:00
Treehugger Robot
4fac9d776c Merge "Add an automated tools for generating brick OTA package" 2023-03-15 09:24:40 +00:00
Wei Li
15187b6f1a Merge "Generate SBOM of the target product in file sbom.spdx.json in product out directory." 2023-03-15 05:20:44 +00:00
Kelvin Zhang
f91d74bd52 Add an automated tools for generating brick OTA package
In the past, we have been generating brick OTA packages manually.
Automate this process.

Bug: 273561331
Test: create_brick_ota --product oriole brick.zip and apply the package
Change-Id: I7f4cf3cacaedd9d376b4cc07cbb388930bca643b
2023-03-14 16:58:36 -07:00
Wei Li
499333616c Generate SBOM of the target product in file sbom.spdx.json in product out directory.
Original aosp/2374663 was reverted, so this change cnotains the implementation but disabled by default and SBOM will not be built by default with "m dist".

The feature will be enabled later in small CLs after running tests successfully in forrest.

Test: m sbom
Test: m dist
Test: on aosp, lunch aosp_bluejay-userdebug && m dist
Bug: 266726655
Change-Id: I926d0f97f3a0330ef61d059f12ea660005d370e6
2023-03-14 15:14:06 -07:00
Kevin Han
afb2495f6f Merge "Revert "Generate SBOM of the target product in file sbom.spdx in..."" 2023-03-13 21:03:22 +00:00
Kevin Han
161d711d4d Revert "Generate SBOM of the target product in file sbom.spdx in..."
Revert submission 2481062-sbom

Reason for revert: b/273332655

Reverted changes: /q/submissionid:2481062-sbom

Change-Id: Ie8a73d8dc50592204acd489482e0e9d96ffbd5df
2023-03-13 20:57:37 +00:00
Wei Li
27d32b0957 Merge "Generate SBOM of the target product in file sbom.spdx in product out directory." 2023-03-13 17:43:59 +00:00
Wei Li
88ac7ae7df Generate SBOM of the target product in file sbom.spdx in product out directory.
Original aosp/2374663 was reverted, try to submit it again with some fixes in this.

Test: m sbom
Test: m dist
Test: on aosp, lunch aosp_bluejay-userdebug && m dist
Bug: 266726655
Change-Id: Icf305770473f0c448a1ad721cbe7addf737115e4
2023-03-13 17:38:04 +00:00
Wei Li
82308a21a3 Merge "Revert "Generate SBOM of the target product in file sbom.spdx in..."" 2023-03-10 06:40:54 +00:00
Android Culprit Assistant
95c3ea8704 Revert "Generate SBOM of the target product in file sbom.spdx in..."
This revert was created by Android Culprit Assistant. The culprit was identified in the following culprit search session (http://go/aca-get/5b65d203-d364-4ade-aabb-1330fe45236a).

Change-Id: I4c7d7645ec0c266eb4d591b3089ba02e78da0659
2023-03-10 06:18:03 +00:00
Wei Li
4e2aed055b Merge "Generate SBOM of the target product in file sbom.spdx in product out directory." 2023-03-10 04:47:47 +00:00
Wei Li
02797aa70e Generate SBOM of the target product in file sbom.spdx in product out directory.
Test: m sbom
Test: m dist
Bug: 266726655
Change-Id: I6464fa2dc416dea62c5cf688c923d6b496f044f5
2023-03-09 15:27:58 -08:00
Rob Seymour
9492da59e3 Add test cases for APEX VINTF.
Add test cases to cover HAL definition found in embedded APEX.

Bug: 249086047
Test: releasetools_test
Change-Id: I5639b9b800a89164317740f64306ae10bf41343e
2023-03-09 17:00:06 +00:00
Treehugger Robot
cee4ebf1c3 Merge changes I674ad741,I908043ba
* changes:
  Disable VABC xor if COW isn't compressed
  Fix secondary payload generation
2023-03-08 02:03:33 +00:00
Treehugger Robot
135eb025f7 Merge "Fix sparse image detection" 2023-03-07 23:41:43 +00:00
Kelvin Zhang
88043be8c3 Disable VABC xor if COW isn't compressed
XOR only saves space if COW data is compressed. If compression parameter
is set to none, disable XOR as it does not save anything but still costs
CPU cycles.

Test: th
Change-Id: I674ad74140570ce4740c290d1adb9e9b5a08426e
2023-03-07 14:42:18 -08:00
Kelvin Zhang
49fadf41eb Fix secondary payload generation
Secondary payload is already handled by creating a new instance of
PayloadGenerator, when creating PayloadGenerator for primary payload,
we should not include the OPTIONS.secondary parameter.

Bug: 270100752
Test: ota_from_target_files --include_secondary
Change-Id: I908043bad11aa6d47dc4dc9b61da460fcfa4f0b9
2023-03-07 14:35:42 -08:00
Alex Buynytskyy
0645253ceb Force all temp artifacts to out/dist.
This way they don't end up in the final build, and will be in a single
predictable place.

+bump the extension SDK version to 7

Bug: 271806061
Test: run locally
Change-Id: Iaf4d918a269cdb7c79a53b7df9592bf8205e0305
2023-03-06 12:59:57 +00:00
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
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
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
1d35f905fd Merge "Allow rebuild sepolicy even though the image does not exist." 2023-02-24 02:10:00 +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
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
65af9993b3 Merge "Fix missing dev nodes in init_boot.img ramdisk" 2023-02-20 09:24:04 +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
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
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
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
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
Alex Buynytskyy
1d2833ad2d Finalization scripts bugfixes.
Bug: 264308911
Test: local runs
Change-Id: Ie0812593fc41e1bb5d03e7912c3d526647f32725
2023-02-12 02:12:02 +00:00
Alex Buynytskyy
afddc07570 Refactor finalization scripts.
Bug: 264308911
Test: run locally
Change-Id: I60fa1e1121fafb617d8508403fae07f0bdf39e66
2023-02-10 02:32:42 +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