summaryrefslogtreecommitdiffstats
path: root/adb/services.c
diff options
context:
space:
mode:
authorBenoit Goby <benoit@android.com>2012-03-16 14:44:17 -0700
committerBenoit Goby <benoit@android.com>2012-03-16 15:30:05 -0700
commit7941cf87f624e7747b5bb868a27904c7a3be0ca4 (patch)
treebe2e15a35a10f3407af84666d3f3f069811ce025 /adb/services.c
parent9f1af8cde988e8a276753db6019e8c7d94f0e2b4 (diff)
downloadsystem_core-7941cf87f624e7747b5bb868a27904c7a3be0ca4.zip
system_core-7941cf87f624e7747b5bb868a27904c7a3be0ca4.tar.gz
system_core-7941cf87f624e7747b5bb868a27904c7a3be0ca4.tar.bz2
Revert "Reimplement the "adb root" command to more closely match its previous behavior"
This reverts commit 535164e9d9649a83d4d63829f3389f2bea339fe1.
Diffstat (limited to 'adb/services.c')
-rw-r--r--adb/services.c6
1 files changed, 4 insertions, 2 deletions
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 @@ void restart_root_service(int fd, void *cookie)
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);
}
}