Dianne Hackborn 2882406de3 Switch am command to go through "cmd activity".
For almost everything...  except instrument, which still needs
to be run as the shell user so its UiAutomator callbacks
will work correctly (and not create security holes).

Test: manual

Change-Id: I2e62714a2d5b52501aa261b7e4d6b282b54a0027
2016-11-01 11:00:41 -07:00

10 lines
207 B
Bash
Executable File

#!/system/bin/sh
if [ "$1" != "instrument" ] ; then
cmd activity "$@"
else
base=/system
export CLASSPATH=$base/framework/am.jar
exec app_process $base/bin com.android.commands.am.Am "$@"
fi