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

Commit 3e8ebad0 authored by Nick Kralevich's avatar Nick Kralevich Committed by Android Git Automerger
Browse files

am 3178c83a: am 895623e5: Merge "check if uid=0 before attempting remount"

* commit '3178c83a':
  check if uid=0 before attempting remount
parents 0a316829 3178c83a
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -113,6 +113,12 @@ void remount_service(int fd, void *cookie)
    char buffer[200];
    char prop_buf[PROPERTY_VALUE_MAX];

    if (getuid() != 0) {
        WriteStringFully(fd, "Not running as root. Try \"adb root\" first.\n");
        adb_close(fd);
        return;
    }

    bool system_verified = false, vendor_verified = false;
    property_get("partition.system.verified", prop_buf, "0");
    if (!strcmp(prop_buf, "1")) {