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

Commit 226d851d authored by Alessandro Astone's avatar Alessandro Astone Committed by Bruno Martins
Browse files

adb: go back to standard adb root prop

 * This reverts change Ie2b8c5e9d75371da43305f003607869370bbd1a4
   plus more changes

Change-Id: Ia17239e3671d2c1a92664810ed53175110699473
parent b99b9cac
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -92,7 +92,7 @@ static bool should_drop_privileges() {
    bool drop = ro_secure;

    // ... except "adb root" lets you keep privileges in a debuggable build.
    std::string prop = android::base::GetProperty("lineage.service.adb.root", "");
    std::string prop = android::base::GetProperty("service.adb.root", "");
    bool adb_root = (prop == "1");
    bool adb_unroot = (prop == "0");
    if (ro_debuggable && adb_root) {
+2 −2
Original line number Diff line number Diff line
@@ -74,7 +74,7 @@ void restart_root_service(unique_fd fd) {
#endif

    LOG(INFO) << "adbd restarting as root";
    android::base::SetProperty("lineage.service.adb.root", "1");
    android::base::SetProperty("service.adb.root", "1");
    WriteFdExactly(fd.get(), "restarting adbd as root\n");
}

@@ -85,7 +85,7 @@ void restart_unroot_service(unique_fd fd) {
    }

    LOG(INFO) << "adbd restarting as nonroot";
    android::base::SetProperty("lineage.service.adb.root", "0");
    android::base::SetProperty("service.adb.root", "0");
    WriteFdExactly(fd.get(), "restarting adbd as non root\n");
}

+1 −1
Original line number Diff line number Diff line
@@ -68,7 +68,7 @@ binder::Status ADBRootService::setEnabled(bool enabled) {

        // Turning off adb root, restart adbd.
        if (!enabled) {
            base::SetProperty("lineage.service.adb.root", "0");
            base::SetProperty("service.adb.root", "0");
            base::SetProperty("ctl.restart", "adbd");
        }
    }