Android am command

Author: yifei / Created: May 30, 2017, 10:58 a.m. / Modified: May 30, 2017, 10:59 a.m. / Edit

am is short for activity manager, which is awesome

basic syntax

to start an activity

you can get the activity name by decompiling the apk and view the androidmanifest.xml file or using the android device monitor

am start -n <package_name>/<activity_name> [parameters] am start -n

to stop an activity

am force-stop <package_name>