Commit graph

86587 commits

Author SHA1 Message Date
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
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
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
David Anderson
9305c988b3 Update fastbootd to use Health AIDL HAL V3.
Bug: 309792384
Test: m
Change-Id: I660228c89cf18b46ea6c8165a4a74d20c0a2ac41
2023-12-11 11:59:23 -08:00
David Anderson
d473bcf1ab Update healthd to use Health AIDL HAL V3.
Bug: 309792384
Test: m
Change-Id: Ic92e4d699ee49284fea490d48e963555173033d7
2023-12-11 11:59:23 -08:00
David Anderson
303a541248 Update storaged to use Health AIDL HAL V3.
Bug: 309792384
Test: m
Change-Id: Ib11dd9b39e5feec864f881118f16dad902813379
2023-12-11 11:59:23 -08:00
Tomasz Wasilczyk
6635431dc1 Merge "Introduce libutils_binder_sdk" into main 2023-12-09 03:43:07 +00:00
Dmitrii Merkurev
e20438f83b fastboot: fix network connected device status
Bug: 303236495
Change-Id: Iceac3509531af1af65b455b1a3d5f5ab9029fda6
Signed-off-by: Dmitrii Merkurev <dimorinny@google.com>
2023-12-09 01:55:20 +00:00
Xin Li
e32254c1ac Merge "Merge Android 14 QPR1" into main 2023-12-09 00:11:40 +00:00
Xin Li
c1b0f4d6b1 Merge Android 14 QPR1
Merged-In: Ifcc3872348c125e547a40156f9cb69fb079cb13e
Bug: 315507370
Change-Id: I41f0bd8df172924b88ddd32f67396a24e9230102
2023-12-08 13:14:38 -08:00
Treehugger Robot
f587bda852 Merge "Revert "Revert "Calculate ro.vendor.api_level with the new vendo..."" into main am: 053e75b946
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2862614

Change-Id: Ifcc3872348c125e547a40156f9cb69fb079cb13e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-08 17:03:32 +00:00
Treehugger Robot
053e75b946 Merge "Revert "Revert "Calculate ro.vendor.api_level with the new vendo..."" into main 2023-12-08 16:24:15 +00:00
Xin Li
286b10a4cc Merge "Merge UQ1A.231205.015" into aosp-main-future 2023-12-08 08:02:42 +00:00
T.J. Mercier
236e74a3cb Merge changes from topic "revert-2819069-LYZVLDOFQA" into main am: b73d41c50b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2865117

Change-Id: I72d439019c70beeb88058133591453f1c9d46114
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-08 02:13:38 +00:00
T.J. Mercier
b73d41c50b Merge changes from topic "revert-2819069-LYZVLDOFQA" into main
* changes:
  Revert "libprocessgroup: Poll on cgroup.events"
  Revert "libprocessgroup: Use cgroup.kill"
2023-12-08 01:50:41 +00:00
Android Culprit Assistant
a72332f953 Revert "libprocessgroup: Poll on cgroup.events"
This revert was created by Android Culprit Assistant. The culprit was identified in the following culprit search session (http://go/aca-get/91da3c52-9b76-498b-bdbd-a9de7d7ff53b).

Change-Id: I996c595bee9acc15aedaf0a912f67fa027f33cd0
2023-12-08 01:48:25 +00:00
Android Culprit Assistant
c0ce178640 Revert "libprocessgroup: Use cgroup.kill"
This revert was created by Android Culprit Assistant. The culprit was identified in the following culprit search session (http://go/aca-get/91da3c52-9b76-498b-bdbd-a9de7d7ff53b).

Change-Id: I459265b9c9117d6006c1223947a202505d24c08f
2023-12-08 01:48:30 +00:00
Xin Li
c5db6f6ca0 Merge UQ1A.231205.015
Bug: 308969284
Merged-In: I856c812d22363cc1d1e8aa88706d4d3b89044f52
Change-Id: I678b5d4e8418a905a7ca167a41888dcba5af2367
2023-12-07 15:48:04 -08:00
Justin Yun
29192395bc Revert "Revert "Calculate ro.vendor.api_level with the new vendo..."
Revert submission 2863786-trunk_vendor_api_level

Reason for revert: Reland the ro.vendor.api_level update

Reverted changes: /q/submissionid:2863786-trunk_vendor_api_level

Change-Id: I1f380e04f673eb4570e598a6e2013fce6e69213e
2023-12-07 22:22:53 +00:00
Tomasz Wasilczyk
1578cb3c14 Introduce libutils_binder_sdk
Bug: 285204695
Test: mma in Binder directory
Change-Id: I430b81594167940cb47897e4261ad87c75ac3783
2023-12-07 14:04:16 -08:00
Treehugger Robot
e30ca0f169 Merge changes from topic "cgroup.events" into main am: 1b44b8c6d6
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2819069

Change-Id: Ic26f89109f6a75a7c438096a1eff8c4607023d91
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-07 20:08:59 +00:00
Treehugger Robot
1b44b8c6d6 Merge changes from topic "cgroup.events" into main
* changes:
  libprocessgroup: Use cgroup.kill
  libprocessgroup: Poll on cgroup.events
2023-12-07 19:40:11 +00:00
Treehugger Robot
f60bfa296a Merge "trusty: apploader: fail specifically if app package is 0 bytes" into main am: e5bb7ef272
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2863846

Change-Id: Ia4d2f281d64499405537661e25f42cc9aafbae6d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-07 19:20:59 +00:00
Treehugger Robot
e5bb7ef272 Merge "trusty: apploader: fail specifically if app package is 0 bytes" into main 2023-12-07 18:53:08 +00:00
Mike McTernan
b22e5bcf60 trusty: apploader: fail specifically if app package is 0 bytes
Replace assert with check and log message.  Also log more about the request if DMA heap allocation fails.

Bug: 315283243
Test: boot to home
Test: touch x && trusty_apploader x
Change-Id: Ic075809fd2a6b09d9c4e8dff986709c4deae8fb7
2023-12-07 12:16:09 +00:00
Massimo Carli
7a4c47e3ac Merge "Revert "Calculate ro.vendor.api_level with the new vendor API format"" into main am: 367d732f3c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2863786

Change-Id: I56698526a558eef80cce7c09f0f0795d46344fa9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-07 12:08:19 +00:00
Massimo Carli
367d732f3c Merge "Revert "Calculate ro.vendor.api_level with the new vendor API format"" into main 2023-12-07 11:22:17 +00:00
Massimo Carli
08534b8d0b Revert "Calculate ro.vendor.api_level with the new vendor API format"
This reverts commit e267e31d73.

Reason for revert: b/315246126

Change-Id: I456858c6f4c528158c0826efcdc1509b701c32f7
2023-12-07 09:19:24 +00:00
Justin Yun
dfeb7be11f Merge "Calculate ro.vendor.api_level with the new vendor API format" into main am: 698c6f9035
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2839486

Change-Id: I146f0afe3feea591548ff373fbac9bb8ade70b82
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-07 04:30:18 +00:00
Justin Yun
698c6f9035 Merge "Calculate ro.vendor.api_level with the new vendor API format" into main 2023-12-07 03:54:45 +00:00
Kelvin Zhang
84e5e6f751 Support batch writes for non-compressed ops
This also improves atomicity of ops. If a single Add*Blocks() call
with 100 blocks failed in the middle, partially written blocks would be
discarded, and op count on disk stays unchanged. Previously wew ould
update the op count on disk with partially written blocks, causing
labels to be inaccurate.

Test: th
Bug: 313962438
Change-Id: If175a705f6ec46c1b25c52d0d9f02f01a540ce55
2023-12-06 16:41:25 -08:00
T.J. Mercier
38b8bb1e4a 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
Change-Id: I44706faccfb7c4611b512a3642b913f06d30c1dc
2023-12-07 00:12:07 +00:00