Commit graph

8005 commits

Author SHA1 Message Date
Kelvin Zhang
2e1ff6e262 Remove unnecesasry use of ZipClose()
ZipClose() was introduced to work with large zip without switching to
ZIP64. It is a hacky patch. Now we have moved to python3 and zip64
completely, no need to keep using it.

Test: th
Bug: 246504616
Change-Id: I1ff15171bb26887b819f655e32817627ecad1132
2022-10-17 10:04:45 -07:00
Jooyung Han
62283b9649 Skip flattened apexes while check_target_files_vintf
Flattened apexes should be handled differently. For now just skip
flattened apexes to fix the build breakage.

Bug: 253669548
Bug: 253700117
Bug: 239055765
Test: m otapackage for targets with "flattened apexes"
Change-Id: I102a961fc1365f42881ca9ee6546e71246792d2a
2022-10-17 10:38:41 +09:00
Wei Li
ddfc1ebf14 Merge "Change function ZipDelete to use Python module zipinfo instead of command 'zip'." 2022-10-16 05:55:00 +00:00
Wei Li
8895f9ecea Change function ZipDelete to use Python module zipinfo instead of command 'zip'.
'zip' is a host command, and it can not be provided as a dependency when some release tools are used in Bazel rules.

Test: atest --host releasetools_test
Bug: 243748589

Change-Id: Ie5f42eadbd316ccd018b19194c466a908971af82
2022-10-14 18:31:56 -07:00
Rob Seymour
0a00cd27d2 Merge "Add APEX data to checkvintf for compatibility check." 2022-10-14 18:04:46 +00:00
Cole Faust
43d2d682a8 Remove extra semicolons from event log tag generated files
To avoid an errorprone error.

Test: Presubmits
Change-Id: I5d5eefd5e54e6e862755894dd0b2f34e9e7fad89
2022-10-13 17:47:42 -07:00
Yi-Yo Chiang
06c6273073 Remove deprecated BOARD_BUILD_SYSTEM_ROOT_IMAGE
This variable is always false or empty now, so clean up remaining
references of the variable.

Remove "buildvariant=" kernel commandline as it was used by
system-as-root kernels to determine the system build variant. It is
unsupported now.

Bug: 241346584
Test: Presubmit
Change-Id: I0f97b6e0bf8b03429f65366119ff78f9c7983516
2022-10-13 16:08:53 +08:00
Treehugger Robot
1c5f813bf0 Merge "Zipalign: Don't align directory entries" 2022-10-12 23:28:34 +00:00
Fabien Sanglard
8163cfa5f4 Zipalign: Don't align directory entries
Directories are entries with uncompressed size zero and ending with
character '/' or '\' are allowed in apks since b/204425803. These
entries should not be considered for alignment since they are not
mmap by the framework.

Test: align_test.cpp
Bug: 250872480
Change-Id: I964aad118a82839f9ed230acc4c2c76f51888c67
2022-10-12 13:57:16 -07:00
Kelvin Zhang
1caead09f9 Use AVB footer to determine caremap
Care maps need to store the original image size, which excludes bytes
used by hash tree or FEC code.

We used to propagate original image size using the global OPTIONS
dictionary. This is bad coding practice, and also fragile because we
have to make sure what's stored in dictionary and what's on disk are
consistent. Instead, let's read the content of images on disk, and parse
the AVB footer. The AVB footer contains the ground truth original image
size.

Test: build OTA, make sure the care maps have valid range
Bug: 246504616
Change-Id: I9250b478ab34dda60578a6b8c23ae6d7a9385788
2022-10-10 13:12:50 -07:00
Kelvin Zhang
f294c87cfe Move GetCareMap from common.py to add_img_to_target_files.py
common.py is too big, break it down if possible

Test: th
Bug: 246504616
Change-Id: Ic1c1f11b53673419558137dffc2e233eeafff2c1
2022-10-07 10:42:00 -07:00
Rob Seymour
dc4e0f2ee0 Update check_target_files_vintf to check the last line of stdout.
More output is now produced on stdout by checkvintf.
Update logic to compare against the last line for incompatible.

Fixes the following tests:
test_check_target_files_vintf.CheckTargetFilesVintfTest#test_CheckVintf_kernel_incompat
test_check_target_files_vintf.CheckTargetFilesVintfTest#test_CheckVintf_matrix_incompat
test_check_target_files_vintf.CheckTargetFilesVintfTest#test_CheckVintf_sku_incompat

Bug: 251221029
Test: atest releasetools_test
Change-Id: I592acf9a3868e2a60e203b2201e7fadcbb0e7f04
2022-10-05 19:52:54 +00:00
Tim Zimmermann
a06f8330f6
releasetools: Support erofs on non-dynamic partitions
Change-Id: Ibeb228132d3c0cc1d7407c2a40498b72580c81d5
2022-10-01 13:03:36 +02:00
Kelvin Zhang
137807d69d Support container password for apex signing
Some partners need the ability to sign apexes with passwords enabled.

Test: th
Bug: 206007131
Change-Id: I6abb0775031a4c6bf8aaae679f5c7ad8f4cffe46
2022-09-30 09:19:57 -07:00
Joe Onorato
cccf2ca337 Add a tool that will tell which git projects are used for a build target
See build/make/tools/whichgit -h for the options

Test: build/make/tools/whichgit --modules com.google.android.tzdata
Test: build/make/tools/whichgit --modules framework
Test: TARGET_BUILD_APPS=com.google.android.tzdata4 build/make/tools/whichgit --products mainline_modules_arm64 --variants eng --modules $TARGET_BUILD_APPS --why "*"
Change-Id: I05d91b85575a920b3ec9f5959e2ce463a45e63a3
2022-09-28 23:46:18 -07:00
Colin Cross
4b54525b2b Fix nondeterminisim in xmlnotice
SafePathPrefixes contains "prebuilts/" which is a prefix of another
entry "prebuilts/module_sdk" which can both match the same path.
SafePathPrefixes is a map, so the iteration order is nondeterminisitic.
Move both SafePathPrefixes and SafePrebuiltPrefixes into lists that
will always have a deterministic iteration order.

Bug: 230357391
Test: build NOTICE.xml.gz multiple times
Change-Id: Ibfcd6715b70f26164e0ef4d59f73b240f47f8db7
2022-09-28 15:40:20 -07:00
Ibrahim Kanouche
8550b25d0a Merge "Added a Breadth-first top down walk function to policy_walk." 2022-09-27 05:14:52 +00:00
Treehugger Robot
0cf4107cbb Merge "Update ota_metadata_pb2.py" 2022-09-26 20:55:57 +00:00
Ibrahim Kanouche
e7c33de179 Added a Breadth-first top down walk function
to policy_walk.

Test: m droid dist
Change-Id: I678d2a2402c7c3ab446e8533c9f862cd8f54f889
2022-09-26 19:04:51 +00:00
Bob Badour
113c92b0a3 Make notice order more deterministic.
Bug: 230357391

Test: m droid dist
Change-Id: Ib3f771f9fd16743fca3f6c80c2ff85c9e42772a9
2022-09-23 11:27:24 -07:00
Kelvin Zhang
67c69d14f0 Update ota_metadata_pb2.py
Automatically created with aprotoc ota_metadata.pb --python_out=.

Test: th
Change-Id: I5b9522845ba781c6919b893f71e28393b8a505b7
2022-09-23 10:07:04 -07:00
Rob Seymour
3f1c9577e8 Add APEX data to checkvintf for compatibility check.
As part of extending libvintf to support VINTF data inside of APEXes:
  Create apex-info-list.xml as part of build to pass into checkvintf.
  Include the /apex data to dirmap

  Extend check_target_files_vintf.py to include APEX data:
    Unzip APEX from partions
    Extract APEX data
    Create apex-info-list.xml

Bug: 239055387
Bug: 242314000
Test: m
Test: m dist
Change-Id: I4b4e159051bacb46dc43b83e006ca0f0eb58d772
2022-09-22 23:01:44 +00:00
Bob Badour
085a2c23e7 Policy clarified: No need to share a "distribution medium"
Including code built from restricted sources in a distribution medium
does not require sharing the code for building the distribution medium.

Test: m cts dist

Test: m cts dist gts (requires cherry-pick to internal)

Change-Id: I7fcd889b11a97f8deaf4de9d72fdadd09deebe30
2022-09-22 03:23:23 +00:00
Bob Badour
10f5c48b23 Policy change: GPL+CE is permissive.
Bug: 210546823

Test: m cts compliance_checkshare compliancenotice_bom \
    compliancenotice_shippedlibs compliance_listshare \
    compliance_dumpgraph compliance_dumpresolutions htmlnotice \
    compliance_rtrace textnotice xmlnotice

Change-Id: I7da36972ffbb1494e33fd63db8e5ec851d47704c
2022-09-20 21:50:08 -07:00
jiangxu5
2d8a4cbf84 [Bugfix] Fix compilation problems
vbmeta_system does not need to be rebuilt with vendor side

Signed-off-by: jiangxu5 <jiangxu5@xiaomi.com>
Change-Id: Ieb2076055aa3342a6071ec2ed5c976e22f59acd1
2022-09-18 12:38:51 +00:00
Treehugger Robot
e98964339e Merge "Fix incorrect input for path and entry" 2022-09-15 01:54:29 +00:00
Sorin Basca
05085835ea Increase javac heap to 4096M
Bug: 246361502
Test: TH
Change-Id: Ic2d6f991ad65d13a83319af07944069d1f511783
2022-09-14 11:33:22 +01:00
Zhou Xuezan
d0d49f5b42 Fix incorrect input for path and entry
Change-Id: Idff184d8fb8b328f42fc4f96cdde2663f6581864
2022-09-14 16:26:55 +08:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
fcf791f787 Merge "Add check_elf_file to BUILD.bazel" 2022-09-08 14:00:42 +00:00
Baligh Uddin
968b961fb6 Allow passing in payload signer for ota signing.
BUG: 244632678
Test: TH
Change-Id: I12c45ac378a0d4c58b146115bc69b8e6d85a3075
2022-09-08 02:17:58 +00:00
Treehugger Robot
c0b090d805 Merge "Add a tool to merge two partial OTAs" 2022-09-07 23:13:23 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
1004dcaf82 Add check_elf_file to BUILD.bazel
In supporting cc_prebuilt_binary building with Bazel, we
need to enable Bazel to be able to introspect and build
the check_elf_files.py tool, originally built via make

Bug: 241415823
Test: b build '//build/make/tools:check_elf_file'
Change-Id: I4eeae86f683c678809e84edc2fee88f9d2436f9f
2022-09-07 22:24:33 +00:00
Treehugger Robot
bb56d32071 Merge "Buildify make/tools/BUILD" 2022-09-07 21:13:20 +00:00
Kelvin Zhang
197772f069 Add a tool to merge two partial OTAs
Some partners have large number of products that share common
images. Generating OTAs for all these products waste a lot of CPU
cycles, because we waste time diffing the same images multiple times.
To mitigate this, add a tool for merging partial OTAs. Partners can
generate a partial OTA for common images, and re-use the generated OTA
by merging with each product specific OTA.

Bug: 227848550
Test: Run merge_otas.py on 4 OTAs, install the generated OTA

Change-Id: Ie38d522cdc9b89b1123b3d8190516c3648f99788
2022-09-07 20:35:46 +00:00
Treehugger Robot
87d272251c Merge "Refactor ota_utils to reduce dependency on global OPTIONS" 2022-09-07 02:22:00 +00:00
Kelvin Zhang
bf01f8b3f0 Refactor ota_utils to reduce dependency on global OPTIONS
Move some depency on global OPTIONS to parameters. This makes it easier
for other modules to re-use these functions w/o having to modify OPTIONS
variables before/after calling.

Test: th
Bug: 227536004
Change-Id: I3bab292f65a4222f0c9502bcf04fa7a85f8124c6
2022-09-06 23:51:20 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
cc8cd1242d Buildify make/tools/BUILD
Test: None
Change-Id: I5c4bb37d444835a3f1bc242fb71c058250aa8799
2022-09-06 19:41:20 +00:00
Cole Faust
b000208877 Rename mkf2fsuserimg.sh and mksquashfsimage.sh
See other cl in this topic for more information.

Bug: 198619163
Test: Presubmits
Change-Id: Ib39e8513a303a12e8bb6464a114ec39aa087d58a
2022-09-05 18:34:56 -07:00
Treehugger Robot
7aad536922 Merge "Add security patch level param to otatools" 2022-09-02 20:48:41 +00:00
Cole Faust
f4431716ca Fix module-file name collisions
Bazel doesn't allow a module and file with the same name.

Delete the symlinks as they don't appear to be used.

Bug: 198619163
Test: Presubmits
Change-Id: I50eac56aa2b87708d1762e504b3bfd86c07a6bfb
2022-09-01 15:27:05 -07:00
Kelvin Zhang
fa9286943c Rename ota_utils.Payload to PayloadGenerator
There's also a Payload class in system/update_engine/scripts. To avoid
name collision, rename the one in releasetools to PayloadGenerator.
No functional changes in this CL.

Bug: 227848550
Test: th

Change-Id: Ib7d4c7ad9839d99416d965e3a3661b8cee7b7693
2022-08-30 19:46:49 +00:00
Kelvin Zhang
62a7f6e08e Move Payload/StreamProperty class to ota_utils.py
This allows other modules to import these classes w/o bring in tons of
depedency. No functional changes.

Test: th
Bug: 227848550
Change-Id: I98139b45c02eddefa8a26d032e759fa11cc4c694
2022-08-30 18:29:41 +00:00
Hung-Wei Chen
be469cf909 Merge changes Icc298256,I9268cb11,I446a0b16,I347447eb,Iaae39e4c, ...
* changes:
  Remove HashTreeInfo from verity_utils.py
  Remove verity keys from info_dict
  Remove replace verity key args
  Remove unused args from common.py
  Clean up unused code for VB in verity_utils.py
  Remove verity related props from build_image.py
2022-08-30 07:10:23 +00:00
Kelvin Zhang
0b7207cec5 Add security patch level param to otatools
Test: generate an OTA with --security_patch_level flag, install it, make
sure data wipe happened.
Bug: 242812845

Change-Id: Ic33c5c468dca050a966653e9233388371d8e9b1e
2022-08-26 18:03:27 +00:00
hungweichen
cc9c05d5b8 Remove HashTreeInfo from verity_utils.py
We are removing VB related functionalities from release tools. This
change removes the hashtreeinfo and generator in verity_utils.py. It
also clears the function args using it.

Bug: 241044073
Test: atest under build/make
Change-Id: Icc298256be6917ffbd40cf4735f8e8092b541c9f
2022-08-25 03:30:06 +00:00
hungweichen
22e3b01d7b Remove verity keys from info_dict
We are removing VB support from release tools. This change aims to
remove verity keys in info_dict generated by common.LOADINFODICT

Bug: 242672222
Test: atest under build/make
Change-Id: I9268cb113c2c0bd11ce85b8485e5a4605bdbdca0
2022-08-24 06:37:12 +00:00
hungweichen
dd3fca09f6 Remove replace verity key args
We are removing VB support from release tools. This change aims to
remove the args related to replace verity key.

Bug: 242672222
Test: atest under build/make
Change-Id: I446a0b16e482c43542a1c0e41b24e80eb9fbc8e6
2022-08-24 06:37:12 +00:00
Melisa Carranza Zuniga
7ef1379927 Adding output_path arg to sign_sepolicy_path call
Bug: b/217570541
Test: mma and call sign_apex or sign_target_files_apks
Change-Id: I0fcab6e8a40739406a158a687acea448fd205f5d
2022-08-23 19:09:12 +02:00
Kelvin Zhang
059bf6e50d Move some OTA signing functions to a separte file
This makes it easier for other otatools to re-use these logic without
having to pull in lots of dependencies.

Test: th
Bug: 227848550

Change-Id: I81ed01c5cea4b934a074650731b6f89752221de9
2022-08-22 18:20:14 +00:00
hungweichen
49447913f6 Remove unused args from common.py
We are removing support of VB from release tools. This change aims to
remove args that no longer be used.

Bug: 242672222
Test: atest under build/make
Change-Id: I347447ebf1e589f8d3c4c8254f2940911c0be7f1
2022-08-19 06:04:06 +00:00
hungweichen
17c064d1e2 Clean up unused code for VB in verity_utils.py
We are removeing support of VB from release tools. This change aims to
remove code that are unreachable after removeing Version1ImageBuilder.

Bug: 242672222
Test: atest under build/make
Change-Id: Iaae39e4c49045f6c34351140cd43087dabd63e9c
2022-08-19 06:00:30 +00:00
hungweichen
65ba375a8e Remove verity related props from build_image.py
We are removing VB related functionalities from release tools. This
change remove the verity related props in build_image.py, and also
remove VB1.0 bootimage builder, which will be unreachable without these
props.

Bug: 241044073
Test: atest under build/make
Change-Id: Ib3f1c100c2c6c9e63a64f49269619b76074a27fd
2022-08-19 05:57:56 +00:00
Yong Ma
253b106f95 set up the salt for partitions without build.prop
BUG:242954151

Test: make target-files-package, then check the two sha1 are same:
      1. sha1 of IMAGES/boot.img
      2. expected sha1 of boot in VENDOR/bin/install-recovery.sh

Test: make target-files-package; unzip target_files.zip IMAGES/\*`;
      `zip -d arget_files.zip IMAGES/\*`
      `add_img_to_target_files -a target_files.zip`.
      Verify that the rebuilt images are identical to the deleted ones.

Change-Id: I5906ac1696b6403674fd8330b1569aed53510945
2022-08-19 02:10:01 +00:00
Treehugger Robot
81994f0b27 Merge "Fix a bug in unsigned OTA generation" am: 2abfe5f3a3
Original change: https://android-review.googlesource.com/c/platform/build/+/2185088

Change-Id: Id6180edf4f57ccabe4ffb072a7eebaa4d6f07ccf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-16 02:55:33 +00:00
Kelvin Zhang
b9fdf2dc08 Fix a bug in unsigned OTA generation
Caller expects output_file to contain the final OTA, so we must copy
data into that location. Modifying loca variables isn't enough.

Test: make ota with --no_signing
Change-Id: Id4aaefbc53b4250b7308701493d151f9408f47f1
2022-08-12 14:07:31 -07:00
Treehugger Robot
2e30eed994 Merge "Add flags to override all apex/apk keys" am: c7cd55bf17
Original change: https://android-review.googlesource.com/c/platform/build/+/2171705

Change-Id: I6c3556e51fa839c078e1eea6f6daa2dd8d6e4024
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-06 04:53:55 +00:00
Treehugger Robot
c7cd55bf17 Merge "Add flags to override all apex/apk keys" 2022-08-06 04:32:53 +00:00
Alexander Smundak
a77df0c808 Merge "Fix go.mod for tools/canoninja" am: 5cf8217978
Original change: https://android-review.googlesource.com/c/platform/build/+/2171782

Change-Id: I3cad683736ec403fbcb1fc0899ee6898480e372e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-02 23:02:55 +00:00
Kelvin Zhang
e50bb51fa9 Add flags to override all apex/apk keys
Currently, if we want to override all apex/apk key, we must specify all apk/apex names exhaustively. This causes CLI arguments to be very long and sometimes exceeds OS's limit.

Test: run signing test locally on build 8862875 on git_master
Bug: 239991438
Change-Id: Idbd3b7eef9b2a27236f4ca7a27449fcdf0d2dd3f
2022-08-02 18:32:38 +00:00
Treehugger Robot
0b96e1a005 Merge "Fix go.mod for tools/compliance" am: f30267635e
Original change: https://android-review.googlesource.com/c/platform/build/+/2169821

Change-Id: Ibf4c760bc46a31512b2bd9ed5e6576b24fcd0479
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-02 03:44:13 +00:00
Sasha Smundak
94d473c5c7 Fix go.mod for tools/canoninja
Now it can be ld with `go build` and cross-referenced.

Test: treehugger
Change-Id: I299efc2d635176519345acf142114097be6bf814
2022-08-01 14:45:28 -07:00
Sasha Smundak
ded9acd86d Fix go.mod for tools/compliance
Now it can be built with `go build`, and can be cross-referenced.

Test: treehugger
Change-Id: Ic35631ff6a915c8cf58db14aa83c849549e64aba
2022-08-01 14:24:21 -07:00
Kelvin Zhang
89c59b8fa5 Merge "Fix typo in recently changed extra_apex_payload_key flag" am: 193de78dfd
Original change: https://android-review.googlesource.com/c/platform/build/+/2167622

Change-Id: Ia46cc5f2a651aefc4884d5d642a0c6c04d66a536
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-29 17:08:22 +00:00
Kelvin Zhang
87e452739e Fix typo in recently changed extra_apex_payload_key flag
The intention was to make extra_apex_payload_key take a comma separted
list of keys. Iterating over a string will only iterate over each
characters individually. Must split by "," to iterate over keys.

Test: Run signing test locally using tradefed.sh
Bug: 239991438
Change-Id: I51bfed53a43b1b0fc1e33e0dc3d418a727e6ff15
2022-07-27 11:15:58 -07:00
Treehugger Robot
488525a889 Merge "Allow extra_apex_payload_key to take multiple names at once" am: d024518e1e
Original change: https://android-review.googlesource.com/c/platform/build/+/2164515

Change-Id: I0d2545f758d7469cf3a68ccf505a6183306630b3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-27 02:04:03 +00:00
Kelvin Zhang
085b6f3e84 Allow extra_apex_payload_key to take multiple names at once
When running tests, we might need to add many
extra_payload_keys. Currently we have to add --extra_apex_payload_key
for each key pair we pass, resulting in extremely long argument list.

Test: th
Bug: 239991438
Change-Id: I3e5f9d76c7f45822fb986b603dc089407c35b76b
2022-07-25 16:16:13 -07:00
Treehugger Robot
8493849334 Merge "make: fix memory leak" am: 66b010f2cf
Original change: https://android-review.googlesource.com/c/platform/build/+/2138495

Change-Id: Ica6a38075b8cc2320c9aa71a48c7c2b65af0e368
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-11 21:52:21 +00:00
Treehugger Robot
66b010f2cf Merge "make: fix memory leak" 2022-07-11 21:09:58 +00:00
Andrew Scull
040a786d18 Merge "Extract fsverity_manifest_generator logic" am: caf7014585
Original change: https://android-review.googlesource.com/c/platform/build/+/2144921

Change-Id: I01e0848590cdd3ab84e19bdb28fc331b1ea1a051
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-08 06:56:36 +00:00
Andrew Scull
caf7014585 Merge "Extract fsverity_manifest_generator logic" 2022-07-08 06:34:57 +00:00
Andrew Scull
0a6d2e54dc Extract fsverity_manifest_generator logic
Let the fsverity_manifest_generator logic be reused and just keep the
bits to generate the BuildManifest.apk. Since this can all be acheived
with a series of shell commands, remove the python script and just do it
directly in the Makefile.

Bug: 237384936
Test: TH
Change-Id: I168dc1cea0be72b5098f99e4183e080a687fb03e
2022-07-07 19:56:31 +00:00
Xin Li
05442a9213 Merge tm-dev-plus-aosp-without-vendor@8763363
Bug: 236760014
Merged-In: I1dffeb055a68250f574630d4ef5fedc51bad4a2b
Change-Id: I4e4b6a02fc140a1e38ce533031d7eb0a739396df
2022-06-28 21:23:05 +00:00
David Anderson
6531b32955 Merge "Make it easier to disable EROFS compression." 2022-06-28 18:28:01 +00:00
George Burgess IV
4645f98185 make: fix memory leak
`info->symlink_target` is a `std::string`. This `strdup` therefore leaks
memory. Just use `std::string::operator=(const char *)` instead.

Bug: 206470603
Test: TreeHugger
Change-Id: I71bcaec583c7d429b4d09522cc5eeb2ced009007
2022-06-28 11:23:21 -07:00
Melisa Carranza Zúñiga
051c9a15af Merge "Add sign_sepolicy_path for a binary to sign sepolicy.apex." 2022-06-28 12:26:50 +00:00
David Anderson
f3c81d7e10 Make it easier to disable EROFS compression.
Currently the only way to do this is to enable deduplication.

Bug: N/A
Test: BOARD_EROFS_COMPRESSOR := none
Change-Id: I7f8b99fbcefe7bbc15dfab7062b321aa3e2cf1ca
2022-06-27 23:20:34 +00:00
Melisa Carranza Zuniga
e0a977affd Add sign_sepolicy_path for a binary to sign sepolicy.apex.
Bug: b/217570541
Test: sign_apex --container_key=testdata/testkey
--payload_key=testdata/testkey_RSA4096.key
--codename_to_api_level_map=S:31,T:32,UpsideDownCake:33
-e SEPolicy-33.zip=testdata/testkey com.android.sepolicy.apex
signed_sepolicy.apex

Change-Id: Ifdd1c6e7db07cbc4674450ab0e2226494c98605a
2022-06-27 11:03:26 +02:00
Kelvin Zhang
91410f104d Merge "Fix potential issues if str has spaces" 2022-06-25 00:49:48 +00:00
Sasha Smundak
2bfc570d8f Copy symlink farm creation tool from Bazel.
SymlinkTree is one of the action types Blaze returns in response to
`aquery` (action query). build-runfiles is a tool copied from Bazel
to implement this action (see src/main/tools/build-runfiles.cc in
the Bazel Git repo). It creates a symlink farm (i.e., a directory
hiearchy consisting of symlinks) from a given manifest. Mixed builds
need this tool the mixed builds (in particular, every Python applicaion
has a runtime symlink farm).

Bug: 232085015
Test: m USE_BAZEL_ANALYSIS=1 com.android.adbd
Change-Id: I9cfcb33cb7d0f63bd36ffd2b4101f53cfc6a42fc
2022-06-24 09:57:45 -07:00
jiajia tang
e5ddfcd004 Fix potential issues if str has spaces
Uniform the split() function
str.split() will return a list split all spaces in str,
while str.split(' ') will return a list might contain ''
which might have potential issues.

Signed-off-by: jiajia tang <tangjiajia@xiaomi.com>
Change-Id: I0961659b140f800bdbe285f63bb4f02b8459ff8b
Signed-off-by: jiajia tang <tangjiajia@xiaomi.com>
2022-06-23 23:56:45 +00:00
Dan Willemsen
6b2bd9d652 Merge "Fix potential error for sys.platform" am: 59f36c1950 am: fa7bb8304a
Original change: https://android-review.googlesource.com/c/platform/build/+/2127932

Change-Id: I9ab6f15da248c7be9b73df84da0a67787b291167
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-15 21:12:26 +00:00
jiajia tang
7e0c12b1ba Fix potential error for sys.platform
This CL is to fix gap between python2.x and 3.x.
For python2.x: sys.platform returns 'linux2'
For python3.x: sys.platform returns 'linux'

python3.x(https://docs.python.org/3.6/library/sys.html#sys.platform)
python2.x(https://docs.python.org/2.7/library/sys.html#sys.platform)
Both 2.x and 3.x recommend to use 'startswith' to identify sys.platform.

Change-Id: Id5a0a007518b329d1320baf96ecf1164cd3ebec1
Signed-off-by: jiajia tang <tangjiajia@xiaomi.com>
2022-06-15 15:06:38 +00:00
Treehugger Robot
ae68a90b54 Merge "Remove danielnorman@ from OWNERs." am: 6417dca03f am: 123a85e7fb
Original change: https://android-review.googlesource.com/c/platform/build/+/2118053

Change-Id: Ibcc6f866114a7c267aa89cd9b98c13dfcbe90f39
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-07 21:55:55 +00:00
Daniel Norman
731767c99d Remove danielnorman@ from OWNERs.
Bug: 235251309
Change-Id: I164b4fcd2abbe0bd5a0a73c29887d7804f87544a
2022-06-07 19:26:54 +00:00
Treehugger Robot
1ac559c009 Merge "Improve flags for compliance tools." am: 10714789a9 am: 4033d64768
Original change: https://android-review.googlesource.com/c/platform/build/+/2116674

Change-Id: I3c1bd5554060aad67d604fbbb15de3db53a1bad0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-07 01:31:24 +00:00
Treehugger Robot
10714789a9 Merge "Improve flags for compliance tools." 2022-06-07 00:51:23 +00:00
Treehugger Robot
71880d9de6 Merge "[Bugfix] Check for presence before ZipWrite" am: bb8d9ed70f am: c3a915294b
Original change: https://android-review.googlesource.com/c/platform/build/+/2115654

Change-Id: Ifb49b4e8f30ea1da194e914c68cd01f63d8ccd4a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-04 05:36:55 +00:00
Bob Badour
986a839161 Improve flags for compliance tools.
Test: m droid dist reportmissinglicenses

Change-Id: I4090dae3d5d33d1908d67dff31aeee92d2b261da
2022-06-03 12:44:22 -07:00
jiangxu5
b67b0d5bc0 [Bugfix] Check for presence before ZipWrite
There are vendor products but no *.map situation

Signed-off-by: jiangxu5 <jiangxu5@xiaomi.com>
Change-Id: I93a710fd10870b7406b1d7beb5a6f51b6badc104
2022-06-03 14:46:56 +08:00
Melisa Carranza Zúñiga
8e3198ace3 Revert "Merge "Adding flags and logic to sign updateable SEPolicy in APEX" am: 77c1dfa6d9 am: 5a0d81a0be am: 54e08307dc"
Test: mma and run sign_apex

This reverts commit 8fe9e3a2c7.

Reason for revert: Updateable SEPolicy is punted.

Change-Id: I28ae2afbb1083e215f4e0a27a9164133cd73dd76
Merged-In: I28ae2afbb1083e215f4e0a27a9164133cd73dd76
2022-06-01 12:01:03 +02:00
Melisa Carranza Zúñiga
da308bf773 Revert "Merge "Adding sepolicy sign params to sign_target_files_apks." am: fb042449e0 am: bd8c313275 am: a2db49becd"
Test: sign_target_files_apks target_files.zip target_out.zip

This reverts commit 6e6c22c70e.

Reason for revert: Updateable SEPolicy is punted.

Change-Id: I99524d13811028a4036aa85c74cf10974fe08165
Merged-In: I99524d13811028a4036aa85c74cf10974fe08165
2022-05-31 09:55:22 +00:00
Chih-hung Hsieh
2df67498e9 Merge "Add date time, checks on android_root, etc." am: c15b738a7c am: 13faf1ec21
Original change: https://android-review.googlesource.com/c/platform/build/+/2101076

Change-Id: Ie748e934ce2252b196bfa9d57de8e47f5c1cd705
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-24 23:57:02 +00:00
Chih-Hung Hsieh
dd58ab0dc1 Add date time, checks on android_root, etc.
* Dump current date/time to the output .html file
  to distinguish files from different build dates.
* Guess android_root from the path of warn_common.py,
  but only if it contains build/make and build/soong.
* Do not depend on the TOP variable,
  which is no longer emitted by build/soong make.
* Do not depend on the USE_RBE variables,
  which is not emitted in local makes.

Test: warn.py --url=http://cs/android --separator='?l=' build.log > warnings.html
Test: warn.py --gencsv build.log > warnings.csv
Bug: 198657613
Change-Id: Ib75c60216f9e06f9a768e63b536495fb9658843f
2022-05-19 15:28:41 -07:00
Dmitrii Merkurev
03e324006b Merge "Introduce EROFS compress hints to the Android build system" am: 494358dec8 am: a13fbaa01f
Original change: https://android-review.googlesource.com/c/platform/build/+/2098052

Change-Id: I3ed091156c4b39dad6eaf578144ac3d070025988
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-19 11:41:19 +00:00
Dmitrii Merkurev
494358dec8 Merge "Introduce EROFS compress hints to the Android build system" 2022-05-19 11:00:11 +00:00
Chih-hung Hsieh
992d08602c Merge "Handle more mixed warning lines from RBE" am: b28e4c2235 am: c7638c668c
Original change: https://android-review.googlesource.com/c/platform/build/+/2094756

Change-Id: I42c5719052895460eb52e9e28e57c82d9ce02225
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 22:04:06 +00:00
Chih-hung Hsieh
b28e4c2235 Merge "Handle more mixed warning lines from RBE" 2022-05-18 21:31:22 +00:00
Chih-hung Hsieh
9fe03ee318 Merge "Add warning type into TopDirs and TopFiles index" am: 89703b6374 am: 3fc466adad
Original change: https://android-review.googlesource.com/c/platform/build/+/2100523

Change-Id: Idc5de621534beb043a942a0d1756894bfce3be66
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 21:30:40 +00:00
Dmitrii Merkurev
8ab6603a43 Introduce EROFS compress hints to the Android build system
Make it possible to provide a prebuilt hints file to specify different compression strategies on a file basis for all partitions using:

BOARD_EROFS_COMPRESS_HINTS := <path>/erofs-hints.txt

or separately for every partition using:

BOARD_SYSTEMIMAGE_EROFS_COMPRESS_HINTS := <path>/system-partition-erofs-hints.txt
BOARD_VENDORIMAGE_EROFS_COMPRESS_HINTS := <path>/vendor-partition-erofs-hints.txt

Hints format: Each line is defined by tokens separated by spaces in the following form:

<pcluster-in-bytes> <match-pattern>

pcluster-in-bytes can be specified as 0 which mean file will not be compressed

Bug: 231934752
Test: used dump.erofs -S system.img to verify the system image isn't compressed after specifying BOARD_SYSTEMIMAGE_EROFS_COMPRESS_HINTS := no-compress.txt, where no-compress.txt contains 0 .*
Test: used dump.erofs --nid=<inode-for-all-apk-files> vendor.img to verify apk files are not compressed (the rest of the partition content is compressed)
Test: used dump.erofs -S <all-images> to verify all images are not compressed after specifying BOARD_EROFS_COMPRESS_HINTS := <path>/no-compress.txt
Change-Id: I64054e26af5ea5781c45d2183b7796a9ad2b7927
2022-05-17 23:10:37 +00:00
Chih-Hung Hsieh
a55837c7d1 Handle more mixed warning lines from RBE
* Use android_root or __file__ path to find
  the source tree root and its sub directories.
* Use the sub directory list to clean up RBE-returned
  warning lines, removing all mixed prefix before
  the top sub directories.
* Change some re.match rules and order to save
  unnecessary comparisons.

Test: warn.py --url=http://cs/android --separator='?l=' build.log > warnings.html
Test: warn.py --gencsv build.log > warnings.csv
Bug: 198657613
Change-Id: I78cc17d04b8ab9e12935ef04797f3272298d5267
2022-05-17 11:46:58 -07:00
Chih-Hung Hsieh
4b020cd1d3 Add warning type into TopDirs and TopFiles index
* The index was a directory or file path.
  This change adds additional entries that have
  warning type prefix in the index.
* In the "Directories/Files with at least 1% warnings"
  section, the list will include number of warnings for
  (1) "all warnings in a directory/file"
  (2) "warnings of a type in a directory/file"
  (3) "warnings of a type in all directories/files"
  Examples:
    4273 (8.7%) frameworks/av/...
    4130 (8.4%) packages/...
    2427 (5.0%) [google-explicit-constructor] */...
    1628 (3.3%) [cert-err34-c] */...
    1099 (2.2%) [google-runtime-int] bionic/tests/math_data/...
     608 (1.2%) [cert-err34-c] external/...

Bug: 231245501
Test: warn.py --url=http://cs/android --separator='?l=' build.log > warnings.html
Test: warn.py --gencsv build.log > warnings.csv
Change-Id: I13bb54c846ad514334f78c5a71e994a131a92963
2022-05-17 11:46:15 -07:00
Michael Groover
96bfead5db Merge "Add support for -providerArg in signapk" am: 9d1a0a47d5 am: 9401efe64f
Original change: https://android-review.googlesource.com/c/platform/build/+/1760832

Change-Id: Ie876bfee50a8e3dccc59bd8b5ba68ff1bb113fdd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-12 19:39:26 +00:00
Michael Groover
2f8aad4f7f Add support for -providerArg in signapk
signapk currently accepts a Provider class that can be instantiated
and inserted before the signing. This commit adds support to specify
a -providerArg parameter that can be used to configure the Provider.
Prior to JDK 9 a Provider would accept a providerArg in a constructor
accepting a String; in JDK 9+ a Provider should first be instantiated
with the zero-arg constructor, then the configure method should be
called with the providerArg.

Bug: 142334653
Bug: 190974913
Fixes: 232134730
Test: Manually verified new Provider can be inserted with pre- and
      post-JDK 9 behavior.
Change-Id: I96f027640c59d3357e8dcf656626d1601bfef861
2022-05-11 21:55:24 +00:00
Kelvin Zhang
af7731528b Temporary hack for making T->S downgrade work am: 25d69c8bf5
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/+/18246946

Change-Id: I1f8044750c7754965cba7ed0bea654fb30b0befc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-10 22:53:37 +00:00
Kelvin Zhang
25d69c8bf5 Temporary hack for making T->S downgrade work
Downgrade OTA was broken because generic_ramdisk was removed from boot
partition in android T. Neither does O6 have init_boot. O6 also doesn't
include generic ramdisk in vendor boot, so no way for otatools to locate
contents of generic ramdisk. As a hack, omit boot partition timestamp if
we can't find ramdisk.

Test: generate T->S downgrade OTA for O6
Bug: 231656318
Merged-In: I9f5359462332aadadc324348873a3a4b2b126068
Change-Id: I9f5359462332aadadc324348873a3a4b2b126068
2022-05-10 05:06:47 +00:00
Kelvin Zhang
9a698e6a9f Temporary hack for making T->S downgrade work
Downgrade OTA was broken because generic_ramdisk was removed from boot
partition in android T. Neither does O6 have init_boot. O6 also doesn't
include generic ramdisk in vendor boot, so no way for otatools to locate
contents of generic ramdisk. As a hack, omit boot partition timestamp if
we can't find ramdisk.

Test: generate T->S downgrade OTA for O6
Bug: 231656318
Change-Id: I9f5359462332aadadc324348873a3a4b2b126068
2022-05-09 10:20:52 -07:00
Kelvin Zhang
f4406ca129 Merge identical key/val pairs in dynamic partition info
We might add new values to dynamic_partition_info.txt, so some kind of
generic fallback mechanism is needed. If keys are different, we need to
decided on a case-by-case basis which side takes precedence. For
example, Virtual AB requires vendor support, so vendor side takes
precedence. VABC on T+ devices are implemented entirely in system, so
system/framework side takes precedence.

Bug: 230876542
Test: th
Change-Id: I67747368547d3ef3e29ad64f8f818ef4c5896246
(cherry picked from commit 6a683ce02b)
Merged-In: I67747368547d3ef3e29ad64f8f818ef4c5896246
2022-05-06 21:40:14 +00:00
Treehugger Robot
1ca14f8415 Merge "Disable verity for VABC updates on android R" am: 46c4bb37d1 am: e654cbdfcd
Original change: https://android-review.googlesource.com/c/platform/build/+/2087483

Change-Id: I1e1c6583021ea106503a993fc844ce04f31a1317
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-06 00:37:11 +00:00
Kelvin Zhang
a9a87ec204 Disable verity for VABC updates on android R
Bug: 230277030
Test: th
Change-Id: I2872c490c852fb7d3784721e191ece80b4b1fd58
2022-05-04 16:45:14 -07:00
Treehugger Robot
69c7308fa4 Merge "Only enable zucchini if configuration file exists" am: 7b53ae67f1 am: 73590ef083
Original change: https://android-review.googlesource.com/c/platform/build/+/2085423

Change-Id: I509cf3d7af4ef52adbf1d83bc3fbb66a8ebdb66c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-04 04:34:42 +00:00
Treehugger Robot
7b53ae67f1 Merge "Only enable zucchini if configuration file exists" 2022-05-04 02:39:39 +00:00
Håkan Kvist
3db1ef61de Only enable zucchini if configuration file exists
Only enable zucchini if configuration file zucchini_config.txt exits
in target files and version in source and target is the same.

Without this patch zucchini would be enabled if configuration file
was missing from both target files.

Bug: 231204699
Test: Run ota package generation with zucchini_config.txt missing from
      both source and target zips. Confirm that zucchini is disabled.
Change-Id: Ia34998fd911d5860b38fe49fa5a88056a22d661e
2022-05-03 13:00:32 +02:00
Treehugger Robot
e691c3c719 Merge "Expose GetRamdiskFormat and use in ota_utils.py" am: 98050a4e97 am: fbfd46e545
Original change: https://android-review.googlesource.com/c/platform/build/+/2084045

Change-Id: I7125266e39d7f1b199a35e7a42273ae12e195c21
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-03 10:26:16 +00:00
Treehugger Robot
98050a4e97 Merge "Expose GetRamdiskFormat and use in ota_utils.py" 2022-05-03 08:27:35 +00:00
Treehugger Robot
7474ce637f Merge "Merge identical key/val pairs in dynamic partition info" am: d9e0788ee7 am: 77bd852ff0
Original change: https://android-review.googlesource.com/c/platform/build/+/2084183

Change-Id: I8d66aee14c8858294f7449c1b0409bda3215db40
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-03 05:24:45 +00:00
Treehugger Robot
d9e0788ee7 Merge "Merge identical key/val pairs in dynamic partition info" 2022-05-03 02:37:34 +00:00
TJ Rhoades
6f488e9e33 Expose GetRamdiskFormat and use in ota_utils.py
Some OTA files may have additional OTA props; when this is being computed within
ota_utils.py -> ComputeRuntimeBuildInfos, the ramdisk type needs to be passed into
PartitionBuildProps.FromInputFile as not all ramdisk may still use gzip. This check
is already defined in common.py, so this change also exposes the function GetRamdiskFormat.

Bug: 231075507

Signed-off-by: TJ Rhoades <tjr@microsoft.com>
Change-Id: If1b93b887990f0d90df2c6003122821c1e66a1ac
2022-05-02 13:19:49 -07:00
Kelvin Zhang
6a683ce02b Merge identical key/val pairs in dynamic partition info
We might add new values to dynamic_partition_info.txt, so some kind of
generic fallback mechanism is needed. If keys are different, we need to
decided on a case-by-case basis which side takes precedence. For
example, Virtual AB requires vendor support, so vendor side takes
precedence. VABC on T+ devices are implemented entirely in system, so
system/framework side takes precedence.

Bug: 230876542
Test: th
Change-Id: I67747368547d3ef3e29ad64f8f818ef4c5896246
2022-05-02 12:19:45 -07:00
Daniel Norman
02d41af731 Merge "Infers custom vendor partitions." am: d3eb2e30dc am: de1f8d583b
Original change: https://android-review.googlesource.com/c/platform/build/+/2032572

Change-Id: I921e395da6964496203ab15d4251f26ff98313bf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-02 17:14:58 +00:00
Daniel Norman
d3eb2e30dc Merge "Infers custom vendor partitions." 2022-05-02 16:25:58 +00:00
Daniel Norman
679242b877 Infers custom vendor partitions.
Rather than hardcoding a list of allowed vendor partitions, we accept
anything in the vendor target files that is not a framework partition.

Also extend support for inferred misc_info keys when the device uses
SYSTEM/product or SYSTEM/system_ext.

Test: test --host releasetools_test
Test: Use to merge a device with a custom IMAGES/*.img in the vendor
      build, and SYSTEM/system_ext in the system build.
Bug: 225902565
Change-Id: I638c0f9c019357150516ea6c208ecd60c03c450f
2022-04-29 15:07:48 -07:00
Cole Faust
5a6481f0ea Merge "Sort rblf_wildcard results and remove file existence functions" am: 76413f4c58 am: 75ed0c7cdf
Original change: https://android-review.googlesource.com/c/platform/build/+/2076126

Change-Id: I82f3d55bba268e5603b2996b5c298986b80d68d7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 18:07:43 +00:00
Cole Faust
76413f4c58 Merge "Sort rblf_wildcard results and remove file existence functions" 2022-04-28 19:54:32 +00:00
Cole Faust
c7b8b6ed88 Sort rblf_wildcard results and remove file existence functions
Kati's $(wildcard) results are guaranteed to be sorted,
but go's filepath.Glob() is not.

Remove the file existence functions because they can
just be replaced with wildcards.

Bug: 226974242
Test: go test
Change-Id: I02fb6292b932bc28cd856ec3c7cb9ed9e96ca630
2022-04-26 12:15:41 -07:00
Treehugger Robot
b1a7268ef2 Merge "[Bugfix] Check for presence before moving" am: f3f9672549 am: 244cbdf09d
Original change: https://android-review.googlesource.com/c/platform/build/+/2059633

Change-Id: If57c75832a7eca9ab5b2399b946b16eb80abf23a
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-25 12:09:51 +00:00
Treehugger Robot
f3f9672549 Merge "[Bugfix] Check for presence before moving" 2022-04-25 11:13:48 +00:00
Jooyung Han
2d9639bb1b Merge "build_image: Support common args" am: 94e79ece44 am: 1c5a2a8407
Original change: https://android-review.googlesource.com/c/platform/build/+/2071827

Change-Id: Ic9750494da0dcd8a0956495da0818f796350ac5c
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-23 02:42:12 +00:00
Jooyung Han
94e79ece44 Merge "build_image: Support common args" 2022-04-23 01:34:30 +00:00
Iavor-Valentin Iftime
42a7160300 Merge "Rebuild and copy recovery and boot img when using vendor_otatools" am: 71585eae2b am: 7ee275cb81 am: 9fd594c53c
Original change: https://android-review.googlesource.com/c/platform/build/+/2068347

Change-Id: Id6c31fc941b14f5349b3b43f314c1a97872a4b4e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 17:06:22 +00:00
Jooyung Han
d9d0d69c4d build_image: Support common args
Even though build_image uses logger but there was no way to configure it
and even -v (verbose) didn't work.

common.ParseOptions() parses common arguments (e.g. -v -h --logfile).

Bug: n/a
Test: m
Test: build_image -v ... should print logs
Change-Id: I45a61ada9c6a5a616f05d3214e185d08b0f1c152
2022-04-22 01:59:33 +09:00
Iavor-Valentin Iftime
71585eae2b Merge "Rebuild and copy recovery and boot img when using vendor_otatools" 2022-04-21 16:07:12 +00:00
Lucas Wei
035fdee0ef Merge "vendor_kernel_boot: Update releasetools for vendor_kernel_boot" am: 2d5ecef1b3 am: bd66e32393 am: b8b3c0d0ab
Original change: https://android-review.googlesource.com/c/platform/build/+/2064760

Change-Id: Ibcf742f858c37141ab59cbd2d9c589ae15cf6ada
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 04:48:40 +00:00
Lucas Wei
2d5ecef1b3 Merge "vendor_kernel_boot: Update releasetools for vendor_kernel_boot" 2022-04-21 03:07:15 +00:00
jiangxu5
2bd4273865 [Bugfix] Check for presence before moving
There are vendor products but no *.map situation

Signed-off-by: jiangxu5 <jiangxu5@xiaomi.com>
Change-Id: I5068abd1f81bca53ffcbdd415874b8fb49408e30
2022-04-21 09:33:31 +08:00
Lucas Wei
03230250a3 vendor_kernel_boot: Update releasetools for vendor_kernel_boot
add_img_to_target_files.py will re-make image and build a new
signed vbmeta.img with new images in target-file.
We need to add vendor_kernel_boot into AVB signing list and make it
support that image.

Test: make dist -j110 and check vbmeta.img
Bug: 214409109
Signed-off-by: Lucas Wei <lucaswei@google.com>
Change-Id: Id07433f3dc33f95e2edd49de890f1e098cb9ef31
2022-04-21 00:27:27 +08:00
Treehugger Robot
7ec455ad93 Merge "Adding BOARD_BUILD_GKI_BOOT_IMAGE_WITHOUT_RAMDISK" am: 95654c5113 am: fa33ae6ff8 am: 1a73e98758
Original change: https://android-review.googlesource.com/c/platform/build/+/2064761

Change-Id: I1e8ff054b8a9946bacf605f7565bbbc7941badeb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 06:03:43 +00:00
Iavor-Valentin Iftime
40adb17a1c Rebuild and copy recovery and boot img when using vendor_otatools
Rebuild recovery and boot images with vbmeta footers and copy together with recovery patch/install files when building vendor images using vendor otatools. Fixes validate_target_files failure.

Bug: 220126689
Bug: 186097910

Test: sign_target_files_apks \
        --vendor_otatools=otatools_vendor_dir \
	--vendor_partitions=vendor,odm \
	merged-target_files.zip \
	signed-target_files.zip
Test: validate_target_files signed-target_files.zip

Change-Id: Id45c67405bc37b769757db1701507f82cc6068d3
2022-04-19 18:35:36 +00:00
Bowgo Tsai
85578e0a9d Adding BOARD_BUILD_GKI_BOOT_IMAGE_WITHOUT_RAMDISK
GKI targets, e.g., `gki_arm64` or `gki_x86_64` have only
boot-*.img files without a ramdisk. It has no other images,
e.g., init_boot.img, system.img, etc.

The current build system assumes that the ramdisk is either
in a boot.img or in a init_boot.img, which is not true for
those GKI targets. Adding a new flag to support building
boot-*.img without a ramdisk while not building an init_boot.img.

Bug: 220834917
Test: build and `unpack_bootimg`
Change-Id: I789343c3e3d9ff0c36c0e19680a9792bd31a1c9f
2022-04-19 17:57:51 +08:00
Treehugger Robot
f1efdd1877 Merge "Add build flags for legacy EROFS support." am: 80d2c8f7a7 am: 05c690dd2e am: 2d16d3be49
Original change: https://android-review.googlesource.com/c/platform/build/+/2009556

Change-Id: Iffa5eaf98453601e7edf7f012c28bcb1438193f6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-16 06:15:22 +00:00
Treehugger Robot
80d2c8f7a7 Merge "Add build flags for legacy EROFS support." 2022-04-16 05:10:04 +00:00
Treehugger Robot
8c466713ba Merge "Rename listshare and checkshare." am: e487fa3ccb am: 4a2f1f84d0 am: cb37ac62d4
Original change: https://android-review.googlesource.com/c/platform/build/+/2063382

Change-Id: I60de77769edf786c0d91098a5e340a37328a5f5e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-14 23:19:19 +00:00
Treehugger Robot
e487fa3ccb Merge "Rename listshare and checkshare." 2022-04-14 22:09:15 +00:00
Cole Faust
28afecfd45 Merge "Remove usages of long-form variables" am: b760b469c7 am: 85f941cf3a am: c091ee15fb
Original change: https://android-review.googlesource.com/c/platform/build/+/2064287

Change-Id: I2610a8c39679c34cb82cb4dbd679dadf5f797666
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-14 18:23:48 +00:00
Cole Faust
81f1e92ed8 Remove usages of long-form variables
The long-form variables (PRODUCTS.<makefile>.<variable>)
are used to get information about multiple products.
However, they've never really worked correctly, and so
importing multiple products is deprecated behavior.

Remove as many usages of the long-form variables and
multi-product imports as possible.

Bug: 228518445
Test: Manually
Change-Id: I0b67f16360ff8bdcdb39638de739440472bccf76
2022-04-13 15:49:56 -07:00
Melisa Carranza Zúñiga
93fa6589df Merge "Revert "Merge "Adding flags and logic to sign updateable SEPolicy in APEX" am: 77c1dfa6d9 am: 5a0d81a0be am: 54e08307dc"" into tm-dev 2022-04-13 20:36:42 +00:00
Bob Badour
213095a919 Rename listshare and checkshare.
Bug: 151177513
Bug: 213388645
Bug: 210912771

Test: m droid dist reportmissinglicenses
Change-Id: I223c4496d776a1bbd4fdce31ed79a638ed3491d8
2022-04-13 11:04:43 -07:00
Melisa Carranza Zúñiga
61e1dd0da5 Revert "Merge "Adding flags and logic to sign updateable SEPolicy in APEX" am: 77c1dfa6d9 am: 5a0d81a0be am: 54e08307dc"
This reverts commit 8fe9e3a2c7.

Reason for revert: Updateable SEPolicy is punted.

Change-Id: I28ae2afbb1083e215f4e0a27a9164133cd73dd76
2022-04-13 16:23:45 +00:00
Melisa Carranza Zúñiga
ef72d2822e Merge "Revert "Merge "Adding sepolicy sign params to sign_target_files_apks." am: fb042449e0 am: bd8c313275 am: a2db49becd"" into tm-dev 2022-04-13 13:51:51 +00:00
Melisa Carranza Zúñiga
69e6d82106 Revert "Merge "Adding sepolicy sign params to sign_target_files_apks." am: fb042449e0 am: bd8c313275 am: a2db49becd"
This reverts commit 6e6c22c70e.

Reason for revert: Updateable SEPolicy is punted.

Change-Id: I99524d13811028a4036aa85c74cf10974fe08165
2022-04-12 23:22:11 +00:00
Treehugger Robot
8a3608e5f4 Merge "change logtags dependency to provide java sources" am: 84a39ac3f0 am: 1b14ac6ba6 am: 2f101fbc2b
Original change: https://android-review.googlesource.com/c/platform/build/+/2045664

Change-Id: Icdd5a31eefe6c09c29fbddc6d07efcf610dc673e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-08 23:49:42 +00:00
Treehugger Robot
84a39ac3f0 Merge "change logtags dependency to provide java sources" 2022-04-08 22:37:22 +00:00
Yuntao Xu
69caac0966 Merge "Make file list by partitions for all lunch targets" am: 722d0a602a am: 990145b2ad am: 6a9f5909ca
Original change: https://android-review.googlesource.com/c/platform/build/+/2034494

Change-Id: I9fc699864750a3b7c0893ffbb9315572a2bfc24a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-08 17:08:51 +00:00
Yuntao Xu
722d0a602a Merge "Make file list by partitions for all lunch targets" 2022-04-08 15:29:15 +00:00
Yuntao Xu
c21dc3c8c1 Make file list by partitions for all lunch targets
1. Filtered out the Android.mk file if the Make modules on them are
   not in the PRODUCT_PACKAGES or the correspoding deps;
2. Merged the Android.mk file list by partitions for all lunch targets.

Bug: 225256154
Test: lunch aosp_coral-eng; m
out/target/product/coral/mk2bp_remaining.html
Test: python3 build/make/tools/mk2bp_partition.py

Change-Id: I40919e81ab3c6bd516379f0acd72932e8db50088
2022-04-07 11:01:19 -07:00
Sam Delmerico
e9e5b59a11 move logtags rule from //build/make to //build/bazel
Test: b build //external/packages/apps/QuickSearchBox
Change-Id: If8f9be4cad4d686845620eb4dd6d3ba3b21ba853
2022-04-05 16:06:46 +00:00
Sam Delmerico
b6fe473734 change logtags dependency to provide java sources
This rule originally used an android_library because it needed access to
SDK methods, but we can instead just provide Java sources and expect the
dependee to link the SDK methods.

Test: enabled QuickSearchBox and build
Change-Id: I7f1cdbea49e100ecc0944f8caa39683fb73016fb
2022-04-05 16:06:46 +00:00
Orion Hodson
8208530fa6 Merge "Update checkowners.py to support python3" am: 2f4e021780 am: 982f400a15 am: 6542d0fcf5
Original change: https://android-review.googlesource.com/c/platform/build/+/2053986

Change-Id: Id917b37ad4d5aefcbc42baa2a9108a2d6899a0bd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-05 11:22:03 +00:00
Orion Hodson
2f4e021780 Merge "Update checkowners.py to support python3" 2022-04-05 08:22:38 +00:00
Treehugger Robot
10976c77b2 Merge "Remove regex functionality from rbcrun" am: bd78ed0726 am: 1b7d02336d am: 39a0861614
Original change: https://android-review.googlesource.com/c/platform/build/+/2048503

Change-Id: I0013f0e3891f6082de46419f1893dd0da34055c4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-04 21:35:20 +00:00
Orion Hodson
e421668192 Update checkowners.py to support python3
Update generated with 2to3.

Bug: N/A
Test: manually check OWNERS files
Change-Id: Idccc7ba36351854fe2b7a669a99c97f3f3a03d0e
2022-04-04 13:22:38 +01:00
Cole Faust
62878a2cef Remove regex functionality from rbcrun
As a first step to making .rbc files compatible with bazel,
remove regex support since bazel doesn't have it.

Fixes: 227384703
Test: ./out/rbcrun ./build/make/tests/run.rbc
Change-Id: I8b946c20cc42897a47a5516a167732f4e16b6158
2022-03-30 12:00:15 -07:00
Treehugger Robot
0e9fbfd393 Merge "Support OUT_DIR for license graph." am: bc8d61f17b am: 443a7b25e3 am: f74478b33b
Original change: https://android-review.googlesource.com/c/platform/build/+/2036930

Change-Id: I18d97926c690708b1c889d8e9cabe1ee97e15382
2022-03-24 05:07:20 +00:00
Treehugger Robot
22eb25791a Merge "Revert "Rename init_boot properties to ro.init_boot.*"" am: 477b8e0561 am: 5e294a92bf am: 7895babcad
Original change: https://android-review.googlesource.com/c/platform/build/+/2039666

Change-Id: Ife828081d6040819614cd26a83a20cccbf709a2a
2022-03-24 05:02:38 +00:00
Treehugger Robot
bc8d61f17b Merge "Support OUT_DIR for license graph." 2022-03-24 00:43:58 +00:00
Treehugger Robot
477b8e0561 Merge "Revert "Rename init_boot properties to ro.init_boot.*"" 2022-03-23 23:27:02 +00:00
Bob Badour
c778e4cba4 Support OUT_DIR for license graph.
Bug: 226066987

Test: OUT_DIR=/tmp/outdir m all listshare checkshare htmlnotice rtrace dumpgraph dumpresolutions compliancenotice_bom compliancenotice_shippedlibs
Test: OUT_DIR=/tmp/outdir m /tmp/outdir/target/product/bonito/obj/NOTICE.xml.gz
Test: m all listshare checkshare htmlnotice rtrace dumpgraph dumpresolutions compliancenotice_bom compliancenotice_shippedlibs
Test: m out/target/product/bonito/obj/NOTICE.xml.gz

Change-Id: I6282c647a389c5935d5ce7c79193f86d32c76365
2022-03-23 14:12:12 -07:00
Kelvin Zhang
8250d2cd9e Revert "Rename init_boot properties to ro.init_boot.*"
This reverts commit 411fac84d6.

Reason for revert: b/226318737

Change-Id: Ie1cf0e79b3ac11b91e031a479898a54856020500
2022-03-23 19:46:09 +00:00
Melisa Carranza Zúñiga
6e6c22c70e Merge "Adding sepolicy sign params to sign_target_files_apks." am: fb042449e0 am: bd8c313275 am: a2db49becd
Original change: https://android-review.googlesource.com/c/platform/build/+/2028269

Change-Id: Id27f7043ca2122cf43adf59e48843ffe5a445359
2022-03-22 18:46:25 +00:00
Treehugger Robot
7ecab5ff11 Merge "Rebuild and copy recovery patch files when using vendor_otatools" am: 93d7c150c9 am: c4a7031063 am: 07326c0417
Original change: https://android-review.googlesource.com/c/platform/build/+/2036543

Change-Id: Ic5871105c9867d22ee3666e6be02c523c6c5b493
2022-03-22 18:05:26 +00:00
Melisa Carranza Zúñiga
fb042449e0 Merge "Adding sepolicy sign params to sign_target_files_apks." 2022-03-22 18:00:43 +00:00
Lucas Wei
e39d6af2de Merge "Make build support vendor_kernel_boot image" am: 8842016b30 am: 2dc9c52861 am: 3afd8feae8
Original change: https://android-review.googlesource.com/c/platform/build/+/2018599

Change-Id: I6fa0c4681ab6f974c97ac8112ad398de9f62d6a0
2022-03-22 14:33:50 +00:00
Iavor-Valentin Iftime
246a5c069a Rebuild and copy recovery patch files when using vendor_otatools
Rebuild recovery and copy recovery patch/install files when building vendor images using vendor otatools. Fixes ota_from_target_files failure.

Bug: 220126689
Bug: 186097910

Test: sign_target_files_apks \
        --vendor_otatools=otatools_vendor_dir \
	--vendor_partitions=vendor,odm \
	merged-target_files.zip \
	signed-target_files.zip

Change-Id: I4a415417e0d7b1bcd548292ec8f3a12570ec65f0
2022-03-22 13:51:10 +00:00
Lucas Wei
8842016b30 Merge "Make build support vendor_kernel_boot image" 2022-03-22 13:48:34 +00:00
Yi-yo Chiang
f3309640bd Merge "Rename init_boot properties to ro.init_boot.*" am: e5ed34824f am: f773aa245f am: c69d4ddf3d
Original change: https://android-review.googlesource.com/c/platform/build/+/2026283

Change-Id: I256d377d8c18c557d9b6ecd4a484f2eaf8bca3ca
2022-03-22 10:32:04 +00:00
Yi-yo Chiang
e5ed34824f Merge "Rename init_boot properties to ro.init_boot.*" 2022-03-22 09:13:32 +00:00
Melisa Carranza Zuniga
e6d4fb5ae6 Adding sepolicy sign params to sign_target_files_apks.
Bug: b/217570541
Test: sign_target_files_apks --sepolicy_key=build/make/tools/releasetools/testdata/testkey_RSA4096.key
--sepolicy_cert=build/make/tools/releasetools/testdata/testkey.x509.pem target_files.zip target_out.zip
Change-Id: I4ae9f2a3297d10de68c6444dea1cd9996ad9dd11

Change-Id: I4a1ac7009ae0d6bb53c74bd34f8c74f12ea0a3b8
2022-03-21 22:56:33 +00:00
Treehugger Robot
5444cac49a Merge "Copy vendor & odm .map files when using vendor_otatools" am: 6b3e5294db am: 32764d5b7e am: 0bd3600b17
Original change: https://android-review.googlesource.com/c/platform/build/+/2030363

Change-Id: I3f59d2477461f1027bedb44458b1510d39db1657
2022-03-17 19:44:52 +00:00
Iavor-Valentin Iftime
880e4432b9 Copy vendor & odm .map files when using vendor_otatools
Copy IMAGES/vendor.map and IMAGES/odm.map files when building vendor images
using vendor otatools. Fixes validate_target_files failure.

Bug: 220126689
Bug: 186097910

Test: sign_target_files_apks \
        --vendor_otatools=otatools_vendor_dir \
	--vendor_partitions=vendor,odm \
	merged-target_files.zip \
	signed-target_files.zip

Change-Id: Iaf904c90761b3830cf81af2561695c81bfc6c70d
2022-03-17 14:02:30 +00:00
Lucas Wei
f57333f7fc Make build support vendor_kernel_boot image
Add vendor_kernel_boot image for vendors whose bootloader support
extra first stage booting kernel modules ramdisks. This benefit
kernel repo to build kernel-artifacts only image without Andorid
artifacts dependency.

Bug: 214409109
Signed-off-by: Lucas Wei <lucaswei@google.com>
Change-Id: If07218b86a7751b3d452a172610af960f5f9ec74
2022-03-16 23:13:19 +08:00
Albert Wang
d86f28e72f Merge "Revert "Turn off adb on user builds."" am: 7be6751e00 am: 41eb7e3542 am: 7c15560cf8
Original change: https://android-review.googlesource.com/c/platform/build/+/1913436

Change-Id: I4700011cbb09b2331ddc5fa8d6943a392d038f5e
2022-03-16 04:05:07 +00:00
Albert Wang
7be6751e00 Merge "Revert "Turn off adb on user builds."" 2022-03-16 02:48:39 +00:00
Rob Seymour
5fe7080063 Merge "Update extract items call in merge_dexopt." am: 6ae6a3aef6 am: 5e9faa8c3d am: 1c59c596d2
Original change: https://android-review.googlesource.com/c/platform/build/+/2027303

Change-Id: I279bb5e4daaa95d4c2763f7f69ffb2f8675bb074
2022-03-15 22:50:49 +00:00
Rob Seymour
c4e2754380 Update extract items call in merge_dexopt.
Test: merge builds with VSDK image
Change-Id: I7788164ecbd69408d2293f49b98ab88db67e9cd9
2022-03-15 17:43:51 +00:00
Yi-Yo Chiang
411fac84d6 Rename init_boot properties to ro.init_boot.*
Right now they're named ro.bootimage.* which is really confusing.
Change it so that if generic ramdisk is in boot.img, then name the
properties as ro.bootimage.*, otherwise if generic ramdisk is in
init_boot.img, then name the prop as ro.init_boot.*.

Bug: 211823573
Test: m dist
Change-Id: Icff3c7be04b9a3c6490fbf49ba4f05565b029890
2022-03-15 18:08:10 +08:00
Daniel Norman
b463d60c74 Merge changes from topic "mtf-cleanup-infer" am: d5d938742d am: ef8eb14d88 am: 59069f92c4
Original change: https://android-review.googlesource.com/c/platform/build/+/2006311

Change-Id: Ia64518fcbf7dddae2db6529231feb80082b000b6
2022-03-14 22:12:02 +00:00
Treehugger Robot
2e011580a5 Merge "Moves merge scripts into a new merge folder." am: 51005914bd am: 0d0abf6cbc am: 567da60c58
Original change: https://android-review.googlesource.com/c/platform/build/+/2006512

Change-Id: I4f787a582c506fadf683b99b73bc165194fb48b1
2022-03-11 00:48:42 +00:00
Daniel Norman
5f47677f00 Infer merge configs if not provided.
Bug: 221858722
Test: Create a merged package using inferred configs.
Test: atest --host releasetools_test
Change-Id: I93d67ca0f00be3f0e0424ed0a1e44c39ca2f3094
2022-03-10 23:56:12 +00:00
Daniel Norman
2465fc8594 Split the huge merge_target_files script into multiple files.
Bug: 221858722
Test: m otatools; Use to create merged builds
Test: atest --host releasetools_test
Change-Id: I5f932f160d3f6405b41a7721b1c75cc96749e77b
2022-03-10 23:56:00 +00:00
Treehugger Robot
51005914bd Merge "Moves merge scripts into a new merge folder." 2022-03-10 23:39:28 +00:00
Treehugger Robot
6e2c7edf26 Merge "validate_target_files: support gki_arm64" am: e910accc38 am: d8bdea34e9 am: 0979185024
Original change: https://android-review.googlesource.com/c/platform/build/+/2017679

Change-Id: I5f3c4ef7b9bcfc3e041088a013a696db216ef3b4
2022-03-10 02:01:40 +00:00
Treehugger Robot
e910accc38 Merge "validate_target_files: support gki_arm64" 2022-03-10 00:57:10 +00:00
David Anderson
d15d508196 Merge "build_image: Remove mkerofsimage.sh." am: 060505fb4a am: c836e2e090 am: 0a132b5e2f
Original change: https://android-review.googlesource.com/c/platform/build/+/2008730

Change-Id: Ie7406b2257a96d04587b6117d038f058c76e785b
2022-03-09 11:20:29 +00:00
Treehugger Robot
e2c184a169 Merge "Fix small typo in ota script options" am: 0cc4ae84ea am: 3874e5dae6 am: 9d1a765321
Original change: https://android-review.googlesource.com/c/platform/build/+/2015628

Change-Id: Ied9c95eb0f92c0998ea9f3698834f510f546fe00
2022-03-09 11:20:20 +00:00
Kelvin Zhang
597bb9e200 Merge "Simplify codes when _LoadOemDicts" am: ff35cbd110 am: f31a78141f am: 4c7d62c1d7
Original change: https://android-review.googlesource.com/c/platform/build/+/2015235

Change-Id: I878d646d0a857c5a2fb3c1ee3c2150b560290fb5
2022-03-09 11:20:12 +00:00
Daniel Norman
b162119d37 Merge "Fix META/care_map.pb generation." am: 986582f262 am: 4bcec72be1 am: fd2e681400
Original change: https://android-review.googlesource.com/c/platform/build/+/2008564

Change-Id: I13bcb357e4cb424a65d671f2f04a5e0c86b9c02c
2022-03-09 11:20:03 +00:00
Bowgo Tsai
341fe02903 validate_target_files: support gki_arm64
gki_arm64 is a special target to build multiple GKI boot-*.img
files. It has neither system.img nor vbmeta.img. Skips checking
system.img and vbmeta.img in this case.

Bug: 223078405
Test: validate_target_files signed-gki_arm64-target_files-8277156.zip
Change-Id: I9d3c102c11787cf70c1e1fc8e6a552f8fd19ff72
2022-03-09 16:35:19 +08:00
David Anderson
060505fb4a Merge "build_image: Remove mkerofsimage.sh." 2022-03-09 04:04:05 +00:00
Treehugger Robot
0cc4ae84ea Merge "Fix small typo in ota script options" 2022-03-09 03:06:26 +00:00
Daniel Norman
2b0b9ca1b7 Moves merge scripts into a new merge folder.
This will be used in the following change to split
merge_target_files into a collection of smaller
more-focused scripts.

Bug: 221858722
Test: m otatools; Use to create merged builds
Change-Id: Ie01dac81c5f9f28f1e0fe037259eabd2478e60b6
2022-03-08 16:37:14 -08:00
Kelvin Zhang
ff35cbd110 Merge "Simplify codes when _LoadOemDicts" 2022-03-08 23:16:32 +00:00