Created
October 4, 2021 14:48
-
-
Save ultrafunkamsterdam/140139ca3427cf273b8f35e3cae4be93 to your computer and use it in GitHub Desktop.
android shell defer app start in background
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
APPNAME=$1 | |
# nohup needs a writable folder | |
cd /sdcard | |
# start $APPNAME after 5 seconds | |
# redirect ouputs to not block | |
nohup sh -c "sleep 5 ; monkey -p $APPNAME 1" 2>/dev/null 1>/dev/null & | |
return | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment