Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 96d445d8 authored by Josh Gao's avatar Josh Gao
Browse files

adbd: fix remount on non-system-as-root devices.

The system image is now a root image, even on devices that don't use
system-as-root. Fix remount to always remount /, to account for this.

Bug: http://b/115751838
Test: `adb remount; adb shell mount | grep " / "`
Change-Id: I2d89a795bd0bc53af33fe69c9d049bbb64d26f3b
parent d812d0da
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -209,12 +209,8 @@ void remount_service(unique_fd fd, const std::string& cmd) {
    bool system_verified = !(android::base::GetProperty("partition.system.verified", "").empty());
    bool vendor_verified = !(android::base::GetProperty("partition.vendor.verified", "").empty());

    std::vector<std::string> partitions{"/odm", "/oem", "/product_services", "/product", "/vendor"};
    if (android::base::GetBoolProperty("ro.build.system_root_image", false)) {
        partitions.push_back("/");
    } else {
        partitions.push_back("/system");
    }
    std::vector<std::string> partitions{"/",        "/odm",   "/oem", "/product_services",
                                        "/product", "/vendor"};

    bool verity_enabled = (system_verified || vendor_verified);