adb shell screencap -p /sdcard/screen.png
안드로이드, OpenMP, OpenCL, Graphic, 컴퓨터 게임, Software Engineer, Ski, San Jose, 그리고 내가 사랑 하는 모든것들 ;) Feel free to add me, and ask me;)
Monday, October 2, 2017
Android Application from ADB
how to start apk from ADB
adb shell am start -n com.package.name/com.package.name.ActivityName
and when you don't know about Activity Name
aapt d xmltree <path to apk> AndroidManifest.xml
or.. simply script
create a file named "adb-run.sh" with these 3 lines:
pkg=$(aapt dump badging $1|awk -F" " '/package/ {print $2}'|awk -F"'" '/name=/ {print $2}')
act=$(aapt dump badging $1|awk -F" " '/launchable-activity/ {print $2}'|awk -F"'" '/name=/ {print $2}')
adb shell am start -n $pkg/$act
Subscribe to:
Posts (Atom)