From 8b7af4c0ee245c913ae00dbf052c85156fb1b68e Mon Sep 17 00:00:00 2001 From: Jiyong Park Date: Fri, 1 Jun 2018 11:58:54 +0900 Subject: 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 --- recovery.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'recovery.cpp') diff --git a/recovery.cpp b/recovery.cpp index 98cbfed2f..fea65ae9e 100644 --- a/recovery.cpp +++ b/recovery.cpp @@ -820,15 +820,13 @@ static Device::BuiltinAction prompt_and_wait(Device* device, int status) { break; } case Device::MOUNT_SYSTEM: - // For a system image built with the root directory (i.e. system_root_image == "true"), we - // mount it to /system_root, and symlink /system to /system_root/system to make adb shell - // work (the symlink is created through the build system). (Bug: 22855115) + // the system partition is mounted at /mnt/system if (android::base::GetBoolProperty("ro.build.system_root_image", false)) { - if (ensure_path_mounted_at("/", "/system_root") != -1) { + if (ensure_path_mounted_at("/", "/mnt/system") != -1) { ui->Print("Mounted /system.\n"); } } else { - if (ensure_path_mounted("/system") != -1) { + if (ensure_path_mounted_at("/system", "/mnt/system") != -1) { ui->Print("Mounted /system.\n"); } } -- cgit v1.2.3