summaryrefslogtreecommitdiffstats
path: root/recovery.cpp
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2015-08-01 17:52:44 +0200
committerAndroid Git Automerger <android-git-automerger@android.com>2015-08-01 17:52:44 +0200
commitd9101adc4b2e8b147a1fd206fa5af8905ca2e6c8 (patch)
treec5b20159f20aa9b15b40b90291164dde137e693d /recovery.cpp
parentam 7d71725d: am 7666f65b: am 62e19231: Merge "updater: Hoist fsync() to outer loop." (diff)
parentam 2e979ef6: am 302779e7: Merge "recovery: Allow "Mount /system" for system_root_image." (diff)
downloadandroid_bootable_recovery-d9101adc4b2e8b147a1fd206fa5af8905ca2e6c8.tar
android_bootable_recovery-d9101adc4b2e8b147a1fd206fa5af8905ca2e6c8.tar.gz
android_bootable_recovery-d9101adc4b2e8b147a1fd206fa5af8905ca2e6c8.tar.bz2
android_bootable_recovery-d9101adc4b2e8b147a1fd206fa5af8905ca2e6c8.tar.lz
android_bootable_recovery-d9101adc4b2e8b147a1fd206fa5af8905ca2e6c8.tar.xz
android_bootable_recovery-d9101adc4b2e8b147a1fd206fa5af8905ca2e6c8.tar.zst
android_bootable_recovery-d9101adc4b2e8b147a1fd206fa5af8905ca2e6c8.zip
Diffstat (limited to 'recovery.cpp')
-rw-r--r--recovery.cpp19
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;
}
}