ADBDebuggingSafe
adb shell am start -n <package>/<activity>
Launch an activity component
What It Does
Uses Activity Manager to launch an explicit Android activity by its full package and component name.
Command Syntax
Terminal
$
adb shell am start -n <package>/<activity_component>Parameters & Placeholders Breakdown
This command syntax includes specific placeholder tokens. Below is an explanation of what each word represents and concrete real-world values to replace it with:
<package>Application Package IDThe unique reverse-domain bundle identifier of the Android application defined in its AndroidManifest.xml.
Real-world value:com.whatsapp or com.android.chrome
Command syntax:
adb uninstall com.whatsapp (or: adb shell pm clear com.android.chrome)To list all installed packages on your phone, execute "adb shell pm list packages".
<activity_component>Android Activity ComponentThe specific Activity class name inside the application to launch via ActivityManager (am).
Real-world value:.MainActivity or com.android.settings/.Settings
Command syntax:
adb shell am start -n com.android.settings/.SettingsPrefix with package name: <package>/<activity>.
<activity>Android Activity ComponentThe specific Activity class name inside the application to launch via ActivityManager (am).
Real-world value:.MainActivity or com.android.settings/.Settings
Command syntax:
adb shell am start -n com.android.settings/.SettingsPrefix with package name: <package>/<activity>.
Usage Examples
$
adb shell am start -n com.example.myapp/.MainActivity$
adb shell am start -n com.google.android.youtube/com.google.android.apps.youtube.app.WatchWhileActivityOptions & Flags
| Flag / Parameter | Description |
|---|---|
| -W | Wait for launch to complete and report performance timing. |
| -S | Force stop the target app before starting activity. |
Prerequisites & Requirements
- App package installed
Related Commands
Found an error or missing flag for
adb shell am start -n <package>/<activity>?Submit a correction or request additional examples on GitHub.
Having issue? Contact @mkr_infinity
Direct technical assistance & ROM flashing troubleshooting by Mohammad Kaif Raja.