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>
Adding a test case for checking if flash task is a dynamic partition
flash task. This function is used since is-logical only works in
fastbootd, and should_flash_in_userspace() only works if
$ANDROID_PRODUCT_OUT is set. This function works with fastboot update
when called in bootloader without $OUT dir set
Test: fastboot_test
Change-Id: I65309f97e04fdfc449e61de5cd3a6feff18bc9ab
Adding documentation on the explicit pattern match we are going to add
to optimizing flash super.
Test: na
Change-Id: I57c19fb2a85d74beea5b91e38f6f46fa47637117
Adding test cases for correct formation of optimized flash super task.
We are adding an explicit pattern match for this task to be correctly
formed. Changing Optimized flash task to only remove the reboot to
userspace as a user might want to reboot back to bootloader after
flashing. We also need to change a couple functions to take a
IFastbootDriver to mock up the initialization path.
Test: fastboot_test
Bug: 297085098
Change-Id: Ic5c63bd4057ca6d64647134e5ce33fef12077fdb
Adding a hard pattern check for optimized task formation. To keep
behavior consistent, we will remove the old initialization path and add
resize tasks after attempting optimization.
Test: fastboot_test
Bug: 297085098
Change-Id: Ie0e656af9be7abdd130290fe547ffbf385ce75d6
This is supposed to be a host tool, but was being installed on
cuttlefish devices.
Bug: 205632228
Test: Presubmits
Change-Id: I9eb1ae1a5c171253617fa12283e2ec651afb5539
OEM can add self-owned groups, but the system init cannot support if the group numbers are over than 12, relax some restrictions as appropriate.
Bug: b/296826987
Signed-off-by: Haichao Li <liuhc3@motorola.com>
Change-Id: I231d9f6c82e93c08bc97ca32df70e5b28760acbc