From 7e5451a6abadacbbad9167a9730cdb5ed861e660 Mon Sep 17 00:00:00 2001 From: Shaju Mathew Date: Mon, 1 Nov 2021 16:39:14 -0700 Subject: [PATCH] Addressing error-code propagation for remount service. Bug: 201596822 Test: Local test (isolated to host) $ adb -s 8BDAY00CM6 root adbd is already running as root $ adb -s 8BDAY00CM6 remount Disabling verity for /system Using overlayfs for /system Disabling verity for /system_ext Using overlayfs for /system_ext Disabling verity for /vendor Using overlayfs for /vendor Disabling verity for /product Using overlayfs for /product remount succeeded.. now reboot device for settings refresh $ echo $? 0 $ adb -s 8BDAY00CM6 unroot restarting adbd as non root $ adb -s 8BDAY00CM6 remount Not running as root. Try "adb root" first. remount failed $ echo $? 3 Signed-off-by: Shaju Mathew Change-Id: I8e6d0735d2da0ed58cae867db2e4736abb86d351 --- fs_mgr/fs_mgr_remount.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/fs_mgr/fs_mgr_remount.cpp b/fs_mgr/fs_mgr_remount.cpp index 5411acacf..bf53c1424 100644 --- a/fs_mgr/fs_mgr_remount.cpp +++ b/fs_mgr/fs_mgr_remount.cpp @@ -481,6 +481,7 @@ int main(int argc, char* argv[]) { int result = do_remount(argc, argv); if (result == MUST_REBOOT) { LOG(INFO) << "Now reboot your device for settings to take effect"; + result = 0; } else if (result == REMOUNT_SUCCESS) { printf("remount succeeded\n"); } else {