From: Nick Kralevich Date: Tue, 12 Apr 2016 23:32:33 +0000 (-0700) Subject: Drop compatibility with pre 2012 adb clients X-Git-Tag: android-x86-7.1-r1~339 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=a50117e54a97aea5b3b2c279fb5643704c460b05;p=android-x86%2Fframeworks-native.git Drop compatibility with pre 2012 adb clients On very old versions of adb, when "adb bugreport" was executed, the command "adb shell dumpstate" was run. This was later changed to "adb shell bugreport". Change 1e339878c128ef47271278779c2685a8dfa49cd1 added a backwards compatibility hack (see bug 6391938). It turns out that nobody has been able to execute /system/bin/dumpstate as a non-root user for 2 releases now due to SELinux restrictions, so maintaining the code bloat to support this workaround is pointless. Delete the code. Bug: 6391938 Change-Id: I49eebcca1fcec5a39593c53e2e6d23ec87f65a35 --- diff --git a/cmds/dumpstate/dumpstate.cpp b/cmds/dumpstate/dumpstate.cpp index af95d162d5..f207bb5c4b 100644 --- a/cmds/dumpstate/dumpstate.cpp +++ b/cmds/dumpstate/dumpstate.cpp @@ -1025,15 +1025,6 @@ int main(int argc, char *argv[]) { now = time(NULL); - if (getuid() != 0) { - // Old versions of the adb client would call the - // dumpstate command directly. Newer clients - // call /system/bin/bugreport instead. If we detect - // we're being called incorrectly, then exec the - // correct program. - return execl("/system/bin/bugreport", "/system/bin/bugreport", NULL); - } - MYLOGI("begin\n"); /* gets the sequential id */