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
No comments:
Post a Comment