LockAgent: Add agent parameters to start_lock_agent script
Add parsing of "--agent-options" parameter to configure optional agent features. Sample: adb shell setprop wrap.system_server "start_with_lockagent --agent-options native_crash,java_crash" Test: m Test: manual Change-Id: Ie70d0155096838782cb76f8111a42eba0c20e75d
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
#!/system/bin/sh
|
||||
|
||||
AGENT_OPTIONS=
|
||||
if [[ "$1" == --agent-options ]] ; then
|
||||
shift
|
||||
AGENT_OPTIONS="=$1"
|
||||
shift
|
||||
fi
|
||||
|
||||
APP=$1
|
||||
shift
|
||||
$APP -Xplugin:libopenjdkjvmti.so -agentpath:liblockagent.so $@
|
||||
|
||||
$APP -Xplugin:libopenjdkjvmti.so "-agentpath:liblockagent.so$AGENT_OPTIONS" $@
|
||||
|
||||
Reference in New Issue
Block a user