In Android, in addition to starting a program from the interface, you can start the program from the command line, using the command-line tool AM.
Copy Code code as follows:
usage:am [subcommand] [options]
Start an activity:am start [-d]
-d:enable debugging
Send a broadcast intent:am broadcast
Start an INSTRUMENTATION:AM instrument [flags]
-r:print Raw Results (otherwise decode Report_key_streamresult)
-e:set argument to
-p:write Profiling data to
-w:wait for instrumentation to finish before returning
Start Profiling:am profile Start
Stop Profiling:am Profile Stop
Specifications include these flags:
[-A] [d] [-T]
[-C [-c] ...]
[-e|--es ...]
[--ez ...]
[-e|--ei ...]
[-N] [F] []
the method to start is
Copy Code code as follows:
# AM START-N Package (package) name/activities (activity) full path
How to view the full path of each activity in the package:
1, install and launch the "firmware toolbox"
2, into the "APP Manager", display all the installation programs in the system, long press the command line to start the program.
3, pop-up window select "Advanced Freeze", the program all the activity will be displayed
The activity has two display formats, one showing the full path directly, the other showing a relative path in parentheses, and the relative path plus the package name being the full path.
Several examples of initiating a specified program activity
The starting methods for music and video (musical and visual) are:
Copy Code code as follows:
# AM Start-n com.android.music/com.android.music.musicbrowseractivity
# AM Start-n com.android.music/com.android.music.videobrowseractivity
# AM Start-n com.android.music/com.android.music.mediaplaybackactivity
The Camera (camera) boot method is:
Copy Code code as follows:
# AM Start-n Com.android.camera/com.android.camera.camera
The Browser (browser) Startup method is:
Copy Code code as follows:
# AM Start-n com.android.browser/com.android.browser.browseractivity
Start Browser:
Copy Code code as follows:
Am Start-a android.intent.action.view-d http://www.google.cn/
Dial number:
Copy Code code as follows:
Am Start-a android.intent.action.call-d tel:10086
Start Google Map and navigate directly to Beijing:
Copy Code code as follows:
Am Start-a Android.intent.action.VIEW geo:0,0?q=beijing