Commit Graph

9553 Commits

Author SHA1 Message Date
Hieu Nguyen
5ebc4febe6 Fix problem of RepackApexPayload when using option --signing_args
The apex_util -> deapexer transition still passes signing args in as 1
huge string, just without the double qoutes. Once deapexer receives
the arugment, deapexer would attempt to shlex it, but double
quotes prevents proper shlexing, hence remove the double quotes.
As we added to log to monitor args parser when run apexer from
RepackApexPayload

2024-07-30 12:42:03 - common.py - INFO    :   Individual args list:
['/home/hieu/aosp/out/host/linux-x86/bin/apexer', '--force',
'--payload_only', '--do_not_check_keyname', '--apexer_tool_path',
'/home/hieu/aosp/out/host/linux-x86/bin:/home/hieu/aosp/out/host/linux-x86/bin:/home/hieu/aosp/out/host/linux-x86/bin:/home/hieu/aosp/prebuilts/clang/host/linux-x86/llvm-binutils-stable:/home/hieu/aosp/prebuilts/asuite/acloud/linux-x86:/home/hieu/aosp/prebuilts/asuite/aidegen/linux-x86:/home/hieu/aosp/prebuilts/asuite/atest/linux-x86:/home/hieu/aosp/prebuilts/jdk/jdk17/linux-x86/bin:/home/hieu/aosp/build/bazel/bin:/home/hieu/aosp/development/scripts:/home/hieu/aosp/prebuilts/devtools/tools:/home/hieu/aosp/prebuilts/misc/linux-x86/dtc:/home/hieu/aosp/prebuilts/misc/linux-x86/libufdt:/home/hieu/aosp/prebuilts/android-emulator/linux-x86_64:/home/hieu/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program Files/WindowsApps/MicrosoftCorporationII.WindowsSubsystemForLinux_2.2.4.0_x64__8wekyb3d8bbwe:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files/7-Zip:/mnt/c/Users/hnguy140/AppData/Local/Microsoft/WindowsApps:/snap/bin', '--manifest', '/tmp/tmpjk8as91m/apex_manifest.pb', '--build_info', '/tmp/tmpjk8as91m/apex_build_info.pb',
'--key', 'key_dir/avb.pem',
'--signing_args', '--signing_helper_with_files external/fnv/production-sign-tools/production-signing-scripts/IVIMB/signing_helper/avb_signing_helper.py',
'/tmp/tmpji2gvei4', '/tmp/tmpjk8as91m/apex_payload.img', '-v']

As monitor from the above log '--signing_helper_with_files
.../avb_signing_helper.py' is considered as a single argument which make
apexer to be confused. The correct ways of parsing arguments is
'--signing_helper_with_files' and '.../avb_signing_helper' should be
separate to 2 arguments instead merge it as one like current
implementation.

Change-Id: I913b6b3f2ff03d8ce2333b1c2c38178967766778
Signed-off-by: Hieu Nguyen <hnguy140@ford.com>
2024-08-16 17:43:08 +00:00
Jihoon Kang
0c26850dba Merge "Specify is_stubs_module property in selected aconfig library modules" into main 2024-08-15 16:45:16 +00:00
Jihoon Kang
48f2b22b45 Specify is_stubs_module property in selected aconfig library modules
"fake_device_config" and "strict_mode_stub" provide stubs and do not
contain any implementation details. Specifying the property
"is_stubs_module" to these modules allow inter-container dependency on
these modules.

Test: m nothing
Bug: 354029496
Change-Id: Ia65ad36ca02c0594fc753935f9cc7c0af6caa20d
2024-08-14 22:23:08 +00:00
JaeMan Park
b3795b7933 Fix build error while creating CHD image
While building CHD image, it failed with the error

KeyError: 'system_dlkm_base_fs_file'

Fix the build error by deleting proper props in the python code.

Bug: 359578756
Test: Building CHD image using build_cf_hybrid_device.py should not failed
Change-Id: Iae84ff080b8f6bf3b8d22b26865ea3e74815ac37
2024-08-14 14:11:15 +09:00
Treehugger Robot
bdaf14f9e2 Merge "Only read the use_new_storage_value flag once per process." into main 2024-08-13 19:02:08 +00:00
Ted Bauer
f51e1dd28d Only read the use_new_storage_value flag once per process.
Change-Id: Ib088fbcc2283718a309097c7c45fb01d5a983a25
Test: m
Bug: 312235596
2024-08-13 17:16:04 +00:00
Jooyung Han
67911682c2 target-files: Support erofs_compress_hints
erofs_compress_hints files should be copied into target-files and then
sign_target_files_apks should use them from the target-files.

Bug: 357721652
Test: m target-files-package (with aosp/3204257)
Test: sign_target_files_apks <target_file> signed-target-files.zip
Change-Id: Id55000004ecb72ea8fec19bfbe144c9b4d3f06cb
2024-08-09 08:27:19 +09:00
Zhi Dou
8ee1a5b785 DO NOT MERGE: manually cherry pick
Change-Id: I47b6d783f32b7c260dd806898ed880901b5f784b
Test: presubmit
Bug: n/a
2024-08-07 18:51:23 +00:00
Treehugger Robot
70270692d0 Merge "Read from new storage in Java codegen" into main 2024-08-06 21:16:42 +00:00
Ted Bauer
06560bed93 Read from new storage in Java codegen
Change-Id: I8baa089f37dcc496096e124d605f08727647053c
Test: m
Bug: 312235596
2024-08-06 19:34:33 +00:00
Zhi Dou
f5f5992893 change thread policy to allow read disk
Bug: 356614910
Test: presubmit
Change-Id: I65cc2cbd5e17b1ee93e64d8b20e53c42547c985a
2024-08-06 18:58:45 +00:00
Zhi Dou
8af83ccd50 change fileinputstream to filechannel
The restrict mode doesn't allow to have disk read from main thread. Some
apps enabled this check. The code in the dependencies of the
fileinputstream. This chagne switch to filechannel.

Test: presubmit
Bug: 356614910
Change-Id: Icf2175fe75ed1bfad4a048ead680b08e57d6c2ca
2024-08-03 00:08:40 +00:00
Yurii Zubrytskyi
7575d3f967 Merge "Revert^2 "Fix signing failure for split APKs"" into main 2024-08-01 15:59:31 +00:00
ELIYAZ MOMIN
10e47e3723 Revert^2 "Fix signing failure for split APKs"
This reverts commit d06e5a83ba.

Reason for revert: <It's not a culprit any more.>

Change-Id: I405c418e6da88774b174fcb3508eb54039fbdf8e
2024-08-01 15:43:31 +00:00
Treehugger Robot
80a07d6870 Merge "Added a basic prober script to test code completion." into main 2024-08-01 12:00:01 +00:00
ELIYAZ MOMIN
8a3f6256fc Merge "Revert "Fix signing failure for split APKs"" into main 2024-08-01 10:19:11 +00:00
Ilshat Aliyev
8e13493d4d Added a basic prober script to test code completion.
Run tests locally

Change-Id: Id8b8b6b4d9b1fae9d7cd5f04a20c239628351b16
2024-08-01 08:11:45 +00:00
Pechetty Sravani (xWF)
d06e5a83ba Revert "Fix signing failure for split APKs"
This reverts commit 6871779d9b.

Reason for revert: Potential culprit for b/356752725- verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Change-Id: I4c29b27f0318901130036dbe8ab9edef37f08875
2024-08-01 05:54:13 +00:00
Treehugger Robot
787d933f87 Merge "Fix signing failure for split APKs" into main 2024-07-31 21:06:37 +00:00
Kelvin Zhang
6871779d9b Fix signing failure for split APKs
Test: th
Bug: 353837347
Change-Id: Ifed9746c1e1d053a97860de3bab4380d6e207412
2024-07-31 10:36:47 -07:00
Zhi Dou
3d960c5638 Merge "aconfig: make java cached indicator volatile" into main 2024-07-30 23:35:45 +00:00
Zhi Dou
97d02148b9 close file stream
Close file stream, since the in the restrict mode the runtime will check
whether all the resource is closed when it is out of scope.

Test: ABTD ImsStackJavaTests
Bug: 349874828
Change-Id: Ib297622bae730bf99e4d5d1b3adeff3fee805a93
2024-07-30 19:05:14 +00:00
Zhi Dou
36589bc318 aconfig: make java cached indicator volatile
Test: atest aconfig.test.java
Bug: 356201402
Change-Id: I1127a4092536fe199f4a7256dea0c2b289e837da
2024-07-30 18:21:43 +00:00
Zhi Dou
5228a6f4a2 Merge "read new stoarge based on flag value" into main 2024-07-29 13:26:35 +00:00
Zhi Dou
66ff40c08a read new stoarge based on flag value
This change changes the logic to read the flag value from new storage.
Before it check the existence of a file. Not it will directly check the
flag value from DeviceConfig.

Test: m and presubmit
Bug: 349874828
Change-Id: I4a360564a3b48564057eede9bd893899136b3221
2024-07-26 22:46:47 +00:00
Zhi Dou
8add8e0c9b use smart pointer for fd
Test: presubmit
Bug: 348693143
Change-Id: Ibdb1e132a4840d0c3d82aa5f7546a0fc5f5f528b
2024-07-26 22:25:43 +00:00
Zhi Dou
0e5e128034 add sdk none version for core lib usage
Test: m
Bug: 349874828
Change-Id: I412bcf06ca38c862b026715a6a394350eda49b64
2024-07-26 14:03:50 +00:00
Wei Li
31964df630 Merge "Add new SBOM generation tool." into main 2024-07-26 00:45:43 +00:00
Zhi Dou
d6b37c1be7 make aconfig_storage_file.test.java use library from framework
Test: atest aconfig_storage_file.test.java
Bug: 349874828
Change-Id: If6fbf086e889a2c0068a1ca22979db39f5d86448
2024-07-25 19:30:13 +00:00
Zhi Dou
fa988f0a34 add hide and unsupportedadppusage annotation to read library
Test: presubmit
Bug: 349874828
Change-Id: I5b808d87fe7df2ba8a85c8c75ee7baa66ff22d6b
2024-07-25 16:56:48 +00:00
Wei Li
a3265ef0a1 Add new SBOM generation tool.
Bug: 324465531
Test: CIs
Test: m soong-sbom
Change-Id: Icfb7a9062158853b85c2de95f678ab164fc3fd90
2024-07-24 22:32:38 -07:00
Zhi Dou
8a9a52d140 Merge "make java reader library availiable for mainline" into main 2024-07-22 13:59:28 +00:00
Zhi Dou
b88c3e638b make java reader library availiable for mainline
Test: atest aconfig.test.java
Bug: 349874828
Change-Id: I2cabfa9665e5c474ba64f5969e96e9dae2fdcb9b
2024-07-19 21:01:27 +00:00
Zhi Dou
1edd4485c6 only use new storage for read write
Test: atest aconfig.test.java
Bug: 349874828
Change-Id: I5af9fa6243b8b8a157f03242e6e5a411ced7be44
2024-07-19 20:37:53 +00:00
Ted Bauer
05fea28d9c feat: show if flag is locally overridden
Bug: 324436145
Test: adb shell aflags list
Change-Id: Id239a760e86e469f77d1e99f7a6f27d54cb87206
2024-07-19 13:11:42 +00:00
Ted Bauer
7e272b8bba Merge "Read from new storage in aflags" into main 2024-07-18 13:32:59 +00:00
Ted Bauer
bbbe092496 Read from new storage in aflags
Bug: 324436145
Test: adb shell aflags list --use-new-storage
Change-Id: Ib615e25bc0bc7f2b0362e286a45ce40ebf21f92d
2024-07-17 18:39:25 +00:00
Paul Duffin
9acbefe223 Use CallableItem in place of MethodItem
The `MethodItem` type represents both a normal method as well as being
the super type of `ConstructorItem`. That organization causes a number
of issues in Metalava and has lead to quite a few issues where code
that only expected to be run on methods and not constructors was run on
both. So, a new type `CallableItem` has been added that will eventually
become the super type of both `MethodItem` and `ConstructorItem` and
`ConstructorItem` will no longer extend `MethodItem`.

This change prepares this code for that change by overriding
`visitCallable(CallableItem)` instead of `visitMethod(MethodItem)`
because the latter is only called for methods not constructors.

Bug: 352481366
Test: atest check-flagged-apis-test
Change-Id: I3039bc0154b00ca57cb48c7447c5901b991b57e5
2024-07-16 13:37:30 +01:00
Inseob Kim
94d502200c Merge changes from topic "cf_system_root_files" into main
* changes:
  Add option to use Soong defined system image
  Add files installed to root to diff allowlist
2024-07-16 04:52:08 +00:00
Inseob Kim
1f3f321967 Add files installed to root to diff allowlist
system.img is built from both $OUT/system and $OUT/root. As the diff
tool doesn't check $OUT/root, this change temporarily adds two files
under root (adb_keys and init.environ.rc) to allowlist. They will be
removed once the diff tool is fixed.

Bug: 351258461
Test: build
Change-Id: I0f24dcae67c72be5619a86f6f025ec8bcb146084
2024-07-16 03:01:26 +00:00
Zhi Dou
9f8ed73934 Change java codegen to read from new storage
This change adds code in java code to read from new storage. However the
generated code won't geneerate code contains code for new storage, since
the build system won't pass `allow-instrumentation` to java codegen.

Test: atest aconfig.test.java
Bug: 349874828
Change-Id: I70983fa97de6633f467d968109d134d46f895a89
2024-07-15 19:08:33 +00:00
Zhi Dou
621323cfda add storage java reader
Test: atest aconfig_storage_read_api.test.java
Bug: 349874828
Change-Id: I4b1d5ccf4d48622a88712b6e8940ffe18e980927
2024-07-12 13:34:12 +00:00
Priyanka Advani
16c8d3c47a Revert "add storage java internal reader"
This reverts commit 70b9ac0ddd.

Reason for revert: Droidmonitor created revert due to build breakages in b/352582602.

Change-Id: I8a8e38ccf3e715e9b4746ac333aed0cc13d11969
2024-07-11 19:59:24 +00:00
Zhi Dou
70b9ac0ddd add storage java internal reader
Test: n/a
Bug: n/a
Change-Id: I852ab4080bee9240549dc4be0c09dbe1f72d06b0
2024-07-11 18:50:46 +00:00
Treehugger Robot
0d18be30ae Merge "fix: make device paths function static" into main 2024-07-11 13:48:51 +00:00
Treehugger Robot
33118a7e83 Merge "Implement storage files in Java" into main 2024-07-10 23:28:37 +00:00
Ted Bauer
ba67436d0d fix: make device paths function static
Bug: 342636474
Test: m
Change-Id: Iea745c39f8ef90543015c365ead4c02ee4ff6653
2024-07-10 23:15:08 +00:00
Zhi Dou
af8a16adf0 Implement storage files in Java
This change implements storage files in java to remove the dependencies
on JNI.

Bug: 352078117
Test: atest aconfig_storage_file.test.java

Change-Id: I34438576d09d0aa31eabc60f472e71cebf1552a0
2024-07-10 22:29:47 +00:00
Michael Merg
11670f3918 Merge "Update ide_query script to new format" into main 2024-07-10 15:33:29 +00:00
Liana Kazanova
d7343203b6 Merge "Revert "Mark FeatureFlags impl member as final"" into main 2024-07-03 18:15:27 +00:00