Revert "Reimplement the "adb root" command to more closely match its previous behavior"
This reverts commit 535164e9d9649a83d4d63829f3389f2bea339fe1.
diff --git a/adb/services.c b/adb/services.c
index 6940be8..6bbd6f8 100644
--- a/adb/services.c
+++ b/adb/services.c
@@ -125,12 +125,14 @@
return;
}
+ property_set("service.adb.root", "1");
snprintf(buf, sizeof(buf), "restarting adbd as root\n");
writex(fd, buf, strlen(buf));
adb_close(fd);
- // This will cause a property trigger in init.rc to restart us
- property_set("service.adb.root", "1");
+ // quit, and init will restart us as root
+ sleep(1);
+ exit(1);
}
}