Get more details about the usb connection when it times out.
Test: adb-remount-test.sh
Bug: 132070014
Change-Id: I784bea3a2cefcef423b576854abb795add47d123
Regression from commit 77c28476f1
("Remove the mount points defined in skip_mount.cfg from
ReadDefaultFstab()") resulted in ReadFstabFromFile to report
errno ENOENT even upon success, preventing clear error propagation
for real failures (ReadFstabFromFile would _always_ report ENOENT).
The bad error propagation resulted in an adb remount failure.
Added immunization against future adjustments that may also
result in a similar regression in adb remount behaviors.
Test: adb-remount-test.sh
Bug: 132594161
Bug: 128961335
Change-Id: Icf5d48bbfc6d938d4b9657ca8004a6a6ddaab5a6
The expected behavior is to ensure the path mounted at the given mount
point, instead of the one in fstab.
Test: Boot into taimen recovery. Choose "Mount /system" from menu. Check
that system image is mounted at /mnt/system.
Change-Id: I07128e34bc47561afee8164611709a2b5393f9b7
The vroot device is specified on the kernel command-line, rather than
being created by fs_mgr.
Bug: 132275224
Test: taimen boots
Change-Id: I368450a333f383d434591555a6ea562e1bd0bc1e
Also, add an Emplace() method to DmTable to make target construction
easier. For example,
table.AddTarget(std::make_unique<DmTargetLinear>(...));
Becomes:
table.Emplace<DmTargetLinear>(...);
Bug: 132206403
Test: libdm_test gtest
Change-Id: Iac62c74546ebaa660cb32d6894a019bdac24a305
Replacing "ro.boot.vbmeta.devices_state" with
"ro.boot.vbmeta.device_state" to check if the device is locked.
Bug: 132224452
Test: tree hugger
Change-Id: If4f312730cc82ad5a5d5104a7aca8b9691cf6600
boot-debug.img is introduced to allow 'adb root' if the device is
unlocked, and it cannot be release signed. If /boot partition is chained
in AVB signing and boot-debug.img is used, avb_slot_verify() in
userspace will return AVB_SLOT_VERIFY_RESULT_ERROR_PUBLIC_KEY_REJECTED
and fs_mgr will refuse to boot. This CL treats the public key rejection
as non-fatal for chained vbmeta to continue booting, if the device is
unlocked.
Bug: 129508966
Test: can root with user load which /boot chained in AVB signing
Change-Id: Idfa8caffbb96f33702b1749afd2e2a59616ddba7
If we do not have at least the minimum space to create a scratch
partition, let's resize the other partitions to zero to make the
space and try again.
Specify additional shared library dependencies for remount command.
margin_size could never be calculated because "scratch" partition
does not exist, so use super partition instead as argument to
GetBlockDeviceInfo.
Add a "Now reboot your device for settings to take effect" message
if the -R argument was not supplied. Adjust some of the messages
to be clearer.
Manual test: On a full DAP device, resize or flash both a and b side
for system, vendor and product with fastboot to duplicate failure
conditions of limited space and check remount command resizes other
side partitions to mitigate.
Test: manual and adb_remount_test.sh
Bug: 131390072
Change-Id: I34c4a973f88a5e1e06b64af9589a84721dd1bbbd
The first stage init skips mounting the mount points defined in
skip_mount.cfg, but these mount points still return from
ReadDefaultFstab(). The behavior causes some error logic which
try to access the partition which had been skipped.
After applying the patch. ReadDefaultFstab() will not contain the
skipped mount points.
Bug: 128961335
Test: `fastboot delete-logical-partition product_a`
Test: `fastboot flash system aosp_arm64-userdebug`
Test: `fastboot -w reboot` and boot to home screen
Change-Id: I3156260b5d37647dbecf98ca90601a089bea5c46
The code to read verity state in userspace is deprecated in favor of
having the bootloader read and report the state, so this change
removes this now unused code.
Bug: 73456517
Test: boot
Change-Id: Ib626fd61850bce3016179ca92a9831c2ac29c032
After this change, all the noise from mkfs is suppressed:
$ adb remount
[libfs_mgr]superblock s_max_mnt_count:65535,/dev/block/by-name/system_b
[libfs_mgr]__mount(source=/dev/block/by-name/system_b,target=/mnt/scratch,type=ext4)=-1: Invalid argument
[libfs_mgr]__mount(source=/dev/block/by-name/system_b,target=/mnt/scratch,type=f2fs)=0: Success
Using overlayfs for /system
Using overlayfs for /vendor
Using overlayfs for /product
[libfs_mgr]__mount(source=overlay,target=/system,type=overlay,upperdir=/mnt/scratch/overlay/system/upper)=0
[libfs_mgr]__mount(source=overlay,target=/vendor,type=overlay,upperdir=/mnt/scratch/overlay/vendor/upper)=0
[libfs_mgr]__mount(source=overlay,target=/product,type=overlay,upperdir=/mnt/scratch/overlay/product/upper)=0
remount succeeded
Test: manual as above
Bug: 130739326
Change-Id: I7ed8842e42b74b6a487ce6324b28baf78f1f63bf
umount_all is the cleanup step for mount_all.
In particular, the mount_all builtin creates a verity device,
'postinstall-verity', for the following line:
system /postinstall ... ... slotselect_other,logical,avb_keys=...
cppreopt umounts /postinstall but doesn't destroy the postinstall-verity
device, causing OTA to fail (because it cannot destroy the
system_[other] device). umount_all also destroy the verity device.
Note that mount_all does not map system_[other]; it is mapped by
first stage init. Hence, umount_all doesn't destroy it either. The OTA
client is reponsible for unmapping the device itself.
Bug: 129988285
Test: flash, boot, then check `dmctl list devices`, then OTA
Change-Id: Id3ab65b3860b6ea6cfec310ab13652009c81f415
Merged-In: Id3ab65b3860b6ea6cfec310ab13652009c81f415
For bringup devices that do not have right-sized partition, and if
/system is now root, check / to be sure.
Consider unshare blocks for ext4 as dead code, provide a strong
message to caller to provide all the dependencies to overlayfs.
Test: adb-remount-test.sh
Bug: 130327601
Change-Id: Iffa7c5f24d8f409e71f89fe9ece274d8c476f6fc
On some devices (e.g., emulator), init needs to read AVB footer from
a logical partition because:
1) Dynamic/logical partition is enabled
2) The partition is AVB chained, i.e., need to locate footer from the end
3) Logical partition is not understandable by bootloader,
but there is no bootloader in this case
Bug: 125540538
Bug: 128434470
Test: boot and force the fallback path, to check it can get logical path
Change-Id: Ie304bce234cbf0f938f386f7ce59235c851e0e2d
- Rename SparseBuilder to ImageBuilder, WriteSplitSparseFiles
to WriteSplitImageFiles, WriteToSparseFile to WriteToImageFile, etc.
- Add sparsify argument to ImageBuilder, WriteToImageFile, and
WriteSplitImageFiles
This allows lpmake to write non-sparse super image directly. Virtual
devices needs non-sparse images to work on.
Test: lpmake without --sparse
Test: liblp_test
Bug: 120041578
Change-Id: I76ee09efd02df7caaa8abd37a55ae0bebf9cfa29
Unblocked the previous error we are now reaching the
default 5min timeout which is too short for this test.
Increase it to 1h.
Test: None
Bug: 117670584
Change-Id: I7fe40e54a7fb978392ee919226c0f05413e7349e
The pinned file should have NOCOW_FL flag.
Bug: 129803146
Change-Id: Idaf5bdbbdcce1c3805cd16ddb0c1c7f1df87dcfb
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Older host adb client do not recognize reboot-fastboot,
switch it for "adb reboot fastboot" which should be the
same.
Test: None
Bug: 117670584
Change-Id: Iec5230ca66ec18fe7d7c0ebd3f9ab9596a6e7b3c