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
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 */