Commit graph

88769 commits

Author SHA1 Message Date
Andy Hung
4f69c22af9 Merge "debuggerd: dump frozen Java processes" into main 2024-01-16 20:11:26 +00:00
youngtaecha
63da53fdde A new folder to store OTA telephony config update
Bug: 320002105
Test: Build, checked /data/misc/telephonyconfig is system radio

Change-Id: Id8efee15594f372fa6aaf3fe9b9081a3cefe327b
2024-01-13 14:58:58 +00:00
Andy Hung
42f8cd3bf9 debuggerd: dump frozen Java processes
Test: stacks <pid>
Test: adb shell debuggerd -b <pid>
Bug: 319754740
Change-Id: Iae230ff34409bee4a325113aed65433292975427
2024-01-12 14:06:43 -08:00
David Drysdale
b1105589b7 Revert "rpc_binder: Change trusty_tipc_fuzzer to support multiple connections and messages"
This reverts commit 589c8d1e44.

Reason for revert: fuzzer crashes immediately on line 99 as vector is empty

Change-Id: I5e56a94671a43cd131c250d98f7cfae3c96f34ab
2024-01-12 16:21:11 +00:00
David Drysdale
36dfed9476 Secretkeeper: add Trusty fuzzers
Bug: 306364873
Test: initial short run of fuzzers on device, with aosp/2737933 reverted
Change-Id: I00ac6ab2678697d69a71aa3615c580c210772f20
2024-01-12 15:53:11 +00:00
Ryan Prichard
42a3f876ad trusty: clear fuzzer's extra counters directly
The FuzzerDefs.h APIs are internal to the fuzzer and aren't available
when the fuzzer is built with a custom private libc++, so remove the
ExtraCountersBegin/ExtraCountersEnd assertions and inline the array
clearing.

Bug: 175635923
Bug: 303175229
Bug: 315079422
Test: m libtrusty_fuzz_utils trusty_gatekeeper_fuzzer
Change-Id: I1ca9d9867026ff6f8e494ac6026fb1314caab7d1
2024-01-11 12:33:15 -08:00
David Drysdale
8e1c267cdf Initial Secretkeeper HAL service for Trusty
Disabled by default; enable with `export SECRETKEEPER_ENABLED=y` before
building.

Also needs the Secretkeeper TA to be present in Trusty; if the TA is
absent, the HAL service will (repeatedly) fail to connect.

Test: build, VtsSecretkeeperTargetTest
Bug: 306364873
Change-Id: I529013395d0e3afbff4a24b663088adce2a23805
2024-01-11 09:45:20 +00:00
Hsin-Yi Chen
4d669c2667 Merge "Enable header_abi_checker for libutils explicitly" into main am: c0c1c3d0c1
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2900452

Change-Id: I67cf414d6e2fe50edab62d52b39240eb9c32f73c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-11 02:16:14 +00:00
Hsin-Yi Chen
c0c1c3d0c1 Merge "Enable header_abi_checker for libutils explicitly" into main 2024-01-11 02:00:45 +00:00
Treehugger Robot
0d34c1bf46 Merge "Use libvendorsupport for vendor api level calculation" into main am: bc645a1c47
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2903648

Change-Id: I188969e7be50e2bc85f084a4c0b4677d2b17aa7c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-10 12:32:28 +00:00
Treehugger Robot
bc645a1c47 Merge "Use libvendorsupport for vendor api level calculation" into main 2024-01-10 11:58:06 +00:00
Nikita Ioffe
883986eaa1 Merge "dm_test.cpp: DeleteDeviceWithTimeout asserts that unique path is deleted" into main am: 44a7cadbf7
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2897783

Change-Id: If3b2b3067a7190bb6bd052516573b3438384f8d3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-10 09:05:36 +00:00
Nikita Ioffe
44a7cadbf7 Merge "dm_test.cpp: DeleteDeviceWithTimeout asserts that unique path is deleted" into main 2024-01-10 08:32:19 +00:00
Justin Yun
6bc1bfe160 Use libvendorsupport for vendor api level calculation
Remove temporary 'vendor_api_level_of' function from init and replace
the function with the same in libvendorsupport.

Bug: 312403948
Test: getprop ro.vendor.api_level
Change-Id: I095353e602397220571e131431e7cbd1b8511fa6
Merged-In: I095353e602397220571e131431e7cbd1b8511fa6
2024-01-10 14:06:43 +09:00
Yi-Yo Chiang
dd62ec3288 fs_mgr_overlayfs: Trim surrounding "@" from the per mountpoint scratch dir name
Right now we encode the per mountpoint scratch dir name like this:
  /system -> /mnt/overlay/@system/
  /product/app -> /mnt/overlay/@product@app/

This CL changes it to:
  /system -> /mnt/overlay/system/
  /product/app -> /mnt/overlay/product@app/

This makes it so that the encoded path for top-level mountpoints (like
/system, /vendor) would have the same encoded scratch dir as before
https://r.android.com/2795755 was introduced.
With this change old first-stage-init can handle top-level remounts
correctly. However for mountpoints with '/' in them, their remount
scratch dirs would be encoded with the new format, and old
first-stage-init would ignore and not setup these during boot.

This makes the remount mechanism to function partially when running on
an old ramdisk (first-stage-init) + new system combo.
Normally we expect the init_boot ramdisk to be upgraded alongside
system.img, so this change isn't strictly needed. However there are
cases where we might want to develop new OS features on old vendor
platform, thus this change.

Bug: 306124139
Bug: 243503963
Test: adb-remount-test
Change-Id: I9b43641bb338f11c6c83888880948e4b85af14e1
2024-01-10 04:42:06 +00:00
Treehugger Robot
1fd5f5c20e Merge "Mark block device as rw before encryptFstab" into main am: 1eac97ca73
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2903391

Change-Id: I3f33f4c9652fb34b620e05fc5c60364e7a81dafd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-10 02:53:37 +00:00
Treehugger Robot
1eac97ca73 Merge "Mark block device as rw before encryptFstab" into main 2024-01-10 02:22:53 +00:00
Kelvin Zhang
d0139b45b8 Mark block device as rw before encryptFstab
Some testcases assume that /dev/block/by-name/userdata is writable, but
mount_with_alternatives() will mark block device as RO if mount flag
includes MS_RDONLY. Fix it by marking the block device as RW again.

Test: th
Bug: 319156415
Change-Id: Ic04acd4b6175d3f0aeea88675da44309e8df15e8
2024-01-09 17:14:07 -08:00
Treehugger Robot
9fb26efb29 Merge "adb-remount-test: Only test mounts that are remounted by us" into main am: 951ffacc7b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2902372

Change-Id: I6e52b1980d31f2dc399100add533c5050542fda5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-09 17:20:51 +00:00
Treehugger Robot
951ffacc7b Merge "adb-remount-test: Only test mounts that are remounted by us" into main 2024-01-09 16:40:43 +00:00
Kangping Dong
fb68931d65 Merge "Revert "init.rc: create /data/misc/threadnetwork folder"" into main am: 75346e6c3f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2894582

Change-Id: I9985bd70c10071e061bfda4dc42d167a79c040b0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-09 12:30:07 +00:00
Kangping Dong
75346e6c3f Merge "Revert "init.rc: create /data/misc/threadnetwork folder"" into main 2024-01-09 11:58:42 +00:00
Yi-Yo Chiang
fe52f39461 adb-remount-test: Only test mounts that are remounted by us
Right now we assume all RW mounts (minus /data & special FS) are
remounted by us and we apply the remount/overlayfs related checks
on them unconditionally. This would generate false positives when
a partition was RW but not remounted by us.
The test should instead check mounts that were remounted by us
(transitioned from RO to RW after adb-remount), and ignore
partitions that were already RW before running adb-remount.

Bug: 313609600
Test: adb-remount-test
Change-Id: I94e8a35775271f557790a458781657eb3b24a6f5
2024-01-09 18:15:38 +08:00
Akilesh Kailash
8b11c43d87 Merge "Set taskprofile to snapshot merge thread" into main am: 711a5e24fb
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2845274

Change-Id: I4fdcdf889503d11a393c9648763f2c3558ca9fce
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-09 05:25:05 +00:00
Akilesh Kailash
711a5e24fb Merge "Set taskprofile to snapshot merge thread" into main 2024-01-09 04:51:32 +00:00
Akilesh Kailash
e57ef38bb2 Set taskprofile to snapshot merge thread
Assign CPUSET_SP_BACKGROUND taskprofile to snapshot merge threads.
This will ensure that the threads will not run on big cores.

Additionally, reduce the flushing of data to 1MB after merging REPLACE ops.

No major regression observed on snashot merge time.

On Pixel 6 for incremental OTA of 500M, snapshot merge time increased
from 72 seconds to 76 seconds after this patch.

Bug: 311233916
Test: Full and incremental OTA on Pixel 6 - Verify merge threads not on big cores
Change-Id: I455afdac0b77227869d846d0c4472ea9eb34c41c
Signed-off-by: Akilesh Kailash <akailash@google.com>
2024-01-09 03:24:10 +00:00
Treehugger Robot
9cae31e092 Merge "healthd: Delete health@2.0-service." into main am: 7e2b6cc9fa
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2816434

Change-Id: I949ba9e07e0958299319f96bdbcff62963b789b2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-09 00:45:06 +00:00
Treehugger Robot
7e2b6cc9fa Merge "healthd: Delete health@2.0-service." into main 2024-01-09 00:28:28 +00:00
Treehugger Robot
a0760d0b37 Merge "vts_fs_test: Only check /data and /metadata for rw partitions." into main am: dbaab24de3
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2901571

Change-Id: I2a88e81fc4e5f32535daa414d1b1adc27d1a8186
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-09 00:27:18 +00:00
Treehugger Robot
dbaab24de3 Merge "vts_fs_test: Only check /data and /metadata for rw partitions." into main 2024-01-08 23:59:05 +00:00
David Anderson
442345b734 vts_fs_test: Only check /data and /metadata for rw partitions.
Some rw /proc/mounts entries are FUSE.

Also, add some diagnostics for failures.

Bug: 318962836
Test: vts_fs_test on Pixel
Change-Id: I85dec8b37f1a061b1eca597aba3887b598b699f5
2024-01-08 22:50:04 +00:00
Kelvin Zhang
dfbf5a46bd Merge "Mount /data as readonly before encrypt_inplace" into main am: f48c4ad35d
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2898748

Change-Id: Ife1ddc58f556e097f84c5796196a60f7872c4941
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-08 21:48:24 +00:00
Kelvin Zhang
f48c4ad35d Merge "Mount /data as readonly before encrypt_inplace" into main 2024-01-08 21:09:02 +00:00
Edward Liaw
966432da37 Merge "TEST_MAPPING: don't run vts_libsnapshot_test in kernel-presubmit" into main am: da6329bd6f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2896180

Change-Id: Id3d78b4ae3bf512549da2053bb03bbc25ff8ea53
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-08 19:08:37 +00:00
Edward Liaw
da6329bd6f Merge "TEST_MAPPING: don't run vts_libsnapshot_test in kernel-presubmit" into main 2024-01-08 18:00:04 +00:00
Nikita Ioffe
5ff9025ae1 dm_test.cpp: DeleteDeviceWithTimeout asserts that unique path is deleted
Before this patch, DeleteDeviceWithTimeout was checking that the dev
node (i.e. /dev/block/dm-XX) is deleted after the call to DeleteDevice
API. Since ueventd first deletes the symlinks that correspond to a
device and only then deletes this device node, this assertion introduced
a race condition (DeleteDevice API waits for the symlink to be deleted).

This patch changes the DeleteDeviceWithTimeout test to check that unique
path of the device has been deleted.

Bug: 318425605
Test: presubmit
Change-Id: I3fd9de507c75bcf6ac1350fa0b8adfdb5a2e89e8
2024-01-08 11:25:45 +00:00
Hsin-Yi Chen
e5b667bd38 Enable header_abi_checker for libutils explicitly
The ABI checking rules for VNDK will be deleted from the main branch.
To keep monitoring the ABI, the check must be enabled explicitly.

Test: m libutils.vendor
Bug: 314010764
Change-Id: I762dec1ed7de014db653663d2917a19df5076fc8
2024-01-08 18:52:13 +08:00
Treehugger Robot
d8535c3f97 Merge "remount: remount partitions with noatime" into main am: 2e6640c34d
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2899350

Change-Id: If8403dfe6cc55578e40e5bb55611424f44fcf649
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-08 04:00:45 +00:00
Treehugger Robot
2e6640c34d Merge "remount: remount partitions with noatime" into main 2024-01-08 03:34:27 +00:00
Treehugger Robot
887ae0d341 Merge "Provide a new LLNDK for the vendor api level handling" into main am: 4e33a18421
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2894585

Change-Id: Ia0048f4ca31b9b3a56c2b9be2d29bbc7301eef4d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-08 03:13:06 +00:00
Treehugger Robot
4e33a18421 Merge "Provide a new LLNDK for the vendor api level handling" into main 2024-01-08 02:45:18 +00:00
Kelvin Zhang
027067a1dd Merge "Support multi-threaded compression in COW v3" into main am: a79a9e3cfe
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2883314

Change-Id: I9a36e7ef42c5d998afd23f75fa46cc8728642552
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-05 22:52:19 +00:00
Kelvin Zhang
a79a9e3cfe Merge "Support multi-threaded compression in COW v3" into main 2024-01-05 22:06:40 +00:00
Kelvin Zhang
5ede70f714 Mount /data as readonly before encrypt_inplace
According to aosp/1908136, the current flow is

1. factory reset formatted raw disk.
2. next boot tries to convert it to metadata encryption
2.a mount sda27
2.b umount sda27
2.c encrypt_inplace()
2.d fsck on dm-x
2.e mount dm-x

If there are some write file operations between 2.a and 2.b, encryption
might fail. To mitigate, change the mount in 2.a to readonly if we know
we are going to do encrypt_inplace.

Test: th
Bug: 313962438
Change-Id: I7f4bbd36e1e6c978dde84f5396ffb90bbbdcae87
2024-01-05 14:06:21 -08:00
Kelvin Zhang
6687cb65a6 Support multi-threaded compression in COW v3
Performance of COW v3 is now on par with v2 in both multi-threaded and
single threaded configurations. Note, v2 cow writer can cache up to 1024
blocks in memory if multi-threaded compression is enabled(even though
batch size is configured as 200). For a fair comparison, benchmarks are
ran with batch size of 256. For batch size of 256 or greater, v2 and v3
have similar multi-threaded performance.

Test: th
Bug: 313962438
Change-Id: I377c8291689a7a038bb00b09d7371a155e6972e9
2024-01-05 14:06:21 -08:00
Justin Yun
a68aa85624 Provide a new LLNDK for the vendor api level handling
The library provides mapping functions between SDK versions and
vendor api levels.

Bug: 315056516
Test: atest libvendorsupport-tests
Change-Id: I4a4eae0456ebf756badcc80f09a2946f741843c5
2024-01-05 22:56:09 +09:00
Yi-Yo Chiang
b86df7687b remount: remount partitions with noatime
Related change: r.android.com/1110379

noatime reduces the wear and tear on the flash device.

Bug: 313609600
Test: abtd adb-remount-test
Change-Id: Ia42a064f297c25d3463a4ed9094a66236a6c5708
2024-01-05 16:47:14 +08:00
Daniel Zheng
d73b1da068 Merge "libsnapshot: add check for updating next_data_pos_" into main am: 004187aced
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2896585

Change-Id: I774cfb37046500fa424ff99da2f2ef9887a551fd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-04 19:48:36 +00:00
Daniel Zheng
2b07c32964 Merge "libsnapshot: get options from protobuf fields" into main am: 6fe95136b5
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2879846

Change-Id: If2d7b85eafafbd4b058ad8c69debd611fc733d2e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-04 19:48:26 +00:00
Daniel Zheng
9eed2549ee Merge "libsnapshot: add CowSizeInfo struct" into main am: 4e729db09c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2828283

Change-Id: Ief8889e9e1f2aba69233252c7f988f9c6e7e34e5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-04 19:47:57 +00:00