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

Commit 68d54808 authored by Dan Albert's avatar Dan Albert Committed by Android Git Automerger
Browse files

am 8f03e3cb: Merge "Revert "Remove the emulator special case from the "adb root" code.""

* commit '8f03e3cb':
  Revert "Remove the emulator special case from the "adb root" code."
parents 7c3749c2 8f03e3cb
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -110,6 +110,13 @@ static bool should_drop_privileges() {
#if defined(ALLOW_ADBD_ROOT)
#if defined(ALLOW_ADBD_ROOT)
    char value[PROPERTY_VALUE_MAX];
    char value[PROPERTY_VALUE_MAX];


    // The emulator is never secure, so don't drop privileges there.
    // TODO: this seems like a bug --- shouldn't the emulator behave like a device?
    property_get("ro.kernel.qemu", value, "");
    if (strcmp(value, "1") == 0) {
        return false;
    }

    // The properties that affect `adb root` and `adb unroot` are ro.secure and
    // The properties that affect `adb root` and `adb unroot` are ro.secure and
    // ro.debuggable. In this context the names don't make the expected behavior
    // ro.debuggable. In this context the names don't make the expected behavior
    // particularly obvious.
    // particularly obvious.