The initramfs.img from kernel builds do not store kernel modules under
_16k directory. Currently, init is programmed to only load kernel
modules from _16k dir if running on 16K page size kernel. Relax this
restriction so that booting on custom 16K kernel would work without
going through platform rebuild.
Test: th
Bug: 293313353
Bug: 300184677
Change-Id: I9ee3c74066ad9ec5127f1e8662f7c1273445994c
This is to support when partition sizes are greater than 2GB (2^31)
on 32-bit userspace.
Bug: 300178204
Test: OTA on device with 32-bit userspace + product partition > 2GB
Change-Id: I7074682352d8388ed410c684cb7cb0fa346ba24c
Signed-off-by: Akilesh Kailash <akailash@google.com>
Adding block sz to compressor classes to prepare for variable block size
compression
Test: m libsnapshot
Change-Id: I84db20c80c0f95188f79ccc73b5c30678bd75e78
A clang update enabled -Wreorder-init-list by default. Since it doesn't
provide any benefit to the debuggerd code, disable the warning.
Test: Builds without warnings.
Change-Id: I75cfe064ba92c74312ba33f329b1364258eba06c
The fstab provided by the user/caller might not be the default fstab,
which might not include the /cache mount entry. We should just use the
procfs mount info to determine if /cache is currently mounted.
Bug: 300036012
Test: adb_remount test
Change-Id: I4643d0a21ae21f3513f715de424f0be1fe64ff9e
Two new API's have been added:
1: BootFromSnapshotsWithoutSlotSwitch: This will create a new marker
which indicates first-stage init to mount the partitions off snapshots.
We need this marker as during boot, there are couple of places during
mounting snapshots wherein the marker is used. However, there is no
change in the existing I/O path related to OTA.
2: PrepareDeviceToBootWithoutSnapshot: This will delete the marker so
that subsequent reboot will not have the partitions mounted without the
snapshots.
VTS tests covers both these API's. Additionally, when these
markers are present, new OTA's cannot be installed. All these
are covered in VTS tests.
===========================================================
snapshotctl: General flow to apply and revert pre-created snapshots
1: To install the pre-created snapshots:
$snapshotctl map-snapshots <directory path containing snapshots patches>
Now the device is ready to boot from snapshots.
2: After device reboots, partitions are mounted off the snapshots. There
is no snapshot-merge.
3: In order to go back to previous build:
$snapshotctl revert-snapshots
Now the device is ready to boot from base build.
4: After device reboots back to previous build, all the snapshot states
and COW images are removed.
============================================
Additional commands:
To delete the pre-created snapshots:
$snapshotctl delete-snapshots
======================================
Tested it on Pixel 6 Pro between two builds which are ~24 hours apart.
1: Creating snapshots on a linux-host - ~4-6 seconds
2: Applying pre-created snapshots - ~10-15 seconds (includes intermediate
transfer of patches to the device). This depends on the size of snapshot patches.
3: Device reboot - ~12-14 seconds.
Bug: 299011882
Test: 1: Apply pre-created snapshots
2: Reboot device: Verify new build
3: Apply OTA when partitions are mounted of snapshots and verify OTA
fails.
3: Revert-snapshot and reboot.
4: Verify device goes back to base build.
Full OTA on Pixel. vts_libsnapshot_test
Change-Id: I36a72d973d8f70ae49773ebd45dd996fac22a4e3
Signed-off-by: Akilesh Kailash <akailash@google.com>
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