Commit graph

88993 commits

Author SHA1 Message Date
Treehugger Robot
0c2ae80025 Merge "Remove unused VNDK-related function" into main 2024-03-28 04:12:29 +00:00
Akilesh Kailash
164609e8f5 Merge "libsnapshot: don't kill the daemon for legacy vab snapshots" into main am: f56c861eac
Original change: https://android-review.googlesource.com/c/platform/system/core/+/3016837

Change-Id: Id0c96f3c4fb3ade0282ed5b3b3d71ba6630b4989
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-28 02:50:57 +00:00
Akilesh Kailash
f56c861eac Merge "libsnapshot: don't kill the daemon for legacy vab snapshots" into main 2024-03-28 02:36:16 +00:00
Kiyoung Kim
37c3ed70c0 Remove unused VNDK-related function
This change is to clean up VNDK-related code from build. The function
append_vndk_version is not in use.

Bug: 330100430
Test: aosp_cf_x86_64_phone build succeeded
Change-Id: I691093aaedb7f6630cc32145dcaf7d36403bcf90
2024-03-28 11:19:03 +09:00
Christopher Ferris
bcaeacc686 Enable weak functions properly.
There is a check for WEAKS_AVAILABLE that is never set. Change this so
so it is available everywhere except apple/windows.

Add new test to verify that on Android the logStackInternal function is
defined.

Bug: 331489939

Test: All unit tests pass.
Change-Id: Ie982eba30ae421931a62718d39ff1f0c282453db
2024-03-27 17:49:51 -07:00
Akilesh Kailash
a2aa83c5a5 libsnapshot: don't kill the daemon for legacy vab snapshots
If partitions are mounted off the daemon, there is no need
to kill if the tests are being run for legacy vab snapshots.

This also removes vabc_legacy_test as it is no longer required.

Bug: 331053511
Test: vab_legacy_test, vts_libsnapshot_test on Pixel - No flake observed
with 10 iterations
Change-Id: Ie8b29fef77948d23d920c19d816376290cf2fed9
Signed-off-by: Akilesh Kailash <akailash@google.com>
2024-03-27 22:49:04 +00:00
Akilesh Kailash
0fc03d17dd Merge "libsnapshot: Propagate legacy_snapuserd status during WriteUpdateState" into main am: bc3476d5dc
Original change: https://android-review.googlesource.com/c/platform/system/core/+/3015773

Change-Id: I010b89c767742af25e402e4f29c05785894abb29
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-27 17:25:24 +00:00
Akilesh Kailash
bc3476d5dc Merge "libsnapshot: Propagate legacy_snapuserd status during WriteUpdateState" into main 2024-03-27 16:39:44 +00:00
Nikita Ioffe
d647237a87 Merge "Remove check that only allows microdroid vendor partition on debuggable VMs" into main am: 7400cba410
Original change: https://android-review.googlesource.com/c/platform/system/core/+/3014953

Change-Id: Ib3a8a0dc34f331442629ce74bbc589856d622099
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-27 12:51:49 +00:00
Nikita Ioffe
7400cba410 Merge "Remove check that only allows microdroid vendor partition on debuggable VMs" into main 2024-03-27 12:26:44 +00:00
Akilesh Kailash
b0cf1d2370 libsnapshot: Propagate legacy_snapuserd status during WriteUpdateState
Bug: 304829384
Test: OTA on Pixel
Change-Id: I841612c111148523d13166051512314d6fa1986f
Signed-off-by: Akilesh Kailash <akailash@google.com>
2024-03-26 19:59:02 -07:00
Daniel Zheng
6ddde3a9e8 Merge "libsnapshot: Cache Ops correctly" into main am: 98df25ba2e
Original change: https://android-review.googlesource.com/c/platform/system/core/+/3003299

Change-Id: Ibf262b96879b44fc757f7225b4b26b2fccbe1eb4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-26 22:10:33 +00:00
Daniel Zheng
a13b388d93 Merge "libsnapshot: remove temporary solution" into main am: abd3552713
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2956129

Change-Id: I89ea4fbafd36d0b9b0123aad09fe9b5e4fe3f123
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-26 22:10:28 +00:00
Daniel Zheng
98df25ba2e Merge "libsnapshot: Cache Ops correctly" into main 2024-03-26 21:55:13 +00:00
Daniel Zheng
abd3552713 Merge "libsnapshot: remove temporary solution" into main 2024-03-26 21:55:13 +00:00
Nikita Ioffe
d28f45772f Remove check that only allows microdroid vendor partition on debuggable VMs
The microdroid vendor partition is now verified during Microdroid boot,
so no need for this check.

Bug: 287593065
Test: AVF presubmit
Change-Id: I84811f818ef1140f1fe93d9da5f9ee61341e75dd
2024-03-26 18:04:21 +00:00
Akilesh Kailash
3169cec49b Merge "snapuserd: Use snapshots during install" into main am: ea88c191e1
Original change: https://android-review.googlesource.com/c/platform/system/core/+/3012386

Change-Id: I47701b8f004d95432d9d47dc3a88c2ea36e571eb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-26 16:54:23 +00:00
Akilesh Kailash
ea88c191e1 Merge "snapuserd: Use snapshots during install" into main 2024-03-26 16:36:09 +00:00
Akilesh Kailash
c375878b8e snapuserd: Use snapshots during install
If on Androd 12, continue to use snapshots

Bug: 304829384
Test: OTA on Pixel
Change-Id: I94890c308e7f297b695ddbd71659ebb1cf4d278c
Signed-off-by: Akilesh Kailash <akailash@google.com>
2024-03-26 16:36:01 +00:00
Akilesh Kailash
92a5899545 Merge "libsnapshot: Enable snapshots during OTA install for S vendor" into main am: ad55fad080
Original change: https://android-review.googlesource.com/c/platform/system/core/+/3011455

Change-Id: I2a6e740495dd69ec8fe69efcbd95fa29701010c8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-25 21:32:29 +00:00
Akilesh Kailash
ad55fad080 Merge "libsnapshot: Enable snapshots during OTA install for S vendor" into main 2024-03-25 21:15:08 +00:00
Akilesh Kailash
35d5c94bb0 libsnapshot: Enable snapshots during OTA install for S vendor
ro.virtual_ab.userspace.snapshots.enabled is a vendor property which isn't present in Android S. Hence, during OTA install with S vendor, userspace_snapshots is disabled.

However, both update_engine and snapuserd are already on the system partition during install. Hence, forcefully enable userspace_snapshots if this is a path of legacy dm-snapshots with Vendor on Android S.


Bug: 331156940
Test: OTA tests on treehugger, pixel OTA
Change-Id: I3d1c03493d83e670e37df088d4b676c4aa1dc720
Signed-off-by: Akilesh Kailash <akailash@google.com>
2024-03-25 21:10:05 +00:00
Chris Sarbora
7199051aaf Wait for disconnect when rebooting to userspace FB
Wait for the device to disconnect when rebooting to userspace fastboot.
This is a particular problem for USB-over-IP devices, which must tunnel
the USB commands over a relatively-slow network and thus will not
disconnect as quickly as local ones.

Only currently effective for Linux hosts, since LinuxUsbTransport is the
only transport that implements WaitForDisconnect().

Test Plan:
provision with a usbip-attached device, see flash succeed

Change-Id: Ia8903dfa6e40755377870fbeaef9162934f992a0
2024-03-25 14:53:10 -05:00
Akilesh Kailash
06acf561b2 Merge changes Id9263be8,Idd9a60b0 into main am: da9db4f396
Original change: https://android-review.googlesource.com/c/platform/system/core/+/3005222

Change-Id: I6fc652c09af4c0c68610ba4adc3469aba6728c9b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-25 08:08:09 +00:00
Akilesh Kailash
da9db4f396 Merge changes Id9263be8,Idd9a60b0 into main
* changes:
  snapuserd: Remove legacy dm-snapshot based snapshot and snapshot-merge
  libsnapshot: Prepare removal of legacy snapshot
2024-03-25 07:50:30 +00:00
Treehugger Robot
f31188063d Merge "Add //visibility:any_system_partition" into main am: ba28275e29
Original change: https://android-review.googlesource.com/c/platform/system/core/+/3000097

Change-Id: I7fb46713187c375b35ae90555af8f4d08d4a92ef
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-25 02:28:08 +00:00
Treehugger Robot
ba28275e29 Merge "Add //visibility:any_system_partition" into main 2024-03-25 02:06:17 +00:00
Jeongik Cha
6d7e83fb42 Add //visibility:any_system_partition
system image which is declared in Android.bp should include the module.

Bug: 321000103
Test: m nothing
Change-Id: I6e9d8fa4c1051211ff9ff80c7dfa4a8ee5cbd732
2024-03-23 12:31:32 +09:00
Daniel Zheng
fe335cf3d2 Merge "cow_api_test: big replace op" into main am: 3326685511
Original change: https://android-review.googlesource.com/c/platform/system/core/+/3006902

Change-Id: Ia73fb9191d8ae2b552d41c0ad94b349a52fde144
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-22 22:08:50 +00:00
Daniel Zheng
3326685511 Merge "cow_api_test: big replace op" into main 2024-03-22 21:48:13 +00:00
Daniel Zheng
5e8e488c13 libsnapshot: Cache Ops correctly
Change the meaning of batch_size_. Previously, a batch size of 200 meant
200 compressed data ops. With variable block size, each compressed data
op can be up to 256k uncompressed size -> batch size meaning should be
changed to 200 blocks of block size.

With this being said, the default batch size can be increased to 4mb to
better accomodate variable block size

The way we calculate the number of blocks to compress at once also
needs to be changed. Since there's no way of determining the comperssed
data size ahead of time, allow overwriting the cache by batch_size_ and
then flushing the cache as needed

Bug: 322279333
Test: Ota on pixel and measuring system image cow
Change-Id: Ie8e08d109dc5c3b4f5f36a740bbbcd37362a7ab3
2024-03-22 14:47:45 -07:00
Daniel Zheng
d7efbea407 cow_api_test: big replace op
With the modified cache system we might be processing big replace ops at
once. Our old tests didn't catch a case where a big replace op was
chunked into seperate batch writes.

Test: cow_api_test
Change-Id: I3bc80a2f9ed3e4c73dd9f74d9affaba79d49e4d2
2024-03-22 14:47:45 -07:00
Daniel Zheng
5044d3fd01 Merge "libsnapshot: chunk iov writes" into main am: 6bee318285
Original change: https://android-review.googlesource.com/c/platform/system/core/+/3001513

Change-Id: I83bdd584e690a338f743824c72407255a0287b4f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-22 19:05:35 +00:00
Daniel Zheng
6bee318285 Merge "libsnapshot: chunk iov writes" into main 2024-03-22 18:46:08 +00:00
Treehugger Robot
17b4ba3169 Merge "tombstoned: Rename proto tombstone before text tombstone." into main am: e0b55e5a7c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/3009636

Change-Id: Ib1034f6c029c56575ca4b2904b491530f5f463b4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-22 05:18:21 +00:00
Treehugger Robot
e0b55e5a7c Merge "tombstoned: Rename proto tombstone before text tombstone." into main 2024-03-22 04:58:37 +00:00
Peter Collingbourne
7285c0d1bb tombstoned: Rename proto tombstone before text tombstone.
Because the log message "Tombstone written to: $NAME" is written
before renaming the proto tombstone, it is possible that a tool that
automatically downloads new proto tombstones by watching for this
log message will fail to download the tombstone. For the tool that
I am developing, this occurs < 0.1% of the time. Fix the issue by
renaming the proto tombstone first.

Bug: 328531087
Change-Id: I5b751585f2fce897ca7eb76c0466a0c33a93d851
2024-03-21 18:28:08 -07:00
Daniel Zheng
c60d2fc566 libsnapshot: chunk iov writes
Currently if our iov that we are trying to write is greater than 1024
our write will fail with error "INVALID ARGUMENT". This is because
pwritev() system call takes a max input size of IOV_MAX (which is device
dependant).

With our increased cache size of 1mb or maybe even more (or if user
configures batch size to be large), our write size could be greater than
IOV_MAX, and will fail with an unhelpful error. We should chunk these
writes to ensure they succeed.

Bug: 322279333
Test: cow_api_test + manual testing with large iov write sizes
Change-Id: Ia1fb53cbfc743cfcdfc7256ff9df075ad0c2dd38
2024-03-21 10:52:37 -07:00
Treehugger Robot
7580419014 Merge "liblp_builder_fuzzer: Bug Fix" into main am: a8c6a92f43
Original change: https://android-review.googlesource.com/c/platform/system/core/+/3002664

Change-Id: I8e58fd961d3e56beccbc8775c2b8be74472fed45
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-21 04:45:19 +00:00
Treehugger Robot
a8c6a92f43 Merge "liblp_builder_fuzzer: Bug Fix" into main 2024-03-21 04:29:17 +00:00
Akilesh Kailash
baae2f3a5c Merge "snapuserd_test: check writer != nullptr" into main am: 844ce86595
Original change: https://android-review.googlesource.com/c/platform/system/core/+/3001312

Change-Id: Ib9c27d895e4ebe3947984dc78a352da3794673a2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-21 03:08:46 +00:00
Akilesh Kailash
844ce86595 Merge "snapuserd_test: check writer != nullptr" into main 2024-03-21 02:53:03 +00:00
Akilesh Kailash
92b7d837b9 snapuserd_test: check writer != nullptr
Cow Writer used to fail with ENOSPC during initialization.

Try temporaryFile creation with path set to current working directory.

Bug: 328879200
Test: th, snapuserd_test
Change-Id: I7b3833967952c74142f1d5a35cb8d94dd6d894fc
Signed-off-by: Akilesh Kailash <akailash@google.com>
2024-03-21 00:21:11 +00:00
Hansen Kurli
66951ac52c Merge "Create directory for /data/misc/connectivityblobdb" into main am: 6ec79b5605
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2880828

Change-Id: I3ce432643de5c80a4a3e120560fb2bd4ce8002df
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-20 20:29:35 +00:00
Hansen Kurli
6ec79b5605 Merge "Create directory for /data/misc/connectivityblobdb" into main 2024-03-20 20:27:18 +00:00
Treehugger Robot
afa2a2caa8 Merge "turn on aconfigd in init" into main am: 12c4de877e
Original change: https://android-review.googlesource.com/c/platform/system/core/+/3008533

Change-Id: Ic79102b291c6fe79542568200513b2ce3709e9c2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-20 19:07:00 +00:00
Treehugger Robot
12c4de877e Merge "turn on aconfigd in init" into main 2024-03-20 18:49:51 +00:00
Akilesh Kailash
10233e2fc4 snapuserd: Remove legacy dm-snapshot based snapshot and snapshot-merge
Clean up all the legacy dm-snapshot based approach.

This will continue to maintain backward compatibility with vendor
partition on Android S.

Bug: 304829384
Test: OTA on Pixel
th - OTA from Android S to TOT with vendor on S
Change-Id: Id9263be881dd1a06923cd0ace007f1c027e6969d
Signed-off-by: Akilesh Kailash <akailash@google.com>
2024-03-20 11:10:49 -07:00
Akilesh Kailash
25eabc44f5 libsnapshot: Prepare removal of legacy snapshot
During OTA install, when vendor partition is on Android S, add a new flag in SnapshotUpdateStatus file to indicate that we need to support dm-snapshot based snapshot process. This will be used only during post OTA reboot.

The primary change here is the OTA install path. Earlier, dm-snapshot based approach was used; with this change, since both "snapuserd" and "update-engine" resides on system partition, OTA installation will use the userspace snapshot approach.

To maintain backward compatibility, the new flag "legacy_snapuserd" is used only after OTA reboot. This flag will make sure that update-engine will take the dm-snapshot based approach post reboot and for the entire duration of snapshot-merge.

Additionally, during first-stage init if the vendor is on Android S, then "snapuserd" binary will continue to work based off dm-snapshot as none of this change will impact the mount process.

Bug: 304829384
Test: OTA on Pixel
th - OTA from Android S to TOT with vendor on S
Change-Id: Idd9a60b09417cee141b2810e2d4b35e91c845a5c
Signed-off-by: Akilesh Kailash <akailash@google.com>
2024-03-20 11:08:18 -07:00
Dennis Shen
9e17d3a032 turn on aconfigd in init
Bug: b/312444587
Test: avd
Change-Id: Ibc88b57f88f924318d54ae81c70fd8da1fc1b437
2024-03-20 16:33:28 +00:00