Commit graph

6 commits

Author SHA1 Message Date
Yifan Hong
d81b8e3d77 roots.cpp: convert to C++ Fstab
Convert code to use C++ Fstab struct and C++ std::strings.

Bug: 62292478
Bug: 118634720
Test: boots
Change-Id: Ibdc1df5831bc885d7c1574419f41af026e49a137
2018-12-18 15:57:29 -08:00
Yifan Hong
d7b6858045 Fix ensure_path_mounted_at for fsck_unshare_blocks
Test: pass
Bug: 118634720
Change-Id: Icb2540892bd35659462f56c3883a39759f29eeab
2018-11-30 15:22:19 -08:00
Yifan Hong
4932780606 SYSTEM_ROOT -> get_system_root
Add a get_system_root() function in roots.cpp
which returns / or /system based on fstab.
This factors out the 'if' check from recovery.cpp
and fsck_unshare_blocks.cpp.

Test: boot recovery, mount system
Bug: 118634720
Change-Id: If4947cba3a3f08dbe695fd2b50a9354cd302ee03
2018-11-27 15:57:47 -08:00
Mark Salyzyn
fdea242a91 recovery: deprecate check for ro.build.system_root_image
If there is a "/system" in the fstab, then can not be a
system as root image.

Test: compile
Bug: 109821005
Change-Id: I2c852dcbdcf6de437d39039937799feeef949516
2018-10-11 09:04:56 -07:00
Jiyong Park
8b7af4c0ee Recovery image is self-contained
Now recovery mode is self-contained, which means we don't need to mount
system.img to run shell, etc. What is needed in recovery mode is all in
the recovery ramdisk image.

Since we no longer use /system as the mount point for the system.img,
this allows us to have identical filesystem layout as the system.img.
Executables and libs are installed to /system/bin and /system/lib.
Right now, we only have adbd, sh, toybox in /system/bin but will move
static executables from /sbin to /system/bin as soon as they are
converted to dynamic executables.

system.img is mounted to /mnt/system instead.

Bug: 63673171
Test: `adb reboot recovery; adb devices` shows the device ID
Test: `adb root && adb shell` and then
$ lsof -p `pidof adbd` shows that libm.so, libc.so, etc. are loaded from
the /lib directory.

Change-Id: I801ebd18f3e0a112db3d9a11e4fbb4e49181652a
2018-06-07 23:24:33 +09:00
David Anderson
edee8361d7 recovery: add --fsck_unshare_blocks option for adb remount
Allow "adb remount" on deduplicated filesystems to reboot into recovery
and run e2fsck to undo deduplication. The e2fsck binary is copied from
the system partition into tmpfs, and the system partition is unmounted
so e2fsck can run safely.

Bug: 64109868
Test: recovery with --fsck_unshare_blocks; adb remount
Change-Id: I7558749b018b58f3c4339e51a95831dbd5be1ae3
2018-05-30 13:24:30 -07:00