• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/core


Commit MetaInfo

修订版b18aba0a9ffae61e5bc697f3a532eaab0d6a4161 (tree)
时间2019-04-03 06:22:27
作者Mark Salyzyn <salyzyn@goog...>
CommiterMark Salyzyn

Log Message

fs_mgr: remount: system is root

For devices without overlayfs and system is root (Hikey, Hikey960)
correct "/system" to "/" if that is the mount point.

Test: adb-remount-test.sh
Bug: 129720614
Change-Id: I3bdbd5ea7b70d03477055e60521d8132b486c904

更改概述

差异

--- a/fs_mgr/fs_mgr_remount.cpp
+++ b/fs_mgr/fs_mgr_remount.cpp
@@ -340,6 +340,7 @@ int main(int argc, char* argv[]) {
340340 blk_device = rentry.blk_device;
341341 break;
342342 }
343+ // Find overlayfs mount point?
343344 if ((mount_point == "/") && (rentry.mount_point == "/system")) {
344345 blk_device = rentry.blk_device;
345346 mount_point = "/system";
@@ -352,6 +353,12 @@ int main(int argc, char* argv[]) {
352353 }
353354 fs_mgr_set_blk_ro(blk_device, false);
354355
356+ // Find system-as-root mount point?
357+ if ((mount_point == "/system") && !GetEntryForMountPoint(&mounts, mount_point) &&
358+ GetEntryForMountPoint(&mounts, "/")) {
359+ mount_point = "/";
360+ }
361+
355362 // Now remount!
356363 if (::mount(blk_device.c_str(), mount_point.c_str(), entry.fs_type.c_str(), MS_REMOUNT,
357364 nullptr) == 0) {