aboutsummaryrefslogtreecommitdiffstats
path: root/adb
diff options
context:
space:
mode:
authorBenoit Goby <benoit@android.com>2012-03-26 12:56:49 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-03-26 12:56:49 -0700
commit62e5cbaebc29d83148dd1ce30a620a37dcdbe7ed (patch)
tree51570508dbb1eceabc1c9e4f0d1d0416f6e987e3 /adb
parent8ee361cb01e20b3fb0980f428cf83d0e1181a4bd (diff)
parent7941cf87f624e7747b5bb868a27904c7a3be0ca4 (diff)
downloadsystem_core-62e5cbaebc29d83148dd1ce30a620a37dcdbe7ed.tar.gz
system_core-62e5cbaebc29d83148dd1ce30a620a37dcdbe7ed.tar.bz2
system_core-62e5cbaebc29d83148dd1ce30a620a37dcdbe7ed.zip
Merge "Revert "Reimplement the "adb root" command to more closely match its previous behavior""
Diffstat (limited to 'adb')
-rw-r--r--adb/services.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/adb/services.c b/adb/services.c
index 6940be80..6bbd6f88 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);
}
}