Commit graph

89367 commits

Author SHA1 Message Date
Akilesh Kailash
c900c7f093 Merge "libsnapshot: Enable snapshots during OTA install for S vendor" into main am: ad55fad080 am: 92a5899545
Original change: https://android-review.googlesource.com/c/platform/system/core/+/3011455

Change-Id: I72c7fee10dce4ebb491643a8bd3ff54f16a8e105
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-25 22:02:55 +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
f9e4a88a52 Merge changes Id9263be8,Idd9a60b0 into main am: da9db4f396 am: 06acf561b2
Original change: https://android-review.googlesource.com/c/platform/system/core/+/3005222

Change-Id: Ie7f18350ef5433855edd9461539d7115350e0ddc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-25 08:23:09 +00: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
10c15d3c3e Merge "Add //visibility:any_system_partition" into main am: ba28275e29 am: f31188063d
Original change: https://android-review.googlesource.com/c/platform/system/core/+/3000097

Change-Id: Icc31da04fc0b3a303897d79d8f5feba862ae2370
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-25 02:45:50 +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
1526392d41 Merge "cow_api_test: big replace op" into main am: 3326685511 am: fe335cf3d2
Original change: https://android-review.googlesource.com/c/platform/system/core/+/3006902

Change-Id: I52bcb6d2112a087ae9ed01c4e81e69928519a1bf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-22 22:23:12 +00: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
a4f8ee1f45 Merge "libsnapshot: chunk iov writes" into main am: 6bee318285 am: 5044d3fd01
Original change: https://android-review.googlesource.com/c/platform/system/core/+/3001513

Change-Id: Ibd60633bc1f89ac3dda6fe87d6738c1ee16fb036
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-22 19:17:54 +00: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
8c8aac2112 Merge "tombstoned: Rename proto tombstone before text tombstone." into main am: e0b55e5a7c am: 17b4ba3169
Original change: https://android-review.googlesource.com/c/platform/system/core/+/3009636

Change-Id: I2f8cf453fe833866510fdf883221de36c9c7e657
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-22 05:38:26 +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
e422a4a9bc Merge "liblp_builder_fuzzer: Bug Fix" into main am: a8c6a92f43 am: 7580419014
Original change: https://android-review.googlesource.com/c/platform/system/core/+/3002664

Change-Id: I480b766ae69d2491748bf5e9de7656c2d39a152f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-21 04:56:39 +00: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
a38e7fed0a Merge "snapuserd_test: check writer != nullptr" into main am: 844ce86595 am: baae2f3a5c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/3001312

Change-Id: I94072b6cd274fbb6dd6f0e797118a6db797bcca3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-21 03:25:46 +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
5575b29f0a Merge "Create directory for /data/misc/connectivityblobdb" into main am: 6ec79b5605 am: 66951ac52c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2880828

Change-Id: Iaeebb978b95d6516751a32a2e1ab839216254c8f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-20 20:48:51 +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
ab38a5a0b6 Merge "turn on aconfigd in init" into main am: 12c4de877e am: afa2a2caa8
Original change: https://android-review.googlesource.com/c/platform/system/core/+/3008533

Change-Id: I9af42fc578d36506e8246461a484d3d624221b5b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-20 19:21:41 +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
Justin Yun
b055317324 Merge "Avoid duplicated definition in llndk-versioning.h" into main am: d49456a11f am: 1f276d3732
Original change: https://android-review.googlesource.com/c/platform/system/core/+/3002662

Change-Id: I6c73054575cc220a40eed039445ca34ef363143f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-20 00:58:49 +00:00
Justin Yun
1f276d3732 Merge "Avoid duplicated definition in llndk-versioning.h" into main am: d49456a11f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/3002662

Change-Id: I0b8ef973d079d68ebe19182e06341121369b646a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-20 00:31:29 +00:00
Justin Yun
d49456a11f Merge "Avoid duplicated definition in llndk-versioning.h" into main 2024-03-20 00:17:15 +00:00
Treehugger Robot
8f2d1f4653 Merge "trusty: rpmb_dev: Use socket from init and update init script" into main am: f52256ea25 am: 1cdf883156
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2845115

Change-Id: I72264c169be36d140a5a4730972c1c722d926359
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-19 22:30:47 +00:00
Treehugger Robot
1cdf883156 Merge "trusty: rpmb_dev: Use socket from init and update init script" into main am: f52256ea25
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2845115

Change-Id: Iddaea131e5ab0161f147adaef227dd2b3dfcf1d5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-19 22:16:07 +00:00
Treehugger Robot
f52256ea25 Merge "trusty: rpmb_dev: Use socket from init and update init script" into main 2024-03-19 21:28:30 +00:00
Treehugger Robot
c741508513 Merge "toolbox/libmodprobe: add toolbox to vendor_ramdisk" into main am: b03f02bca4 am: 874b24bffe
Original change: https://android-review.googlesource.com/c/platform/system/core/+/3002577

Change-Id: Ice952ea55f1883eecb82bd80a78b5c304d84c28d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-19 20:50:45 +00:00
Treehugger Robot
874b24bffe Merge "toolbox/libmodprobe: add toolbox to vendor_ramdisk" into main am: b03f02bca4
Original change: https://android-review.googlesource.com/c/platform/system/core/+/3002577

Change-Id: Id00cb797fa66cdd986576c7a6e109fb4e33d8cd6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-19 20:35:47 +00:00
Treehugger Robot
b03f02bca4 Merge "toolbox/libmodprobe: add toolbox to vendor_ramdisk" into main 2024-03-19 20:08:30 +00:00