diff options
author | Tao Bao <tbao@google.com> | 2015-07-31 18:43:39 +0200 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-07-31 18:43:39 +0200 |
commit | 302779e71cb1be68f60cb044c85436d4d6bcfecc (patch) | |
tree | 6aff8d34f5ec911e7621772adc6c76ed89d162f6 /recovery.cpp | |
parent | Merge "updater: Hoist fsync() to outer loop." (diff) | |
parent | recovery: Allow "Mount /system" for system_root_image. (diff) | |
download | android_bootable_recovery-302779e71cb1be68f60cb044c85436d4d6bcfecc.tar android_bootable_recovery-302779e71cb1be68f60cb044c85436d4d6bcfecc.tar.gz android_bootable_recovery-302779e71cb1be68f60cb044c85436d4d6bcfecc.tar.bz2 android_bootable_recovery-302779e71cb1be68f60cb044c85436d4d6bcfecc.tar.lz android_bootable_recovery-302779e71cb1be68f60cb044c85436d4d6bcfecc.tar.xz android_bootable_recovery-302779e71cb1be68f60cb044c85436d4d6bcfecc.tar.zst android_bootable_recovery-302779e71cb1be68f60cb044c85436d4d6bcfecc.zip |
Diffstat (limited to '')
-rw-r--r-- | recovery.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/recovery.cpp b/recovery.cpp index 83ca5812d..8123903ae 100644 --- a/recovery.cpp +++ b/recovery.cpp @@ -863,9 +863,24 @@ prompt_and_wait(Device* device, int status) { break; case Device::MOUNT_SYSTEM: - if (ensure_path_mounted("/system") != -1) { - ui->Print("Mounted /system.\n"); + char system_root_image[PROPERTY_VALUE_MAX]; + property_get("ro.build.system_root_image", system_root_image, ""); + + // 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 + if (strcmp(system_root_image, "true") == 0) { + if (ensure_path_mounted_at("/", "/system_root") != -1) { + ui->Print("Mounted /system.\n"); + } + } else { + if (ensure_path_mounted("/system") != -1) { + ui->Print("Mounted /system.\n"); + } } + break; } } |