Commit graph

67616 commits

Author SHA1 Message Date
Bowgo Tsai
60074168da Usee sha256 to build the hashtree in GSI image
The default algorithm is sha1, which shouldn't be used now.
Becaues sha256 is more robust against malicious attacks.

Bug: 187021780
Test: TreeHugger
Change-Id: Ia325f59d09687d6d501d9710cbdd3339d7566c60
2021-05-05 12:27:09 +08:00
Bowgo Tsai
610286a88f Moving debug ramdisk resources under / of the ramdisk
Currently the debug ramdisk resources might be under / or
/first_stage_ramdisk of the ramdisk, and is determined by
some BOARD variables, e.g., BOARD_USES_RECOVERY_AS_BOOT,
BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT, etc.

To make a generic boot-debug.img that can work on both devices,
let's move the debug resources always under / of the ramdisk.

Bug: 186082603
Test: boot a device with boot-debug.img
Test: boot a device with vendor_boot-debug.img
Change-Id: I55dc8ff322f6b97e2d6dc1a4ee5935e863f2f835
2021-04-24 08:55:02 +08:00
Anton Hansson
85c91dcee9 Merge "Set VNDK version to current for module builds" 2021-04-22 12:51:39 +00:00
Colin Cross
37b11b8cfb Merge "Remove module-lib and system-server from TARGET_AVAILABLE_SDK_VERSIONS" 2021-04-21 23:15:40 +00:00
Anton Hansson
e6c0eee673 Merge "Set PRODUCT_SHIPPING_API_LEVEL in module_*" 2021-04-21 14:32:15 +00:00
Anton Hansson
d0871073ab Set PRODUCT_SHIPPING_API_LEVEL in module_*
This setting doesn't really make sense for unbundled builds but does
have the side-effect of turning on "full treble", which in turn is used
by some modules (libhidlbase) to conditionally use some particular -D
when compiling. The media.swcodec does not work without this define.

Bug: 185759877
Bug: 185789027
Test: compare media.swcodec apex build with module_arm64 and aosp_arm64
Change-Id: I1ebeb5f37816d8576a00ab7553cb4e9e1cab8cfa
2021-04-21 14:31:47 +00:00
Anton Hansson
e50287e1b5 Merge "Enable CFI for media module paths in module_*" 2021-04-21 13:29:59 +00:00
Anton Hansson
f7ac2d31d4 Enable CFI for media module paths in module_*
This is a step on the way to make module_arm64 to produce the same
artifacts as aosp_arm64 when building unbundled modules.

Bug: 185765252
Bug: 185789027
Test: compare media.swcodec apex build with module_arm64 and aosp_arm64
Change-Id: I50d29c1d57849fd915dc771bb8e9f028fbe8efcd
2021-04-21 10:19:28 +01:00
Anton Hansson
d7995cc8e7 Set VNDK version to current for module builds
This setting changes which libraries are included in the media.swcodec
apex, and is a step on the way of eliminating the differences when
building between module_arm64 and aosp_arm64.

Bug: 185769808
Bug: 185789027
Test: compare media.swcodec apex build with module_arm64 and aosp_arm64
Change-Id: Iafb0194827f984a7ba108f519016d24b2980e2e1
2021-04-21 09:58:51 +01:00
Treehugger Robot
50a00289ea Merge "Performs basic APEX validation in the merged target files package." 2021-04-20 23:32:31 +00:00
Colin Cross
e85c66ccea Remove module-lib and system-server from TARGET_AVAILABLE_SDK_VERSIONS
module-lib and system-server are not supported in Make, remove them
from TARGET_AVAILABLE_SDK_VERSIONS.

Also replace the hardcoded test_current version with the one found in
the prebuilts.

Fixes: 185903998
Test: get_build_var TARGET_AVAILABLE_SDK_VERSIONS
Change-Id: I745fbcf019092ec27a9903c48fdb95e892c02e3e
2021-04-20 10:18:37 -07:00
Treehugger Robot
f3162034ef Merge "Test changes for build support for test jni_libs" 2021-04-20 12:26:30 +00:00
Martin Stjernholm
215596dd59 Merge "Allow selecting a different product in banchan." 2021-04-20 11:22:00 +00:00
Treehugger Robot
228ef5f05f Merge "Rename ro.product.enforce_debugfs_restrictions" 2021-04-20 06:07:53 +00:00
Daniel Cardenas
68984aa93a Test changes for build support for test jni_libs
Tested with patches:  aosp/1560314  aosp/1560314/

Bug: 176593487
Test: make tvts aapt
Change-Id: I2a2867726cc39758dfb27a0a12867e20e4af56d7
2021-04-19 20:48:02 -07:00
Treehugger Robot
66321c193b Merge "Only allow LOCAL_IS_UNIT_TEST set to ALL_MODULES if defined." 2021-04-20 01:16:45 +00:00
Treehugger Robot
b4863637a2 Merge "Allow PRODUCT_CFI_INCLUDE_PATHS to work with 32-bit builds" 2021-04-19 23:00:57 +00:00
Daniel Norman
e9af70ad68 Performs basic APEX validation in the merged target files package.
Uses apex_utils.GetApexInfoFromTargetFiles to find and parse APEX files
in the target files partition dirs. Raises an error on failure to parse
or duplicate package names.

Bug: 177225446
Test: releasetools_test
Test: Create a merged build that provides the VNDK APEX on both vendor
      and system. Observe failure.
Change-Id: I1356e263b7b32d6063129e079f3ba7ab4ff132a7
2021-04-19 22:31:01 +00:00
Treehugger Robot
9dbecd650f Merge "envsetup: fix indent" 2021-04-19 18:16:08 +00:00
Hridya Valsaraju
31b2e3e388 Rename ro.product.enforce_debugfs_restrictions
Rename ro.product.enforce_debugfs_restrictions appropriately to
ro.product.debugfs_restrictions.enabled as per the sysprop naming
scheme.

Test: build, boot
Bug: 184381659
Change-Id: I65265098caf6382583aa53811f1b3330e58141c0
2021-04-19 17:41:25 +00:00
Martin Stjernholm
2b8d923a09 Allow selecting a different product in banchan.
Necessary since the products used for APEX modules are different in
internal builds.

Test: banchan com.android.art
Test: banchan com.android.art arm
Test: banchan com.android.art art_module_arm
Test: banchan com.android.art module_arm
Test: banchan com.android.art x86_64
Test: banchan com.android.art art_module_x86_64
Bug: 179779520
Change-Id: Ib59a86b70e409537aaad7258465b6874b589b858
2021-04-19 18:32:00 +01:00
Timi
0469c3f91c envsetup: fix indent
Test: . build/envsetup.sh
Change-Id: I829dafc707dc02d5a31899a784f88a367ec95e94
Signed-off-by: Timi <timi.rautamaki@gmail.com>
2021-04-19 17:07:53 +02:00
yangbill
877586c8c8 Only allow LOCAL_IS_UNIT_TEST set to ALL_MODULES if defined.
To prevent the argument be cleaned if the same module name with
different unit_test value, treat it as unit test if one of the module is
treated as unit tests.

Bug: 176096135
Test: m out/target/product/generic/module-info.json
Change-Id: Iee4ee1063d47dcba1aaf915ec9e4e56f8c7df787
2021-04-19 20:34:07 +08:00
Treehugger Robot
2c80511bd6 Merge "Re-raise exceptions instead of sys.exit" 2021-04-17 08:54:19 +00:00
Kelvin Zhang
66ed06fb29 Re-raise exceptions instead of sys.exit
If we call sys.exit(), code in finally block won't be executed.
Test: th

Change-Id: I1f743c9385218742def3b925427942cb1d5bd031
2021-04-16 19:06:00 -04:00
Colin Cross
06b891d2bd Merge "Do not run "mkdir ./" in codebase root directly" 2021-04-16 20:30:27 +00:00
Jimmy Chen
507e84a266 Merge "Fix soong_config handling of CompressedApex" 2021-04-16 09:38:03 +00:00
Anton Hansson
106e11cfe7 Fix soong_config handling of CompressedApex
add_json_bool treats non-empty variable as "true" by default (which is
conventional in make). Fix treatment of PRODUCT_COMPRESSED_APEX to
support the value false.

Bug: 185537646
Test: OVERRIDE_PRODUCT_COMPRESSED_APEX=false m nothing && \
      grep CompressedApex out/soong/soong.variables
Change-Id: I0562a375be377ab67a1d064e37aff5970c4ac8dd
2021-04-16 10:09:58 +01:00
Elvis Chien
064d91c49b Allow PRODUCT_CFI_INCLUDE_PATHS to work with 32-bit builds
CFI has been enabled for 32-bit builds but this option
still only works for 64-bit builds

Bug: 179233410

Change-Id: I3a9fed728489021f6c062ad45082b0a2705cec51
2021-04-16 15:31:55 +08:00
Treehugger Robot
b2233cf162 Merge "Fix bug: repeated restricted effective conditions." 2021-04-15 21:51:20 +00:00
Treehugger Robot
c1817038f9 Merge "Re-raise exceptions instead of sys.exit" 2021-04-15 19:04:57 +00:00
Bob Badour
1f69c4404a Fix bug: repeated restricted effective conditions.
Test: m all
Change-Id: I0fc8f66dd72e3d3983b9d2b5fa7416c09a776ccc
2021-04-15 10:59:40 -07:00
Jaewoong Jung
08eb6d9308 Merge "Add a missing dependency to the prebuilt app rule." 2021-04-15 16:07:40 +00:00
Nikita Ioffe
9f539e2ec0 Merge "Re-land "Enable apex compression on all devices with updatable apex" 2021-04-15 15:45:25 +00:00
Lucas Wei
3df934b8a8 Re-land "Enable apex compression on all devices with updatable apex
This reverts commit f8283a8bf6.

Test: device boots
Test: OTA from uncompressed apexes to compressed apexes works
Bug: 169780183
Bug: 184746992
Bug: 185082717
Change-Id: I62e379f44a1dcf8ebd2b3448dc1381cd99427b45
2021-04-15 15:45:02 +00:00
Ulyana Trafimovich
a43c4ff302 Merge "Regroup conditions related to LOCAL_ENFORCE_USES_LIBRARIES." 2021-04-15 08:23:34 +00:00
Martin Stjernholm
7af86b16fc Merge "Add new user setup command banchan for module building." 2021-04-15 08:19:08 +00:00
Treehugger Robot
214382e048 Merge "Enable GKI 2.0 signing" 2021-04-15 06:08:04 +00:00
Roman Kiryanov
ac46742e38 Merge "Switch emulator targets to use BOARD_BOOT_HEADER_VERSION=4" 2021-04-15 05:47:50 +00:00
Hunter Knepshield
bca0e63125 Merge "Create a new certificate for 2021 CTS UICCs." 2021-04-15 04:18:27 +00:00
Yo Chiang
1d1571e543 Merge "Support building recovery as standalone ramdisk in vendor_boot v4" 2021-04-15 04:02:15 +00:00
Treehugger Robot
99802c7544 Merge "Fix evaluation order of (Cfi|Memtag) exclude paths." 2021-04-15 03:49:38 +00:00
Roman Kiryanov
0a2ef54d3b Switch emulator targets to use BOARD_BOOT_HEADER_VERSION=4
required for androidboot

Bug: 182291166
Test: boot emulator
Signed-off-by: Roman Kiryanov <rkir@google.com>
Change-Id: Ib17f2ec6fb04eb8c7f592ec2a5d6cc886ad783c8
2021-04-14 18:18:08 -07:00
Paul Duffin
4d414336cf Merge "Make sure that BootJars is super set of ArtApexJars" 2021-04-14 21:24:37 +00:00
Hunter Knepshield
06353ef218 Create a new certificate for 2021 CTS UICCs.
This certificate will be used to enforce a clean break between "old" CTS
UICCs and new ones. The new UICCs will have hardware support for new
calculations that the old ones aren't capable of.

Old certificate:
./testkey.x509.pem
SHA-1: 61:ED:37:7E:85:D3:86:A8:DF:EE:6B:86:4B:D8:5B:0B:FA:A5:AF:81
SHA-256: A4:0D:A8:0A:59:D1:70:CA:A9:50:CF:15:C1:8C:45:4D:47:A3:9B:26:98:9D:8B:64:0E:CD:74:5B:A7:1B:F5:DC

New certificate:
./cts_uicc_2021.x509.pem
SHA-1: 06:97:71:39:21:E8:65:D0:1C:45:C4:A8:8D:45:7A:9D:96:F4:39:27
SHA-256: CE:7B:2B:47:AE:2B:75:52:C8:F9:2C:C2:91:24:27:98:83:04:1F:B6:23:A5:F1:94:A8:2C:9B:F1:5D:49:2A:A0

We won't yet submit the change to switch the signature of
CtsCarrierApiTestCases, as that will introduce downstream presubmit and
postsubmit failures until the new hardware is available for device labs.

Bug: 178419755
Test: temporarily switch CtsCarrierApiTestCases to be signed with
cts-uicc-2021-testkey, ensure:
  - Suite fails on a device with the old CTS SIM due to lack of carrier
  privileges
  - Suite passes with updated cuttlefish modem simulator ARF content

Change-Id: I7598426bd3e4db90a8f0d8d80ea03468fb30f876
2021-04-14 14:11:49 -07:00
Paul Duffin
d418e961c8 Make sure that BootJars is super set of ArtApexJars
When constructing the dexpreopt config it will strip out any entries in
ART_APEX_JARS which are not present in PRODUCT_BOOT_JARS and store the
remainder in ArtApexJars.

Bug: 185391652
Test: lunch sdk_phone_x86_vendor && m nothing
      lunch sdk_phone_x86 && m nothing
Change-Id: I403ef9768a8ac2d222bbd6cfd0a68a2019f67c16
2021-04-14 20:35:58 +01:00
Ivan Lozano
1e3771f9ed Merge "Add Rust vendor image support to Make." 2021-04-14 19:02:48 +00:00
Kelvin Zhang
6c17ed3185 Re-raise exceptions instead of sys.exit
Test: th
Change-Id: I3ac343b51eeeaa948712be81b640122f9981137d
2021-04-14 14:59:12 -04:00
Paul Duffin
55e6511331 Merge "Avoid adding jacocoagent to bootclasspath twice" 2021-04-14 18:27:59 +00:00
Paul Duffin
2e046e6c61 Avoid adding jacocoagent to bootclasspath twice
Previously:
* If EMMA_INSTRUMENT_FRAMEWORK=true then jacocoagent was
  added to the ART_APEX_JARS which itself is added to
  PRODUCT_BOOT_JARS.
* If EMMA_INSTRUMENT=true then it was added directly to the
  PRODUCT_BOOT_JARS.
* If both were true then it was added in both places ending up on the
  bootclasspath twice.

Bug: 185369704
Test: m EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true droid
      m droid
Change-Id: Id1d4d1c98455cb2859ed5e4071a0cf14fb40eec4
2021-04-14 17:50:48 +01:00