Sanmill/tests/stop-monkey.sh

14 lines
378 B
Bash
Raw Normal View History

2021-04-10 11:08:13 +08:00
#!/bin/bash
2021-07-11 16:08:01 +08:00
PLATFORM_TOOLS=~/AppData/Local/Android/Sdk/platform-tools
if [ "$(uname)" == "Darwin" ]; then
PLATFORM_TOOLS=~/Library/Android/sdk/platform-tools
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
PLATFORM_TOOLS=~/Android/sdk/platform-tools
fi
cd ${PLATFORM_TOOLS} || exit
2021-04-10 11:08:13 +08:00
./adb shell kill $(./adb shell ps | grep monkey | xargs | cut -d' ' -f2)