diff options
author | David Anderson <dvander@google.com> | 2018-10-29 18:48:56 -0700 |
---|---|---|
committer | David Anderson <dvander@google.com> | 2018-10-30 13:47:59 -0700 |
commit | 2b2f423ef694a03f4fd429b1d3fa221619131df4 (patch) | |
tree | ebf4be0805c18d4bb9f450be8bfcd2742e16845b /recovery_main.cpp | |
parent | d84d570d8c5b244befe0c0faf3e310b1cd9caa76 (diff) |
recovery: Fix mounting /system with dynamic partitions.
When using dynamic partitions, the blk_device field in fstab_rec must be
translated to a /dev/block/dm-N node with
fs_mgr_update_logical_partition. However, init will not have created
these nodes to begin with since CreateLogicalPartitions is not called in
recovery. This patch addresses both issues.
Note that flashing system through fastbootd will not work while /system is
mounted.
Bug: 118634720
Test: manual test
Change-Id: I06c83309d09eab6b65245b1ed10c51d05398f23e
Diffstat (limited to 'recovery_main.cpp')
-rw-r--r-- | recovery_main.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/recovery_main.cpp b/recovery_main.cpp index 78350944..19ef4f3d 100644 --- a/recovery_main.cpp +++ b/recovery_main.cpp @@ -478,8 +478,13 @@ int main(int argc, char** argv) { break; case Device::ENTER_FASTBOOT: - LOG(INFO) << "Entering fastboot"; - fastboot = true; + if (logical_partitions_mapped()) { + ui->Print("Partitions may be mounted - rebooting to enter fastboot."); + android::base::SetProperty(ANDROID_RB_PROPERTY, "reboot,fastboot"); + } else { + LOG(INFO) << "Entering fastboot"; + fastboot = true; + } break; case Device::ENTER_RECOVERY: |