Commit graph

84684 commits

Author SHA1 Message Date
David Anderson
d8a9a0c81c init: Remove arbitrary delay in async persist writes.
Bug: 297093092
Test: manual test
Change-Id: Ia80b33d2fe87aa5da64b4f156fefeb474e68dc93
2023-10-06 14:52:08 -07:00
Sophia Coldren
d32b562ee9 Merge "Add an include" into main 2023-10-06 21:14:22 +00:00
Sophia Coldren
5880692ae2 Add an include
Change-Id: I0a6c64d9f1ddd9211de994fd4c6c44d53499775f
2023-10-06 18:46:17 +00:00
Xin Li
37e9952c93 Merge "Merge Android 14" into main 2023-10-06 05:34:13 +00:00
Xin Li
4f9ed9366f Merge Android 14
Bug: 298295554
Merged-In: Id86bcb915c8e2857bda26f64738dd5b643048e98
Change-Id: I6315e675753ec07fa1f67b69bcd05b831eeae6f0
2023-10-05 15:45:15 -07:00
Daniel Zheng
ad1ee13cec Merge "Removing is_retrofit code path" into main 2023-10-05 20:58:50 +00:00
Daniel Zheng
7248d1b0d8 Merge "Refactor off V2 Cow Ops" into main am: adad3dbefe
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2736101

Change-Id: I0344daaa43ed555c0bcdd377629c70a167f2afa4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-05 19:39:28 +00:00
Daniel Zheng
3e9b88d504 Removing is_retrofit code path
This code path was never invoked. is_logical will return false on
secondary partitions in retrofit devices, so nothing actually is ever
deleted. If we manage to call the delete, the device side code will
fail with "cannot open the super partition"

Test: fastboot flashall on sargo device
Change-Id: I20b430c5c30bf992506190ea4e00b0b69c7b1005
2023-10-05 12:37:57 -07:00
Daniel Zheng
adad3dbefe Merge "Refactor off V2 Cow Ops" into main 2023-10-05 19:12:56 +00:00
Arun Sharma
828d85ae89 Merge "FastbootDevice::boot1_1 null pointer dereference" into main am: 608e33f736
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2768099

Change-Id: Id99a4a6aceaedfdbc67311d6f7234c3334fc0209
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-05 17:45:17 +00:00
Daniel Zheng
4cda9ec9bb Merge "Adding test for reader compatibility" into main am: 4b3b6e2ff5
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2762279

Change-Id: I3720f7f966c54408c1c4dbe72222dac73ef6dbae
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-05 17:45:07 +00:00
Arun Sharma
608e33f736 Merge "FastbootDevice::boot1_1 null pointer dereference" into main 2023-10-05 17:33:34 +00:00
Daniel Zheng
4b3b6e2ff5 Merge "Adding test for reader compatibility" into main 2023-10-05 17:04:17 +00:00
Elliott Hughes
5cc875126a Merge "s/master/main/" into main am: b533f531df
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2772867

Change-Id: Ide151a5572106cb6e071ecdb70d97968d2a4a8a0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-05 16:41:39 +00:00
Arun Sharma
1a3456f0bc FastbootDevice::boot1_1 null pointer dereference
FastbootDevice::boot1_1 attempts to dereference a null pointer when the
boot_control_hal_ is not set. It needs a guard statement to prevent
that.

Test: Manually tested on device without BootControl.
Bug: 301682120
Change-Id: Id86bcb915c8e2857bda26f64738dd5b643048e98
2023-10-05 16:35:24 +00:00
Elliott Hughes
b533f531df Merge "s/master/main/" into main 2023-10-05 16:09:46 +00:00
Akilesh Kailash
0d38654b34 Merge "snapuserd: I/O request on overlapping blocks during snapshot-merge." into main am: 743c4cdb1c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2769106

Change-Id: Ie5a42ec523a948382b25200d92cfb1105d972138
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-05 14:18:31 +00:00
Akilesh Kailash
743c4cdb1c Merge "snapuserd: I/O request on overlapping blocks during snapshot-merge." into main 2023-10-05 13:42:30 +00:00
Harry Pan
7fa8dd655a Add new fastbootd battery-soc variable
Introduce new battery-soc variable to read battery
SSOC, this benefits manufacturing to better track
the SSOC after FSI image flashing in the userspace
fastbootd using the same approach as Android space,
otherwise it is difficult to implement the entire
battery SW stack from Android to fastboot bootloader
and generate the same test experience monotonically.

Bug: 303561559
Test: fastboot getvar battery-soc # in fastbootd
Change-Id: Ia3f68e314263d7dd4d4c45a908a0a49db6e761f9
Signed-off-by: Harry Pan <gspj@google.com>
2023-10-05 12:08:02 +00:00
Akilesh Kailash
cffa413de4 snapuserd: I/O request on overlapping blocks during snapshot-merge.
This fixes the case when all the following conditions are true:

1: Incremental OTA
2: When there are sequence of overlapping COPY operations within one merge-window
   (510 blocks)
3: Device is rebooted when snapshot-merge is in-progress of this
   merge-window. When device reboots, the state of merge-window (of 510 blocks) was
   merge-in-progress (aka - only partial set of blocks were merged in
   this window thereby the state of the base device is in-complete for
   this window)
4: During the next boot, if there any I/O request from the filesystem
   which maps to the merge-window in (3):
   	a: The data has to be retrieved from the scratch space of the
	COW until the snapshot-merge for that window is completed.

	b: Once the snapshot-merge is complete for that window, data
	has to be retrieved from base device.

The bug was in step 4(a) wherein I/O request was getting routed to base
device.

This patch addresses the above flow by fixing step 4(a).

A new vts test has been added to explicitly track this issue.

Additionally, there is no need to re-scan the partition if partition is in merge resume path. This should cut down the overhead of the scan.

Bug: 275296365
Test: 1: 100 iterations of ./vts_snapuserd_test --gtest_filter=SnapuserdTest.Snapshot_COPY_Overlap_Merge_Resume_IO_Validate_TEST
2: Incremental OTA on Pixel 6 Pro with multiple iterations of device
   reboot when merge is in progress

Change-Id: Ib53be7f07ff192a84ec7f7049b2c6be01dad1041
Signed-off-by: Akilesh Kailash <akailash@google.com>
2023-10-05 05:32:31 +00:00
Harsh Abichandani
4ac5b76d96 Added liblp_apis_fuzzer
exec/s: 9393
Test: ./liblp_apis_fuzzer
Bug: 285829660

Change-Id: I9830baf7ffbcffa7571aea75e69d1ced64fe613a
2023-10-05 05:03:32 +00:00
Kiyoung Kim
bf65cd213e Merge "Remove libbinder_rpc_unstable from system required libs" into main am: 7cf712ab3b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2762986

Change-Id: I73895850a5c23318f309895a0e91802e7231a270
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-05 04:27:36 +00:00
Kiyoung Kim
7cf712ab3b Merge "Remove libbinder_rpc_unstable from system required libs" into main 2023-10-05 03:54:36 +00:00
Daniel Zheng
c9770b29b9 Refactor off V2 Cow Ops
Refactor writer, reader + parser to work off v2 version of
CowOperations.

Test: m libsnapshot. ota on cuttlefish
Change-Id: Iec59be91e5f54782272b37702d645942df38c771
2023-10-04 18:09:35 -07:00
Treehugger Robot
72ba5c12be Merge changes Ib7509508,I7e256e8d into main am: 310e7ae496
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2767639

Change-Id: I7a3c878979b3d47963549b78df7d95509ec467a8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-05 00:42:27 +00:00
Christopher Ferris
448b784898 Merge "Change source to be a unique_ptr." into main am: e9f4feaf7e
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2768490

Change-Id: I754a47b102834e1a20ca1091af36854a0c6ec33f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-05 00:42:02 +00:00
Daniel Zheng
a16436d5d7 Adding test for reader compatibility
Reader + Parser v3 should be able to read V2 cow format written to disk.
This test reads in a small cow file written by basic_v2_cow_writer and
parses it to ensure this compatibility checks out.

Test: cow_api_test
Change-Id: I46ebf4e3f12cdb3e4716ca5b624aab5836086733
2023-10-04 17:37:26 -07:00
Treehugger Robot
310e7ae496 Merge changes Ib7509508,I7e256e8d into main
* changes:
  snapuserd: Add an extractor tool.
  inspect_cow: Add an --extract-to argument.
2023-10-05 00:25:50 +00:00
Christopher Ferris
e9f4feaf7e Merge "Change source to be a unique_ptr." into main 2023-10-05 00:13:19 +00:00
Elliott Hughes
716ff7b55a s/master/main/
Test: treehugger
Change-Id: Iabb23436d92686b934f2f2609217714b64ae75de
2023-10-04 23:31:09 +00:00
David Anderson
c942daf179 snapuserd: Add an extractor tool.
This is similar to inspect_cow --extract-to, except it uses snapuserd.
It is a diagnostic host tool and uses the tooling added for host
testing.

Usage: snapuserd_extractor -cow COW_FILE -base BASE_FILE -out OUT_FILE
                           -num_sectors NUM_SECTORS

Unlike inspect_cow, this supports xor/copy operations.

The extractor code is separated into a utility file so we can use it for
additional tests later on.

Bug: N/A
Test: manual test
Change-Id: Ib7509508cba45e6c3a0db8c75454e33c2a503e03
2023-10-03 19:54:28 -07:00
David Anderson
8a28163d33 inspect_cow: Add an --extract-to argument.
This adds an --extract-to argument to inspect_cow to verify that full
OTA snapshots contain correct data. It does not yet work for ordered
ops.

Test: inspect_cow
Bug: N/A
Change-Id: I9014da3e83fd4fb5ea54ac1d36e527b3e3e6c9d5

Change-Id: I7e256e8ddec626980cdcf8680bbeac3c2e9d8de1
2023-10-03 16:02:26 -07:00
Steven Moreland
5248c5d72a libvndksupport: log sphal namespace fallback
If someone is trying to use the sphal namespace, but it
isn't available, we should probably fix this code or add an
sphal namespace there or similar. Add log for more clarity.

Bug: N/A
Test: boot cuttlefish, this doesn't get logged
Change-Id: I2fd2cddc90f529218c99ede8daf2891d84ceb94c
2023-10-03 17:13:10 +00:00
Christopher Ferris
9dabc9ef32 Change source to be a unique_ptr.
The current code keeps a pointer to a local variable which doesn't
work too well. Change this to a unique_ptr and allocate the source
object that will be used instead.

Test: All unit tests pass.
Test: fastboot -w flashall on a mokey which crashed without this change.
Change-Id: Ief5437374181e514928c45dd540b42898901a137
2023-10-02 17:02:51 -07:00
Treehugger Robot
95879d3e8b Merge "Log the CowOperation when decompression failed" into main am: e877885533
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2768488

Change-Id: Ic4b424caa8183140e53dc28c89990f5883f1e163
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-02 21:18:27 +00:00
Treehugger Robot
e877885533 Merge "Log the CowOperation when decompression failed" into main 2023-10-02 20:45:38 +00:00
Kelvin Zhang
ab4c9621d4 Log the CowOperation when decompression failed
Test: th
Bug: 302992208
Change-Id: I617062d75a79ae73dfdff13c2e9d2a62c5dfcfc0
2023-10-02 11:08:18 -07:00
Elliott Hughes
fd605f23d1 Merge "Remove obsolete <linux/capabilities.h> workarounds." into main am: b0bff22429
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2770138

Change-Id: I15862cbef6b2c0cdf0a70d2ba636a63b5e98c708
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-02 16:25:38 +00:00
Elliott Hughes
b0bff22429 Merge "Remove obsolete <linux/capabilities.h> workarounds." into main 2023-10-02 15:09:26 +00:00
Treehugger Robot
63a7d5bcbf Merge "Adjust unit tests for supporting chain partition with no ab" into main am: b90cd3b5ab
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2765270

Change-Id: I42ca902df13dd623561dcab721c73c45be153cdc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-02 04:49:23 +00:00
Treehugger Robot
b90cd3b5ab Merge "Adjust unit tests for supporting chain partition with no ab" into main 2023-10-02 03:28:37 +00:00
Elliott Hughes
7d46c3fd7a Remove obsolete <linux/capabilities.h> workarounds.
We've updated the glibc header (and musl will just use the bionic uapi
headers), so this is obsolete (and getting in the way of someone trying
to use the PERFMON capability).

Test: treehugger
Change-Id: Ife7ee076179e1db6246738aa41c2b82bd8546265
2023-09-29 22:45:59 +00:00
Bradley Furman
5eea7e384b Update the fastboot command size from 64 to 4096 to cover the changes from https://android-review.git.corp.google.com/c/platform/system/core/+/2214970
BUG=182864081

Change-Id: I6766647e53d777fd61df6e40cfefb45c7b138c77
2023-09-29 21:18:23 +00:00
Xin Li
f43377946b Merge "Merge UP1A.231005.007" into aosp-main-future 2023-09-29 06:40:58 +00:00
Treehugger Robot
4e1a1f05a6 Merge "Add the missing copyright headers to the .S files." into main am: aadb2046fd
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2767705

Change-Id: If0e4e49aa1e5a9a9614c6c46b9702d357c657841
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-28 20:41:25 +00:00
Treehugger Robot
aadb2046fd Merge "Add the missing copyright headers to the .S files." into main 2023-09-28 20:13:37 +00:00
Treehugger Robot
668c95919a Merge "Keep fs_mgr_vendor_overlay_test in internal cf." into main am: ec74e27a61
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2765988

Change-Id: I8e861c8f49cb21acd45ef97c9009ccfb65658870
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-28 18:22:23 +00:00
Elliott Hughes
041afb2883 Add the missing copyright headers to the .S files.
Dates taken from `git log --follow`.

Test: treehugger
Change-Id: I80e9ea6aa01f8e0553295453749afcbc3af827f9
2023-09-28 10:41:21 -07:00
Treehugger Robot
ec74e27a61 Merge "Keep fs_mgr_vendor_overlay_test in internal cf." into main 2023-09-28 17:13:01 +00:00
wuhaitao3
250aa5ed72 Adjust unit tests for supporting chain partition with no ab
Test: libfs_avb_internal_test
      libfs_avb_test
Signed-off-by: wuhaitao3 <wuhaitao3@xiaomi.corp-partner.google.com>
Change-Id: I5f91510e72776ed2ed53756ae94a87b1417ae1a5
2023-09-28 11:19:55 +00:00