This method was preserved under assumption it would be baked into many
prebuilts, but since it's inline, there should be no linkage to libutils
- thus, should be safe to remove anyway.
Bug: 35363681
Bug: 295394788
Test: treehugger
Change-Id: I59964935600e9e786424136177bfc8a70bebec67
This enhances the security requirement by only allowing
the owner app to change a locked DSU.
Bug: 277691885
Bug: 296985785
Test: 1. ensure device is OEM locked
2. adb shell am start-activity \
-n com.android.dynsystem/com.android.dynsystem.VerificationActivity \
-a android.os.image.action.START_INSTALL \
--el KEY_USERDATA_SIZE 2147483648 \
--es KEY_DSU_SLOT foo.lock
3. adb reboot fastboot
4. `fastboot gsi disable|wipe` should be blocked
Change-Id: I1a0cb8a074412468d16043ddf4101fbb76490115
Similar to fastboot binaries. This will ease the
automation to use this tool
Test: presubmit
Bug: 290951369
Change-Id: I5c879acc7cdecbafebfa074ef76034403cb0cd72
Extend snapshotctl binary on the device
to create and apply pre-created snapshots.
snapshotctl map-snapshots <directory-where snapshot patches are present>
1: snapshotctl creates the block device based on the size of the
snapshot patches.
2: snapshotctl will copy the data to the block device.
unmap and delete snapshots will cleanup.
No change in libsnapshot library except with minor refactoring.
This patch doesn't yet prepare the device to reboot from these
snapshots.
On Pixel 6 Pro, applying pre-created snapshots for all partitions
takes ~3 seconds wherein the delta between two builds are 24 hours apart.
Bug: 299011882
Test: snapshotctl map-snapshots /data/test-snapshots/
snapshotctl unmap-snapshots
snapshotctl delete-snapshots
Change-Id: I98a0fbd9cf7234c2188bad85cdd092ded8997710
Signed-off-by: Akilesh Kailash <akailash@google.com>
This is a host based tool wherein it compares two Android images and generates snapshot patches which are similar to Android OTA format.
There are few advantages:
1: All the computation of snapshot logic is pushed onto the host.
2: Each partition can have different compression algorithm.
3: All the libsnapshot_cow changes can be tested very quickly.
Here is the test run. This compares two builds which are 24 hours apart.
```
create_snapshot --source=$ANDROID_PRODUCT_OUT/system.img --target=./images/system.img --compression="zstd" &
create_snapshot --source=$ANDROID_PRODUCT_OUT/product.img --target=./images/product.img --compression="lz4" &
create_snapshot --source=$ANDROID_PRODUCT_OUT/vendor.img --target=./images/vendor.img &
create_snapshot --source=$ANDROID_PRODUCT_OUT/system_ext.img --target=./images/system_ext.img --compression="gz" &
create_snapshot --source=$ANDROID_PRODUCT_OUT/vendor_dlkm.img --target=./images/vendor_dlkm.img &
echo "Waiting for snapshot patch creation"
wait $(jobs -p)
echo "Snapshot patch creation completed"
```
========================================
Waiting for snapshot patch creation
Snapshot patch: vendor_dlkm.patch created successfully
Snapshot patch: vendor.patch created successfully
Snapshot patch: system_ext.patch created successfully
Snapshot patch: product.patch created successfully
Snapshot patch: system.patch created successfully
Snapshot patch creation completed
real 0m3.848s
user 0m14.239s
sys 0m8.045s
========================================
It takes ~4 seconds to generate the snapshot patches on the host. Snapshot patches are named as <partition-name>.patch.
Bug: 299011882
Test: create_snapshot between two builds as mentioned above.
Change-Id: Ic87dd3349a866b5626fa03f1f879f417a8116cc2
Signed-off-by: Akilesh Kailash <akailash@google.com>
aosp/2734054 added socket timeouts for nonblocking liblog ops.
seccomp policy was not updated so tests failed when unallowed
socksetopt syscall was made.
Bug: 298420226
Test: atest debuggerd_test
Change-Id: Iace232ec8b94e5d316d344abc5d866fe314607e0
Signed-off-by: Andrei Diea <adiea@google.com>
The command will be used by RMA tool to skip
device wiping when it is already in GSI mode.
This change also makes it easier to add more
gsi commands in the future without needing to
update the host side tool (fastboot).
Bug: 298130522
Bug: 298138572
Test: 1. reboot into fastboot mode
2. fastboot gsi status
Change-Id: Ic81f89a93b854f9ec70aebe2d209bfd1f98e3645
It is not necessary to compare the dumps with the library installed in
system partition.
Test: m out/target/product/generic_x86_64/lsdump_paths.txt
Bug: 280008249
Change-Id: I8fc39ad17d37cd43bf1d77ba23dde55d05dadce1
Existing code has transport memory leaks. Use smart pointers
for transport to get rid of those cases and manual memory
management
Test: atest fastboot_test
Test: manually checked transport isn't leaking anymore
Bug: 296629925
Change-Id: Ifdf162d5084f61ae5c1d2b56a897464af58100da
Signed-off-by: Dmitrii Merkurev <dimorinny@google.com>