Commit graph

84321 commits

Author SHA1 Message Date
Jooyung Han
8cc42f429f Remove PRODUCT_INSTALL_EXTRA_FLATTENED_APEXES
We will deprecate flattened apexes. In this change, GSI-specific make
variable (PRODUCT_INSTALL_EXTRA_FLATTENED_APEXES) is removed. The
variable was used to install both image/flattened apexes in the GSI, so
that it works on ro.apex.updatable devices and not-updatable devices.

Now, GSI will have only image APEXes in it.

Bug: 278826656
Test: lunch gsi_arm64-userdebug && m # no flattened apexes
Change-Id: I4702973d4ee75aa693e4e7f4e57577b77059dc09
2023-06-20 14:27:10 +09:00
Treehugger Robot
57c1aa7b16 Merge "Handle zip64 extra fields better" 2023-06-17 22:12:26 +00:00
Kelvin Zhang
1e774245a4 Handle zip64 extra fields better
Test: check_target_files_signatures
Bug: 283033491
Change-Id: I7da89f8389c09cc99201cff342483c158bd7e9c1
2023-06-17 09:21:46 -07:00
Treehugger Robot
0d2d11bc00 Merge "Use patch instead of git apply." 2023-06-17 01:56:52 +00:00
Treehugger Robot
59d662524c Merge "aconfig: change java flag method name to camelCase" 2023-06-16 21:49:22 +00:00
Alex Buynytskyy
bce1a51df8 Use patch instead of git apply.
Bug: 281682520
Test: run locally
Change-Id: Ia84055b7a9074836c6d7b3039ba980e39043a41e
2023-06-16 20:23:36 +00:00
Zhi Dou
af81e20653 aconfig: change java flag method name to camelCase
Before java code will directly use the flag name as the method name.
This change adds funciton to try the best to convert flag name to
camelCase, and then use the camelCase string as the method name in the
generated code.

Bug: 279483816
Test: atest aconfig.test aconfig.test.java
Change-Id: I45fc6df46c9d535cd38a657a41313202f9b660af
2023-06-16 12:40:40 +00:00
Jooyung Han
e4635b3e04 Merge "Remove --blkid_path argument" 2023-06-16 06:48:57 +00:00
Justin Yun
cf92cdff7c Merge "Use map_file_generator only for the supported file systems" 2023-06-15 23:54:29 +00:00
Treehugger Robot
5c73eb33db Merge changes I9c1a5346,I0a9d2c58
* changes:
  Fix python3.11's support for zip64
  Search for partition maps in IMAGES dir as well
2023-06-15 15:56:57 +00:00
Justin Yun
a8a5a3ff62 Use map_file_generator only for the supported file systems
map_file_generator can generate map files from erofs and ext# file
systems. Check the file system type and copy images and generate map
files if supported. Otherwise skip these steps.
If the image files are not copied, add_img_to_target_files will
generate the image files and map files.

Bug: 286870582
Test: lunch bertha_x86_64-userdebug && m dist
Change-Id: Ib92dd989cf61b1e376107a507eae9222ceb1d0d4
2023-06-16 00:10:33 +09:00
Treehugger Robot
1cda03b44b Merge "Update LLNDK list" 2023-06-15 04:26:43 +00:00
Kelvin Zhang
38d0c373ac Fix python3.11's support for zip64
Bug: 283033491
Test: check_target_files_signatures -v -l
Change-Id: I9c1a5346e3a5f3920242dc9a5268d999f50a4937
2023-06-14 12:54:57 -07:00
Kelvin Zhang
b789e84499 Search for partition maps in IMAGES dir as well
Partition images are allowed to be in either IMAGES/ or RADIO/ dir of a
target_files zip, so when searching for .map files we should look in
both dirs.

Test: th
Bug: 227848550
Change-Id: I0a9d2c582d8f5d570237434902fac012513c9aad
2023-06-14 10:01:21 -07:00
Treehugger Robot
4b47e8a2f3 Merge "Allow map_file_generator to use host tools" 2023-06-14 16:25:26 +00:00
Zhi Dou
06377d79ab Merge "aconfig: Java codegen iteration 1" 2023-06-14 13:21:16 +00:00
Jooyung Han
629490292a Remove --blkid_path argument
deapexer doesn't need it.

Bug: 279858383
Test: presubmit
Change-Id: If0ec42b5edd4642f07c96ba641030c4dd6fb4660
2023-06-14 15:16:34 +09:00
Treehugger Robot
c37e824f56 Merge "Move MTE mode settings to a product variable." 2023-06-14 01:42:22 +00:00
Kelvin Zhang
0eba102f19 Allow map_file_generator to use host tools
map_file_generator need to invoke binaries such as `unsquashfs` .
These binaries are built from android source tree, so add host binary
output directory to PATH variable so that map_file_generator can use
these binaries.

Test: th
Bug: 286870582
Change-Id: I56634293ee885fc4612627578a22cdf57bc13bfc
2023-06-13 18:24:15 -07:00
Treehugger Robot
c01b9a2877 Merge "aconfig: reject consecutive underscores in identifiers" 2023-06-13 22:05:56 +00:00
Evgenii Stepanov
80b53b8c77 Move MTE mode settings to a product variable.
Allow product configuration of memtag target list by
moving the current set into a product variable instead of the various
.bp files.

The default list of memtag targets can be found in
  build/make/target/product/memtag-common.mk

This is NFC as all targets in the list already have "memtag_heap: true"
in the build files.

Bug: 280343521
Test: no functional change
Change-Id: I5954fde05256e00a8e01c114ad522f50ed0cfa9f
2023-06-13 13:11:52 -07:00
Daniel Zheng
0fd9651321 Merge "Add dt partition in fastboot-info" 2023-06-13 17:35:59 +00:00
Joe Onorato
ac57d98b87 Merge "Allow and merge multiple release configs with the same name" 2023-06-13 15:13:04 +00:00
Zhi Dou
4655c967e1 aconfig: Java codegen iteration 1
This change includes
    - refactor generated java code to generate
        - Flags.java to support the static API
	- FeatureFlagsImpl.java to support injection API
	- FeatureFlags.java interface

Bug: 279483816
Test: atest aconfig.test aconfig.test.java
Change-Id: If0d4baf317b9174635cd0fff3832ab7091ee52ed
2023-06-13 14:45:53 +00:00
Mårten Kongstad
d18c978f31 aconfig: reject consecutive underscores in identifiers
The Java codegen may translate flag names (snake_case) to Java
camelCase, dropping the underscores. The flags a_b and a__b will
translate to the same camelCase form, which is ambiguous.

Circumvent this problem by disallowing consecutive underscores in flag
names, flag namespaces, and packages.

Bug: 284252015
Test: atest aconfig.test
Change-Id: I2586a38160723c06265a140193da8178655553e4
2023-06-13 13:30:58 +02:00
Treehugger Robot
913c41caf5 Merge "Use Z_BEST_COMPRESSION for compress-package" 2023-06-13 10:09:54 +00:00
Joe Onorato
1f6555151e Allow and merge multiple release configs with the same name
For now (to prevent build breakages when this is submitted), duplicate
flag values are allowed, but that will be disallowed once this change
automerges everywhere.

Bug: 286689485
Test: Treehugger
Change-Id: I723340ff9751b61d33c4108b0cc2f90702a116c9
2023-06-12 23:29:25 -07:00
Jooyung Han
bd7a9fafe2 Update LLNDK list
Bug: 271488212
Test: m
Change-Id: I46e1770130be203bfefef0bd5fdf4cec34027d6e
2023-06-13 13:20:23 +09:00
Daniel Zheng
8ad23cf151 Add dt partition in fastboot-info
Adding dt partition in fastboot-info in case device uses it.

Test: m fastboot_info
Change-Id: Id5b3a70064f5ac6da8303f74c73e4d5f395a2c51
2023-06-12 09:57:54 -07:00
Jiakai Zhang
9448754144 Merge "Avoid using soong_zip's "-e" flag for boot.zip." 2023-06-12 16:22:39 +00:00
Daniel Zheng
d97f8505ae Merge "Removing --apply-vbmeta for vbmeta_system" 2023-06-12 15:42:16 +00:00
Dennis Shen
f1cd83bece Merge "aconfig: update cpp codegen to use static methods" 2023-06-12 12:57:57 +00:00
Dennis Shen
4f78f10015 aconfig: update cpp codegen to use static methods
Update c++ codegen to static methods interface.

Bug: b/279483801
Test: atest aconfig.test
Change-Id: I78da3bbca6240bee660c692807930d00f2242b0a
2023-06-12 12:57:38 +00:00
Jiakai Zhang
34914f620b Avoid using soong_zip's "-e" flag for boot.zip.
aosp/23658853 changes boot.zip, which need to be cherry-picked to UDC.
It uses soong_zip's "-e" flag to specify the filename to use in boot.zip
for METADATA.txt. However, the "-e" flag doesn't exist on UDC. This
change uses an alternative approach to avoid using the "-e" flag.

Before this change, the contents were written to
out/dist/boot.zip.METADATA.txt and then passed to soong_zip with "-e" to
rename to file to "METADATA.txt".

After this change, the contents are written to
out/dist/boot_zip/METADATA.txt and then passed to soong_zip with "-j" to
remove the directory name.

Bug: 286381070
Test: m dist out/dist/boot.zip (on udc-dev)
Change-Id: I769de5194b5716f05e5352f4efd635a70ba0b891
2023-06-12 11:27:46 +01:00
Jiakai Zhang
3d58caa11b Merge "Add mainline extension and METADATA.txt to boot.zip." 2023-06-12 09:02:46 +00:00
Joe Onorato
d5eb7a6d28 Merge changes from topic "aosp_starlark_release_config"
* changes:
  Make RELEASE_PLATFORM_VERSION a release config flag to set platform version.
  Clean up the API for release config in starlark
2023-06-12 02:27:16 +00:00
Joe Onorato
6d7afa00e3 Make RELEASE_PLATFORM_VERSION a release config flag to set platform version.
Bug: 282838389
Test: Treehugger
Merged-In: Ic6dacbdee7d2408aa8b25b4df59bf9bbc566d747
Change-Id: Ie61a7d986c2b8fe2c16117f6678b9e5a71711647
2023-06-11 09:17:43 -07:00
Joe Onorato
d6df20a058 Clean up the API for release config in starlark
Also gets the json summaries working again.

Bug: 283477392
Test: Manual
Merged-In: Iaeb840e96bd7fef2fa1492cb55d9688f7ca75858
Change-Id: I05d9b816ad7ad30c1d238d01df811426d9aeddcb
2023-06-11 07:58:22 -07:00
Joe Onorato
593bef7150 Merge "Define release flags in starlark instead of make" 2023-06-10 03:21:22 +00:00
Florian Mayer
9066ab5240 Merge "Add aosp_arm64_fullmte target" 2023-06-09 23:59:52 +00:00
Treehugger Robot
54066e8ddf Merge "Copy built images to generate target_files.zip" 2023-06-09 22:32:40 +00:00
Joe Onorato
ed1e3b50f3 Merge "Fix build breakage" 2023-06-09 20:57:36 +00:00
Joe Onorato
8b51859317 Fix build breakage
error: build/make/tools/aconfig/Android.bp:69:1: module "aconfig.test.java" variant "android_common": path dependency ":aconfig.test.flags{.srcjar}": unsupported device_config_definitions module reference tag ".srcjar"

Test: m aconfig.test.java
Change-Id: I3df980b06796c90dafee3940fe52809748305950
2023-06-09 13:39:41 -07:00
Cole Faust
386b3746ce Define release flags in starlark instead of make
So that we have a more restricted enviornment for this new configuration
axis that can also be imported into other tools more easily.

Test: Manually (this time also tested setting OUT_DIR outside of the tree)
Change-Id: I01d90e06e45cba756156af16f63e04f575877263
2023-06-09 13:10:05 -07:00
Treehugger Robot
df2af7c840 Merge "Supply apex_info.pb as parameter to delta_generator if file exists" 2023-06-09 19:23:31 +00:00
Florian Mayer
0352c44ab3 Add aosp_arm64_fullmte target
Test: lunch aosp_arm64_fullmte && m
Test: llvm-readelf -a out/target/product/generic_arm64/system/bin/toybox
  Memtag Android Note:
      Tagging Mode: SYNC
      Heap: Enabled
      Stack: Enabled

Bug: 271768933
Bug: 286415307
Change-Id: I2a1ac78be551d50be9bf6c4ffc8667de4ef7ce8e
2023-06-09 18:17:47 +00:00
Jiakai Zhang
a5551c5d91 Add mainline extension and METADATA.txt to boot.zip.
Contents of METADATA.txt:

booclasspath = dex_bootjars_input/core-oj.jar:dex_bootjars_input/core-libart.jar:dex_bootjars_input/okhttp.jar:dex_bootjars_input/bouncycastle.jar:dex_bootjars_input/apache-xml.jar:dex_bootjars_input/framework.jar:dex_bootjars_input/framework-graphics.jar:dex_bootjars_input/ext.jar:dex_bootjars_input/telephony-common.jar:dex_bootjars_input/voip-common.jar:dex_bootjars_input/ims-common.jar:dex_bootjars_input/core-icu4j.jar:apex_bootjars/framework-adservices.jar:apex_bootjars/framework-sdksandbox.jar:apex_bootjars/framework-appsearch.jar:apex_bootjars/framework-bluetooth.jar:apex_bootjars/conscrypt.jar:apex_bootjars/android.net.ipsec.ike.jar:apex_bootjars/updatable-media.jar:apex_bootjars/framework-mediaprovider.jar:apex_bootjars/framework-ondevicepersonalization.jar:apex_bootjars/framework-statsd.jar:apex_bootjars/framework-permission.jar:apex_bootjars/framework-permission-s.jar:apex_bootjars/framework-scheduling.jar:apex_bootjars/framework-sdkextensions.jar:apex_bootjars/framework-connectivity.jar:apex_bootjars/framework-connectivity-t.jar:apex_bootjars/framework-tethering.jar:apex_bootjars/framework-uwb.jar:apex_bootjars/framework-virtualization.jar:apex_bootjars/framework-wifi.jar
booclasspath-locations = /apex/com.android.art/javalib/core-oj.jar:/apex/com.android.art/javalib/core-libart.jar:/apex/com.android.art/javalib/okhttp.jar:/apex/com.android.art/javalib/bouncycastle.jar:/apex/com.android.art/javalib/apache-xml.jar:/system/framework/framework.jar:/system/framework/framework-graphics.jar:/system/framework/ext.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/ims-common.jar:/apex/com.android.i18n/javalib/core-icu4j.jar:/apex/com.android.adservices/javalib/framework-adservices.jar:/apex/com.android.adservices/javalib/framework-sdksandbox.jar:/apex/com.android.appsearch/javalib/framework-appsearch.jar:/apex/com.android.btservices/javalib/framework-bluetooth.jar:/apex/com.android.conscrypt/javalib/conscrypt.jar:/apex/com.android.ipsec/javalib/android.net.ipsec.ike.jar:/apex/com.android.media/javalib/updatable-media.jar:/apex/com.android.mediaprovider/javalib/framework-mediaprovider.jar:/apex/com.android.ondevicepersonalization/javalib/framework-ondevicepersonalization.jar:/apex/com.android.os.statsd/javalib/framework-statsd.jar:/apex/com.android.permission/javalib/framework-permission.jar:/apex/com.android.permission/javalib/framework-permission-s.jar:/apex/com.android.scheduling/javalib/framework-scheduling.jar:/apex/com.android.sdkext/javalib/framework-sdkextensions.jar:/apex/com.android.tethering/javalib/framework-connectivity.jar:/apex/com.android.tethering/javalib/framework-connectivity-t.jar:/apex/com.android.tethering/javalib/framework-tethering.jar:/apex/com.android.uwb/javalib/framework-uwb.jar:/apex/com.android.virt/javalib/framework-virtualization.jar:/apex/com.android.wifi/javalib/framework-wifi.jar
boot-image = system/framework/boot.art:system/framework/boot-framework-adservices.art

Bug: 286381070
Test: m dist out/dist/boot.zip
Change-Id: I258479ffbdf199091290b074329ff1b43db2e669
2023-06-09 17:56:31 +01:00
Zhi Dou
1120cb8aa4 Merge "aconfig: add Java integration tests" 2023-06-09 13:36:25 +00:00
Håkan Kvist
ddb968dce0 Supply apex_info.pb as parameter to delta_generator if file exists
Supply generator with parameter --apex_info_file=META/apex_info.pb
if the file exists.

This ensures that apex_info is included in payload header.

This is identical to the behaviour of brillo_update_payload
which is not being used since:
Invoke delta_generator directly
fcd731e3d6

Issue: 286253576
Test: Manual, confirm that apex_info is included in payload header
Change-Id: Ic096c5f8966beec8686f918aba462c955290a6c5
2023-06-09 12:46:58 +02:00
Mårten Kongstad
9c59c31499 aconfig: add Java integration tests
Add integration tests for Java. This test setup verifies that

  - the build system calls aconfig to generate a Java library
  - the Java test compiles against the auto-generated library
  - the auto-generated code returns expected values

Similar integration tests for C++ and Rust will be added in follow-up
CLs.

Note: the build does not currently support specifying that
tests/*.values should be applied, so the test flags will all be assigned
the defaults. A later CL will fix this.

Bug: b/283911467
Test: atest aconfig.test aconfig.test.java
Change-Id: Ia365e209261f4935a23e2dac9ef0ab5b60f76e52
2023-06-09 09:59:21 +02:00