Commit graph

86616 commits

Author SHA1 Message Date
Chun-Wei Wang
9c48951d91 Add help text for fastboot gsi status
Bug: 298533290
Test: fastboot -h
Change-Id: Icf91a980059aaa8e74e41af4036778fbbfbf1bd2
2024-01-02 15:29:21 +08:00
Seungjae Yoo
94d60a73f4 Merge "Revert^2 "Small fix: Use const value on IsHashreeDisabled"" into main 2023-12-23 12:21:35 +00:00
Greg Kaiser
4c4742f678 Revert^2 "Small fix: Use const value on IsHashreeDisabled"
This reverts commit ec3ef81fd9.

Reason for revert: b/317470107 is an infrastructure error

Change-Id: If5a022cbfd016d9c55261c67a1a73d81cb336343
2023-12-22 20:03:05 +00:00
Oleg Petšjonkin
e3bfd32ae7 Merge "Revert "Small fix: Use const value on IsHashreeDisabled"" into main 2023-12-22 14:36:57 +00:00
Oleg Petšjonkin
ec3ef81fd9 Revert "Small fix: Use const value on IsHashreeDisabled"
This reverts commit f5d8773169.

Reason for revert: Identified as culprit for broken tests: b/317470107

Change-Id: If599c688bb4bbe800270881451fa5ac1f6898aff
2023-12-22 10:17:25 +00:00
Seungjae Yoo
1ff517ce9a Merge "Small fix: Use const value on IsHashreeDisabled" into main 2023-12-22 05:53:43 +00:00
Seungjae Yoo
f5d8773169 Small fix: Use const value on IsHashreeDisabled
Bug: N/A
Test: Presubmit
Change-Id: I2167ac6d022c2c8c96febf2fc82eb3bba6fb6541
2023-12-22 10:11:55 +09:00
Steven Moreland
30e45c6e92 Merge changes from topic "deprecate-llndk-vendor" into main
* changes:
  try llndk-deprecate
  Deprecate android_is_in_vendor_process
2023-12-21 22:26:12 +00:00
Steven Moreland
54db200b21 try llndk-deprecate
No implementation required - seems to be ignored rather
than a failure

FIXME: should use vendor version, and be squashed into parent CL?

Bug: 300366609
Test: build
Change-Id: I19fd3871085f435c6ec55ac5e15e4769d7f3e450
2023-12-21 02:09:14 +00:00
Kiyoung Kim
ebbf9753e9 Deprecate android_is_in_vendor_process
android_is_in_vnedor_process previously checked if current process is in
system(-ish) section by trying to open vndk namespace. However, this
would not work once VNDK is deprecated. As there is no clear way to
replace this, and there is few usage on this API, it would be better
deprecated, and be implemented from each module if required.

Bug: 300366609
Test: AOSP CF build and boot succeeded
Change-Id: I70c70efb36199e12d4877ea4ecb39dbf94653551
2023-12-21 02:06:56 +00:00
Seungjae Yoo
91389231b0 Merge "Support dm-verity with verification based on root digest" into main 2023-12-21 01:01:35 +00:00
Treehugger Robot
26cb9dbfef Merge "Support batching ops across Add*Blocks() call" into main 2023-12-20 22:49:38 +00:00
Treehugger Robot
c4b9840456 Merge "Fix EmitSequenceData bug" into main 2023-12-20 22:49:38 +00:00
Seungjae Yoo
66dc7b7b99 Support dm-verity with verification based on root digest
Currently the only ways to enable dm-verity were relying on its built-in
vbmeta image or containing its public key on standalone vbmeta image.
Merging this change will support enabling dm-verity based on hashtree
descriptor root digest for standalone vbmeta image.

Bug: 285855436
Test: Presubmit
Test: adb shell /apex/com.android.virt/bin/vm run-microdroid --vendor /vendor/etc/avf/microdroid/microdroid_vendor.img
Change-Id: I51eb64cae2ca8b4e97f1c6419b35d45e6f51cacb
2023-12-20 10:41:44 +09:00
Kelvin Zhang
a008c9c1a4 Support batching ops across Add*Blocks() call
Performance of V3 COW writer is now on-par with V2 in both incremental
OTA and full OTA.

Test: th
Bug: 313962438
Change-Id: If56e0fe42367f947c513fc4c93119c3825763cb9
2023-12-19 16:32:02 -08:00
Treehugger Robot
e0b444802b Merge "Add op count check before attempting to write operations" into main 2023-12-19 20:18:41 +00:00
Akilesh Kailash
3a7774d650 Merge "libsnapshot: Detach the daemon explicitly before stopping the service" into main 2023-12-19 17:50:06 +00:00
Chun-Wei Wang
db6cb42d5f Merge "Disable DSU in recovery mode" into main 2023-12-19 03:57:26 +00:00
Akilesh Kailash
1752c5f249 libsnapshot: Detach the daemon explicitly before stopping the service
If the daemon is alive, detach it before explicitly terminating service.

Bug: 316876960
Test: treehugger presubmit tests
Change-Id: I94d9d1a0dab09a6b016f422c7497098abc86add8
Signed-off-by: Akilesh Kailash <akailash@google.com>
2023-12-18 17:22:06 -08:00
Peter Collingbourne
97807b79e6 Merge "Mount /tmp as tmpfs." into main 2023-12-18 21:39:38 +00:00
Treehugger Robot
f426858bbb Merge "trusty: storageproxyd: fix logging of freed path pointer" into main 2023-12-18 12:16:43 +00:00
Mike McTernan
5647c0b738 trusty: storageproxyd: fix logging of freed path pointer
Bug: 316859216
Test: build.py
Change-Id: I09557d43cda13e21175ba6fceeb806ec1f9115e1
2023-12-18 11:03:36 +00:00
Chun-Wei Wang
222ffc5919 Disable DSU in recovery mode
DSU (modifying mounting paths) will cause OTA update
to fail in recovery mode

Bug: 315887685
Test: 1. enter DSU mode
      2. adb reboot recovery
      3. select "Apply update from ADB"
      4. adb sideload some-ota-update.zip
Change-Id: I6aec86893b7f8aa9e34f158269ebe2fd9dd98b33
2023-12-18 07:03:07 +08:00
Kelvin Zhang
c85038b866 Fix EmitSequenceData bug
If sequence data is written and the number of ops reaches the maximum,
op data will corrupt the block data because location of block data is
stale after writing sequence data. Fix by resetting location of block
data after EmitSequenceData()

Test: th
Bug: 313962438
Change-Id: Ib53b81772ba341cdf5c240baaee7c10725a365c3
2023-12-15 20:12:20 -08:00
Peter Collingbourne
cee7fcd001 Mount /tmp as tmpfs.
/tmp is a volatile temporary storage location for the shell user.
As with /data/local/tmp, it is owned by shell:shell and is chmod 771.

Bug: 311263616
Change-Id: Ice0229d937989b097971d9db434d5589ac2da99a
2023-12-15 16:46:46 -08:00
T.J. Mercier
7341ffba7c Merge changes from topic "cgroup.events2" into main
* changes:
  libprocessgroup: Use cgroup.kill
  Reapply "libprocessgroup: Poll on cgroup.events"
2023-12-15 06:10:46 +00:00
Treehugger Robot
6f03bd72ad Merge "remount: Detect when flashall has happened in the bootloader." into main 2023-12-15 01:43:49 +00:00
Kelvin Zhang
73ac5f184e Add op count check before attempting to write operations
Test: th
Bug: 313962438
Change-Id: I0e288a42984d737d327236693a6b69c03a7ecc6e
2023-12-14 16:42:45 -08:00
David Anderson
adb91b0e59 remount: Detect when flashall has happened in the bootloader.
This adds a new metadata header flag to the super partition. This flag
is set when "adb remount" is used, and is implicitly cleared when
flashing.

If there is a scratch partition present on /data, we require that the
flag be set in order to proceed using overlays. If not set, scratch is
not mapped in first-stage init, and scratch images are removed later
during startup.

Bug: 297923468
Test: adb remount -R, touch file in out/, sync, flashall
Change-Id: I9cc411a1632101b5fc043193b38db8ffb9c20e7f
2023-12-14 16:00:27 -08:00
T.J. Mercier
a103630b5c libprocessgroup: Use cgroup.kill
By using cgroup.kill we don't need to read cgroup.procs at all for
SIGKILLs, which is more efficient and should help reduce CPU contention
and cgroup lock contention. Fallback to cgroup.procs if we encounter an
error trying to use cgroup.kill, but if cgroup.kill fails it's likely
that cgroup.procs will too.

Bug: 239829790
Test: atest StagedRollbackTest:com.android.tests.rollback.host.StagedRollbackTest#testNativeWatchdogTriggersRebootlessApexRollback
Change-Id: I9da67efd00af49b7b4b502fb742c1095d5c7b9e9
2023-12-14 21:52:13 +00:00
T.J. Mercier
4928b6ef57 Reapply "libprocessgroup: Poll on cgroup.events"
This reverts commit a72332f953.

This change was originally reverted due to a bug in the child commit
which caused process group kills not to occur when using cgroup.kill.
Now that has been fixed, bring back this change with the fixed child.

Bug: 301871933
Change-Id: Ia6c74d9b67a8c88aec4812ac4655646934e0d189
2023-12-14 21:49:14 +00:00
Treehugger Robot
e2c6171f65 Merge changes If3a01ab8,Ib24d7c63 into main
* changes:
  Support batch writes for V3 cow format
  Optimize PrepareSnapshotPartitionsForUpdate runtime
2023-12-14 19:19:31 +00:00
Treehugger Robot
b0c6a5dfd7 Merge "Revert "snapuserd: opt out of Global ThinLTO to workaround segfault"" into main 2023-12-14 00:24:57 +00:00
Florian Mayer
26c0b9017b Merge "Use correct stack depot size in __scudo_get_error" into main 2023-12-13 23:28:12 +00:00
David Anderson
fb589aac77 Merge "healthd: Add handling for "Calibration required" battery health." into main 2023-12-13 22:43:04 +00:00
Kelvin Zhang
557104c85a Support batch writes for V3 cow format
Test: th
Bug: 313962438
Change-Id: If3a01ab85a1a649b7476bee2d56b732f04d0509a
2023-12-13 14:22:12 -08:00
Florian Mayer
cdf55585a7 Use correct stack depot size in __scudo_get_error
This is a no-op but will be used in upcoming scudo changes that allow to
change the depot size at process startup time, and as such we will no
longer be able to call __scudo_get_stack_depot_size in debuggerd.

Bug: 309446692
Change-Id: Ib64b9d042b2a2088484ec5e61944c089a1d85314
2023-12-13 22:21:19 +00:00
Akilesh Kailash
d1d9b0ef8a Merge "libsnapshot: skip connecting to daemon for legacy VAB" into main 2023-12-13 00:25:30 +00:00
Akilesh Kailash
4ffbc33b14 libsnapshot: skip connecting to daemon for legacy VAB
There is no need to connect to daemon for legacy VAB.

Bug: 311900089
Test: treehugger - presubmit

Change-Id: I2256cee611431ab2a286730c61092d2c546caf1e
Signed-off-by: Akilesh Kailash <akailash@google.com>
2023-12-12 14:12:49 -08:00
Kelvin Zhang
cb3cfc1655 Optimize PrepareSnapshotPartitionsForUpdate runtime
During PrepareSnapshotPartitionsForUpdate, we attempt to connect to
snapuserd with a 5s timeout, only to tell snapuserd to shutdown
immediately. If snapuserd isn't running, we will wait-out the whole 5
seconds. Change the logic to return early if socket_connect() calls
return ENOENT, indicating that snapuserd socket isn't used by any
process. This reduces allocateSpaceForPayload() time from 6s to 1s.

Test: th
Bug: 315215541
Change-Id: Ib24d7c63733a896c082ac92aaa88ad52d050a2a5
2023-12-12 13:36:34 -08:00
David Anderson
bc9acc9f64 Merge "healthd: Add support for the new Health HAL v3 properties." into main 2023-12-12 20:22:31 +00:00
Yi Kong
edd04f1b38 Revert "snapuserd: opt out of Global ThinLTO to workaround segfault"
This reverts commit 9d0c06d3e2.

The failure is fixed by https://r.android.com/2725997. Workaround no
longer needed.

Test: manual
Bug: 208565717
Bug: 295944813
Change-Id: I83638938bf52a4b2b1e72743f892c579622ba9e6
2023-12-12 16:35:07 +09:00
David Anderson
99a33df544 Merge changes from topic "health-v3" into main
* changes:
  fastboot: Add getvar commands to query battery part info.
  Update fastbootd to use Health AIDL HAL V3.
  Update healthd to use Health AIDL HAL V3.
  Update storaged to use Health AIDL HAL V3.
2023-12-12 04:00:47 +00:00
Treehugger Robot
314818029c Merge "Support batch writes for non-compressed ops" into main 2023-12-12 01:43:24 +00:00
Treehugger Robot
1f5b0f9fee Merge "Handle scudo_stack_depot_size = 0" into main 2023-12-12 01:24:03 +00:00
Treehugger Robot
dcf3542d43 Merge "fastboot: fix network connected device status" into main 2023-12-11 23:41:21 +00:00
Florian Mayer
f9566853bd Merge "Use scudo_stack_depot_size from process_info" into main 2023-12-11 23:38:13 +00:00
David Anderson
629a26b6c5 healthd: Add handling for "Calibration required" battery health.
This string was added to sysfs fairly recently. It indicates that
re-calibration is needed, which we've already added an indicator for via
the INCONSISTENT health status.

Bug: 300585313
Test: m
Change-Id: I9594523e509ad94480ad13f489eee6d1c0a75e7e
2023-12-11 15:25:13 -08:00
David Anderson
d5ed26a45a healthd: Add support for the new Health HAL v3 properties.
Add BATTERY_PROP_PART_STATUS support via getProperty.

Add serial number support via a new helper function, since it doesn't
fit neatly into the BatteryProperty structure.

There are no sysfs nodes for this yet, so currently it is stubbed.

Bug: 309792384
Test: fastboot getvar battery-part-status
      fastboot getvar battery-serial-number
Change-Id: I3777e092d4ef26c02a7dd5420c9eaf1ec5aeae92
2023-12-11 11:59:23 -08:00
David Anderson
2cb36706f4 fastboot: Add getvar commands to query battery part info.
This adds two commands to test the new v3 Health HAL, to query the
battery serial number (unlocked devices only) and part status.

Bug: 309792384
Test: adb reboot fastboot
      fastboot getvar battery-part-status
      fastboot getvar battery-serial-number
Change-Id: Ie0a14eda06483d047544833124c327fb88ba43a2
2023-12-11 11:59:23 -08:00