Commit graph

84753 commits

Author SHA1 Message Date
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
Dan Shi
69f57f98c5 Keep fs_mgr_vendor_overlay_test in internal cf.
Bug: 302382476
Change-Id: I369927033b407660d2c0e7bdb85494c826c0b406
Test: presubmit
2023-09-28 06:32:31 +00:00
Treehugger Robot
b5ce7aa444 Merge "disable sync_on_suspend when flag is set" into main am: cfec879ad6
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2762661

Change-Id: I44e9af64a4562ede087007cfb19e070ad0ed3a6a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-28 00:52:03 +00:00
Treehugger Robot
cfec879ad6 Merge "disable sync_on_suspend when flag is set" into main 2023-09-28 00:03:50 +00:00
Xin Li
d4593eca5b Merge UP1A.231005.007
Bug: 291102124
Merged-In: I02e3046bd85d0dfebc68ab444f1796bb54cc69c7
Change-Id: I1978b02276be8a1e7b272dbdb8e18347ef2c8aca
2023-09-27 16:05:23 -07:00
Daniel Zheng
1b53b83925 Merge "Add copyright to libsnapshot/tools" into main am: 26bed5fc09
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2763850

Change-Id: I868a1db6b5920a827aa60c375992a3f21895290a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-27 19:45:07 +00:00
Daniel Zheng
e42df43569 Merge "Add binary to write basic COW" into main am: 0fc7feeafb
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2763849

Change-Id: I57488d1893a80bf44e5c3b12ec6f014691329c77
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-27 19:44:16 +00:00
Daniel Zheng
26bed5fc09 Merge "Add copyright to libsnapshot/tools" into main 2023-09-27 18:39:00 +00:00
Daniel Zheng
0fc7feeafb Merge "Add binary to write basic COW" into main 2023-09-27 18:38:55 +00:00
Steve Muckle
5ebc657386 disable sync_on_suspend when flag is set
Bug: 285395636
Test: suspend/resume testing
Change-Id: I2d97d8366b864ab3e72d7ae38a0f4906dc74ec6f
2023-09-27 16:36:26 +00:00
Snehal Koukuntla
a345e5a848 Merge "Remove ambgiuity in format specifier" into main am: 321f0989e5
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2765005

Change-Id: I5838baa1a0b085ac471f310547aaf9f3490031c0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-27 16:27:40 +00:00
Tomasz Wasilczyk
8703cb8ed6 Merge "Revert "Revert "Lock down String8|16.string() usage""" into main am: 8c9c7d076f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2752223

Change-Id: Ifd89ccacb1f70471daa91050f079271cc6beca0f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-27 16:26:39 +00:00
Snehal Koukuntla
321f0989e5 Merge "Remove ambgiuity in format specifier" into main 2023-09-27 16:06:58 +00:00
Tomasz Wasilczyk
8c9c7d076f Merge "Revert "Revert "Lock down String8|16.string() usage""" into main 2023-09-27 15:06:23 +00:00
Snehal
6a12d23eab Remove ambgiuity in format specifier
Bug: 302163991

Test: m trusty-coverage-controller

Change-Id: I26318eeb4a6770bd01d3c677ca3cf5c76ce33fa0
2023-09-27 12:29:07 +00:00
Kiyoung Kim
566f1371e4 Remove libbinder_rpc_unstable from system required libs
libbinder_rpc_unstable is in the list of system required libs, but the
library is already located in the system/{LIB}, and this creates link to
the self namespace. Remove libbinder_rpc_unstable from system required
libs as it doesn't make sense to have require and provide same library
in a single image.

Bug: 298333253
Test: Cuttlefish build and boot succeded
Change-Id: Idb40e1dbc1053d4882093c188a36b2cc8d86e918
2023-09-27 10:26:41 +09:00
Daniel Zheng
12c7d42a55 Merge "should_flash_in_userspace signature change" into main am: ac758f2ccc
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2759691

Change-Id: I308999d3ef0a9a5b75c089f5357156203866a713
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-27 00:19:59 +00:00
Daniel Zheng
ac758f2ccc Merge "should_flash_in_userspace signature change" into main 2023-09-26 23:55:25 +00:00
Daniel Zheng
7a8f82acbd should_flash_in_userspace signature change
We should change should_flash_in_userspace to work without
$ANDROID_PRODUCT_OUT being set and fall back on $OUT directory when
source isn't specified

This also fixes the flashing issue of flashing retrofit devices without
$ANDROID_PRODUCT_OUT set. If we
call fastboot update on a retrofit device, copy_avb_footer will resize
buf->sz of secondary partitions to the partition size, causing us to
send the unsparsed payload to the device -> "Invalid Size" issue.

This is because secondary partitions are considered physical partitions
on retrofit devices && should_flash_in_userspace wouldn't work if
$ANDROID_PRODUCT_OUT is set, so our first return clause in
copy_avb_footer doesn't catch this edge case causing us to resize the
buf-> sz incorrectly.

Did some testing, and also observed a case where flashing is able to
succeed despite $ANDROID_PRODUCT_OUT not being set before, so there
might still be some other edge case that we are still missing.

Test: fastboot update on sargo without $ANDROID_PRODUCT_OUT

Change-Id: I0e4781d96709b712f7d71657ec0d16d99b90214d
2023-09-26 16:55:06 -07:00
Daniel Zheng
301acae35b Add copyright to libsnapshot/tools
Adding copyright to cow_benchmark + basic_v2_cow_writer

Test: th
Change-Id: Ic6c32b68bbeaa3c0c365f146ef4342356e13706a
2023-09-26 16:51:53 -07:00
Daniel Zheng
d7c5511095 Add binary to write basic COW
Adding small binary to write a simple COW for version 2. We will then
use updated reader to make sure we can read this version 2 cow. Think it
would be a good idea to keep the binary here to see how exactly we
generated the cow (useful for debugging and if we ever need to recreate
this cow)

Test: m basic_v2_cow_writer
Change-Id: I28435025b7a8280fc5c4574876cc9110b391cb0e
2023-09-26 16:51:48 -07:00
Elliott Hughes
a441e2ef67 Merge "Stop duplicating <linux/capabilities.h>." into main am: 8d983ee878
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2760169

Change-Id: Ie51e9e5f2cd6d37928a37b0b1bb3870621ac51d3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-26 19:14:58 +00:00
Elliott Hughes
8d983ee878 Merge "Stop duplicating <linux/capabilities.h>." into main 2023-09-26 17:59:53 +00:00
Khyber Sen
589c8d1e44 rpc_binder: Change trusty_tipc_fuzzer to support multiple connections and messages
This changes `trusty_tipc_fuzzer` to be more like the existing binder rpc_fuzzer,
which opens and closes multiple connections and sends multiple messages in a single fuzz input.

The max number of connections is controlled by the define `TRUSTY_APP_MAX_CONNECTIONS`,
which defaults to `1`, thus keeping the existing behavior for now.

In the next CL, I'll add more fuzzers with `-DTRUSTY_APP_MAX_CONNECTIONS=10` instead.

Test: Build and run in trusty emulator
Change-Id: I9692e4d0295052a8da2204f63be9e52939e70ac3
2023-09-25 23:18:33 +00:00
Elliott Hughes
94ccdc06d0 Stop duplicating <linux/capabilities.h>.
This doesn't help the person who wants CAP_BPF, but we can fix that
better by adding it to our stale glibc (and our future switch to musl
will mean we'll never have similar problems again).

I think this just dates from when we still supported building the OS on
darwin, but those days are long gone, and I think this hack can be put
to rest now...

Test: treehugger
Change-Id: I3c2e56c68a5b00c1ad0aed422c6ce60886063f50
2023-09-25 20:33:02 +00:00
Daniel Zheng
d545b31663 Merge "is_retrofit_device to work in bootloader" into main am: d774be9b05
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2759543

Change-Id: If431856a2ad838d2f7393c05600a24ddb610a0ba
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-25 19:04:30 +00:00
Daniel Zheng
d774be9b05 Merge "is_retrofit_device to work in bootloader" into main 2023-09-25 18:21:36 +00:00
Thiébaud Weksteen
9229827386 Merge "Skip /metadata/sepolicy creation" into main am: 911d309224
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2761545

Change-Id: I7acfa6f5cb28f051ca5fae7d641d216fe5254fcf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-25 08:12:00 +00:00
Thiébaud Weksteen
911d309224 Merge "Skip /metadata/sepolicy creation" into main 2023-09-25 07:40:02 +00:00
Thiébaud Weksteen
a6b5f94687 Skip /metadata/sepolicy creation
Bug: 297794885
Test: presubmit
Change-Id: I93f94f319d0f86e1cad6f2a4912b5df3aae09cec
2023-09-25 16:07:47 +10:00
Treehugger Robot
8cd8ce3fc0 Merge "Create_cow: Hash of target blocks should not be stored." into main am: a2cd2202f0
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2759698

Change-Id: Ib652154e55c271260cbf0070af9c96f674c31709
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-24 01:59:18 +00:00
Treehugger Robot
a2cd2202f0 Merge "Create_cow: Hash of target blocks should not be stored." into main 2023-09-24 00:46:55 +00:00