summaryrefslogtreecommitdiffstats
path: root/recovery.cpp
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2015-07-30 23:43:27 +0200
committerRom Lemarchand <romlem@google.com>2015-11-16 23:28:40 +0100
commit8f90389966fabf532b24741d49245215279533e1 (patch)
tree84402f1188b05dc43d5ef00902475f92843e7029 /recovery.cpp
parentapplypatch: Fix the checking in WriteToPartition(). (diff)
downloadandroid_bootable_recovery-8f90389966fabf532b24741d49245215279533e1.tar
android_bootable_recovery-8f90389966fabf532b24741d49245215279533e1.tar.gz
android_bootable_recovery-8f90389966fabf532b24741d49245215279533e1.tar.bz2
android_bootable_recovery-8f90389966fabf532b24741d49245215279533e1.tar.lz
android_bootable_recovery-8f90389966fabf532b24741d49245215279533e1.tar.xz
android_bootable_recovery-8f90389966fabf532b24741d49245215279533e1.tar.zst
android_bootable_recovery-8f90389966fabf532b24741d49245215279533e1.zip
Diffstat (limited to '')
-rw-r--r--recovery.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/recovery.cpp b/recovery.cpp
index a0c74524e..09b061d7d 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -862,9 +862,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;
}
}