Commit Graph

517 Commits

Author SHA1 Message Date
Colin Cross
1f75cdf980 Use rsp for kotlin classpath
Support long classpaths by passing the classpath in a file to the script
that generates build.xml.

Bug: 308016794
Test: builds
Flag: EXEMPT refactor
Change-Id: Ib238a83a26acba7ede8e55298397dbeb9a57a866
2024-08-07 14:11:43 -07:00
Inseob Kim
acf9174120 Add system_ext support to build_prop module
As some partitions have build.prop under etc/, this change adds
relative_install_path property to build_prop module. Also this change
adds system_ext related Soong variables and system_ext support in
gen_build_prop.py.

Bug: 322090587
Test: build and compare system_ext/etc/build.prop
Change-Id: I416662b8bae09383af0cdd3d8444a5c300006b7b
2024-08-05 12:51:05 +09:00
Inseob Kim
81e60c9c0b Merge changes from topic "revert-3200273-revert-3196490-revert-3195812-revert-3195644-revert-3195637-revert-3184480-system_build_prop_soong-BZIDUTEOOC-KRUETCBWUR-TUHZPHUVFJ-XYILSUPUOA-PCKYAVELZP-XOXPVYPSBJ" into main
* changes:
  Revert^6 "Use Soong-built system/build.prop"
  Revert^6 "Sync gen_build_prop.py to sysprop.mk"
  Revert^2 "Conditionally pass kernel version to build.prop"
  Revert^6 "Add TARGET_SYSTEM_PROP to system build.prop"
  Revert "Revert "Revert^2 "Set output for build_prop even on Soon..."
2024-08-01 00:02:58 +00:00
Inseob Kim
bc4ef22b9b Revert^6 "Use Soong-built system/build.prop"
d5a12721b5

Change-Id: I6f4bf3043e73763b047bec3303f1547ec647d12b
2024-07-31 02:18:22 +00:00
Inseob Kim
2887482f0f Revert^6 "Sync gen_build_prop.py to sysprop.mk"
This reverts commit 7b7593968b.

Reason for revert: fixed breakage with aosp/3200730, verified with ABTD

Change-Id: I83a4cb1a39bce1a1da8fabd49c6c895862a6c686
2024-07-31 02:18:07 +00:00
Liana Kazanova
7b7593968b Revert^5 "Sync gen_build_prop.py to sysprop.mk"
2c7e13ea37

Change-Id: Ic1fd9ec4d65b657fb80a3849539e286934111d3c
2024-07-30 23:23:28 +00:00
Liana Kazanova
d5a12721b5 Revert^5 "Use Soong-built system/build.prop"
45ed4c2f9c

Change-Id: I574f29539d58239cd3f0e1ba6ae86e1b5d0f55ea
2024-07-30 23:22:51 +00:00
Inseob Kim
60f2636903 Fix build thumbprint in gen_build_prop.py
Bug: 356297315
Test: TH and ABTD
Change-Id: I28bccbbafbf9bcdf45a58361e37435b8d74d7464
2024-07-31 08:00:34 +09:00
Inseob Kim
e1234e51b8 Merge changes from topic "revert-3195812-revert-3195644-revert-3195637-revert-3184480-system_build_prop_soong-BZIDUTEOOC-KRUETCBWUR-TUHZPHUVFJ-XYILSUPUOA" into main
* changes:
  Conditionally pass kernel version to build.prop
  Revert^4 "Use Soong-built system/build.prop"
  Revert^4 "Sync gen_build_prop.py to sysprop.mk"
  Revert^4 "Add TARGET_SYSTEM_PROP to system build.prop"
  Revert^2 "Set output for build_prop even on Soong only build"
2024-07-30 03:51:03 +00:00
Rashid Zaman
3bd28705f4 Fix presigned apk check for privileged apps
The validation checks that run for presigned apps currently expect that
privileged apps have uncompressed dex files but if
DONT_UNCOMPRESS_PRIV_APPS_DEXS is true (UncompressPrivAppDex false) this
doesn't have to be the case so make the validation consistent with this.
Also make TestAndroidAppImport_Preprocessed verify that extra arguments
to 'check_prebuilt_presigned_apk.py' are correct for both privileged and
non-privileged apps.

Test: m nothing --no-skip-soong-tests
Test: Add presigned, privileged android_app_import module with
compressed dex to PRODUCT_PACKAGES for aosp_cf_x86_64_phone,
lunch aosp_cf_x86_64_phone-trunk_staging-userdebug &&
m DONT_UNCOMPRESS_PRIV_APPS_DEXS=true no longer fails due to validation
error.

Change-Id: I7e22cf525cd9d99d1ecb24e4e2e99c3f9de48146
2024-07-25 12:04:26 -07:00
Inseob Kim
45ed4c2f9c Revert^4 "Use Soong-built system/build.prop"
ea04e564c2

Change-Id: I621be841ba5715479e321537866f8b3a880da397
2024-07-25 10:58:08 +00:00
Inseob Kim
2c7e13ea37 Revert^4 "Sync gen_build_prop.py to sysprop.mk"
c13856eb1d

Change-Id: I4af6737c9d96821b524e34f271e92b610430a8d4
2024-07-25 10:58:08 +00:00
Pechetty Sravani (xWF)
c13856eb1d Revert^3 "Sync gen_build_prop.py to sysprop.mk"
e176dc9ee2

Change-Id: I8cf265281ff16ad65d1fe8d6084a6fd49adc294c
2024-07-25 09:21:09 +00:00
Pechetty Sravani (xWF)
ea04e564c2 Revert^3 "Use Soong-built system/build.prop"
625f66136d

Change-Id: I69b09646fb3286dcc5df638f87625f4eb8dcfcb2
2024-07-25 09:21:09 +00:00
Inseob Kim
625f66136d Revert^2 "Use Soong-built system/build.prop"
3ef9ed9848

Change-Id: I132ea8c2feabedc8b5e9bb8c0adb8f0995b9a2ec
2024-07-25 03:27:49 +00:00
Inseob Kim
e176dc9ee2 Revert^2 "Sync gen_build_prop.py to sysprop.mk"
0e7cde59c8

Change-Id: If8b60802c8bdc62689d8939d5efa9007ad814d85
2024-07-25 03:27:49 +00:00
Inseob Kim
0e7cde59c8 Revert "Sync gen_build_prop.py to sysprop.mk"
Revert submission 3184480-system_build_prop_soong

Reason for revert: breaks ndk and mainline build 

Reverted changes: /q/submissionid:3184480-system_build_prop_soong

Change-Id: I833aacf23bbe7cd16b6aad0b7d94a9b46a8192e4
2024-07-25 02:45:53 +00:00
Inseob Kim
3ef9ed9848 Revert "Use Soong-built system/build.prop"
Revert submission 3184480-system_build_prop_soong

Reason for revert: breaks ndk and mainline build 

Reverted changes: /q/submissionid:3184480-system_build_prop_soong

Change-Id: I1738cc0a85428d3fd0a0ee196fa6d54270e6f1ec
2024-07-25 02:45:53 +00:00
Inseob Kim
361baadba6 Use Soong-built system/build.prop
buildinfo.prop is also removed since it's now obsolete.

Bug: 322090587
Test: boot
Test: compare build.prop before and after
Change-Id: Ida7bab82add6e86e1076061a5fcdb572cedd1578
2024-07-24 17:20:22 +09:00
Inseob Kim
19fd1316b7 Sync gen_build_prop.py to sysprop.mk
Also fixes a bug on an if clause.

Bug: 322090587
Test: build and compare both build.prop files
Change-Id: Id0dfba98f5cd67c939594554b470e7fad9cfd518
2024-07-24 15:53:54 +09:00
Treehugger Robot
66884937f8 Merge "Fix DISPLAY_BUILD_NUMBER" into main 2024-07-19 01:25:17 +00:00
Inseob Kim
51d3a6d2d3 Fix DISPLAY_BUILD_NUMBER
The dot was accidentally removed.

Bug: 353425495
Test: build
Change-Id: Id0c08f3c98d5b2f56e49180baf98bb8847f6bebd
2024-07-19 09:26:36 +09:00
Sorin Basca
6b805b9384 Update run-ckati.sh to use JDK 21
Bug: 342332820
Change-Id: Id6dd630a78ac790e682f6c839b6ab26cc3a5671b
Test: TH
2024-07-18 09:39:00 +00:00
Justin Yun
ac4a727793 Fix build error for gen_build_prop.py
Provided undefined constants and imports.

Bug: 346214958
Test: Define "PRODUCT_DEFAULT_DEV_CERTIFICATE := \
                 build/make/target/product/security/testkey" and
      m aosp_cf_system_x86_64
Change-Id: Ic65f059fe87a997a9be695ebf13dfde2d2c6f82c
2024-07-03 13:34:29 +09:00
Inseob Kim
5a994c7e9c Fix a bug that BUILD_VERSION_TAGS is ignored
Bug: 349046347
Test: set BUILD_VERSION_TAGS and build
Change-Id: Ib981d917435d23139ac0c5b0aba5b6893539d200
2024-06-26 10:30:21 +09:00
Victor Chang
abf841134f Merge "Allow java, java. and jdk.* package_allowed_list.txt." into main 2024-06-20 09:32:44 +00:00
Victor Chang
9fc907642b Merge "Allow jdk.internal.event / .vm in the boot image" into main 2024-06-20 08:48:26 +00:00
Inseob Kim
2da72af53a Add build_prop soong module
build_prop is a soong module generating {partition}/build.prop. It's
ported from build/make/core/sysprop.mk and will replace sysprop.mk in
the future. Currently used only by Android.bp cuttlefish system image.

Bug: 322090587
Bug: 346214958
Test: compare system/build.prop and aosp_cf_x86_64_system-build.prop for
      eng / user / userdebug
Change-Id: Iad76139fe86ec4f582218c185aa15baeacaa38dc
2024-06-19 10:42:07 +09:00
Jiakai Zhang
a66c2c5b9b Allow java, java. and jdk.* package_allowed_list.txt.
It avoids modifying this allowlist  when adding new packages into
core-oj.jar in the future.

(cherry-picked from f2fc54ff58b371872c357c33bd66b4b7ec7afe0e)

Bug: 346996451
Test: m
Merged-In: Iaf99efe73a3f9a43323d4c22238786db98993990
Merged-In: Icb208bb235f9c6ac97492c54c32a3174982756ae
Change-Id: Iaf99efe73a3f9a43323d4c22238786db98993990
2024-06-18 15:38:58 +01:00
Inseob Kim
1d9148244f Use product_config from buildinfo_prop module
Many parameters can be migrated to product_config module. This is also a
PoC, which is helpful for future build.prop migration.

Bug: 346214955
Test: compare buildinfo.prop before and after
Change-Id: I751220b3a09583e469ae721c0e49a1909b6428d7
2024-06-18 09:56:53 +09:00
Inseob Kim
58c802f8e3 Add product_config module
product_config module will export productVariables struct (defined in
android/variable.go). Other modules can depend on product_Config module
to read product variables, without needing to update Soong.

Bug: 346214955
Test: build and see output of product_config module
Change-Id: I06e1d2716dc2a8b90984bb46c5fc901cd1ca5020
2024-06-18 09:56:45 +09:00
Victor Chang
78ba397272 Allow jdk.internal.event / .vm in the boot image
Bug: 346542404
Test: m out/soong/boot-jars-package-check/stamp
Change-Id: I5ae8d4ff5aec1586c9090b8629d03237a5549295
2024-06-17 15:19:03 +01:00
Treehugger Robot
e8cb9178ec Merge changes I5645ddb9,Ib3d50f15,Ib4c5815a,If3b63706 into main
* changes:
  Revert "Revert^2 "Always embed jni libs and store uncompressed""
  Revert "Revert "Revert "Collect transitve deps of jni libs only for bund...""
  Revert "Add SkipToTransitiveDepsTag interface for dependency tags"
  Revert "Install transitive deps of jni libs, but not the jni libs themselves"
2024-05-14 20:16:05 +00:00
Jiyong Park
d044bb40da Revert "Revert^2 "Always embed jni libs and store uncompressed""
This reverts commit 20df11ef2b.

Change-Id: I5645ddb9e0d2c0873916a9192aa3cfbc967fc2cc
2024-05-15 03:32:26 +09:00
Treehugger Robot
82d7cdc547 Merge "Add the primary file to EXTRA_INSTALL_ZIPS" into main 2024-05-13 22:56:45 +00:00
Cole Faust
07c4537424 Add the primary file to EXTRA_INSTALL_ZIPS
Make needs to know the primary file, because the zip is only extracted
when the primary file is installed.

Bug: 337869220
Test: m out/target/product/emu64x/obj/PACKAGING/system_intermediates/file_list.txt and checking it for the extra NetworkStackGoogle apks, with a local NetworkStackGoogle android_app_set added into the tree
Change-Id: I5cb7243d214f4730e3f9efb6746793f3bf4b8214
2024-05-13 11:04:18 -07:00
Jiyong Park
b544a8b9ec Merge changes from topic "reland_embedded_jni" into main
* changes:
  Install transitive deps of jni libs, but not the jni libs themselves
  Add SkipToTransitiveDepsTag interface for dependency tags
  Revert "Revert "Collect transitve deps of jni libs only for bund..."
  Revert^2 "Always embed jni libs and store uncompressed"
2024-05-10 22:53:08 +00:00
Cole Faust
99bec75197 Create EXTRA_INSTALL_ZIPS variable
Make needs to know about the "extra" zip files that are extracted
to the staging directories so that it can track all the installed files
correctly.

Also add a utility tool for listing the contents of relevant zips.

Bug: 337869220
Test: m droid and checked the contents of file_list.txt when adding an android_app_set locally
Change-Id: Idc5dd785b03c05f7972c66620d4e6359892b3863
2024-05-09 14:20:11 -07:00
Jiyong Park
20df11ef2b Revert^2 "Always embed jni libs and store uncompressed"
a71b90cf81

Change-Id: I1c071c5449fa04adb14d17774f882e6adbff196b
2024-05-10 06:12:54 +09:00
Cole Faust
dfcb5c515b Remove embedded_launcher: true usages
The default value for embedded_launcher has been changed to true.

Bug: 174041232
Test: Presubmits
Change-Id: I2fb4b920828307e60c0fae6864ba720c7c31e1f2
2024-05-08 12:13:38 -07:00
Treehugger Robot
d02d710570 Merge changes from topic "revert-3075263-MMTOVXSVUO" into main
* changes:
  Revert "Always embed jni libs and store uncompressed"
  Revert "Collect transitve deps of jni libs only for bundled apps"
2024-05-08 09:48:24 +00:00
Sam Chiu
a71b90cf81 Revert "Always embed jni libs and store uncompressed"
Revert submission 3075263

Reason for revert: verifying the test failure b/339332424

Reverted changes: /q/submissionid:3075263

Change-Id: I0e1a526893ee6c591eaefadcee4bbbf321dfc1df
2024-05-08 06:49:33 +00:00
Jiyong Park
14f7714fb4 Merge changes Ie866b192,I7df993ea into main
* changes:
  Collect transitve deps of jni libs only for bundled apps
  Always embed jni libs and store uncompressed
2024-05-08 01:28:45 +00:00
Treehugger Robot
4123b9aa88 Merge "Fix reference unknown variable 'file'" into main 2024-05-05 21:21:21 +00:00
Cole Faust
a5a1fa1d09 Fix reference unknown variable 'file'
Also log the rspfile for easier debugging.

Bug: 318434287
Test: Presubmits
Change-Id: I4ef6f2065a39ce6fef816f7241d079149043ffd0
2024-05-04 18:09:43 -07:00
Jiyong Park
3eea67d8eb Always embed jni libs and store uncompressed
Previously, unlike unbundled apps, if a platform app depends on a native
library, it is not embedded in the app, but installed to <partition>/lib
and the app is instead provided with a symlink to the lib. This actualy
is a legacy from the original Android where native libraries couldn't be
executed while embedded in the apk. To be executed, the native libs had
to be extracted to a mutable storage, but that had a risk of breaking
the verified boot, so libs couldn't be embedded.

Since API level 23, execute-in-place of native libs has become
possible. But platform apps had to opt-in (use_embedded_native_libs:
true) for the feature for a reason that is unclear today. Perhaps, it
was to save disk space in case when multiple apps share the same native
library, but such cases are found to be very rare, or non-existing.

With this CL, two changes are introduced:

1. jni libs are always embededd for all apps (bundled or unbundled)

2. use_embedded_native_libs is deprecated unless the module type is
   android_test or android_test_helper_app. It is now a
   no-op property. It's left just to not break existing bp files.

This will make unbundled apps bigger, but given that unbundled apps
built using android platform build system are tests, the size increase
should be acceptible.

Bug: 330276359
Test: m
Change-Id: I7df993ea85bce1c0a7222000c403a974818c3362
2024-05-04 01:58:09 +09:00
Colin Cross
55f169abaa Raise test timeout when running soong tests with race detector
The apex tests sometimes hit the default 10 minute timeout when running
with the race detector enabled in the aosp-build-tools builds.

Test: treehugger
Flag: NONE
Change-Id: I6092a0c68c3b79cd24cdd4a6a8614f7eced7dc1a
2024-05-01 15:25:37 -07:00
Jiakai Zhang
f98da19a07 Refactor the contruction of the manifest check inputs.
This is a no-op change for a majority of cases.

Before this change, the contruction of the manifest check inputs is
confusing. It mutates uses_libs properties in place just for the
manifest check, by replacing module names with library names for
direct dependencies and merging library names from CLC for both direct
denpendencies and transitive denpendencies, and then constructs manifest
check inputs from those mutated uses_libs properties. This is
error-prone and leads to insistency: the goal is to check that the CLC
matches the manifest, but the inputs to the check don't reflect the CLC.

After this change, we no longer mutate uses_libs properties in place.
Instead, we maintain a separate list of missing denpendencies, and then
construct manifest check inputs directly from the CLC for all existing
libraries, no matter they are direct or transtive, and from the separate
list of missing libraries. This change makes the logic more
consistent and straightforward, and it also allows us to easily do the
next change, which is to propagate transtive missing denpendencies.

In fact, this change revealed several bugs around library optionality
and order in CLC construction, and fixed them.

Bug: 331528424
Test: m --no-skip-soong-tests
Ignore-AOSP-First: Depends on internal changes. Will cherry-pick once merged.
Merged-In: I0de82e76c47995b54aba9efd41538d950256a95f
Change-Id: I0de82e76c47995b54aba9efd41538d950256a95f
2024-04-15 11:15:41 +00:00
Inseob Kim
8fa54dab08 Reland "Migrate buildinfo.sh script into Soong"
To build system.img in Soong, we need all artifacts including
build.prop. This fully migrates buildinfo.prop file into Soong as a
first step to build build.prop on Soong.

This fixes an error caused by an incorrect path to build thumbprint
file.

Bug: 322090587
Test: compare build.prop before and after
Test: build multiple times and see build.prop isn't rebuilt
Change-Id: Id4fa830009538856c30825ff47268b11fa6cb5d6
2024-03-27 14:18:45 +09:00
Gina Ko
465549b579 Revert "Migrate buildinfo.sh script into Soong"
Revert submission 3004875-buildinfo_prop_soong

Reason for revert: DroidMonitor-triggered revert due to breakage b/331462869

Reverted changes: /q/submissionid:3004875-buildinfo_prop_soong

Bug: 331462869
Change-Id: Ib8bbbad29a4ad7b800e6bd1a67a401c2225b78cb
2024-03-26 22:46:11 +00:00