usage: am [start|broadcast|instrument|profile] am start -D INTENT am broadcast INTENT am instrument [-r] [-e <ARG_NAME> <ARG_VALUE>] [-p <PROF_FILE>] [-w] <COMPONENT> am profile <PROCESS> [start <PROF_FILE>|stop] INTENT is described with: [-a <ACTION>] [-d <DATA_URI>] [-t <MIME_TYPE>] [-c <CATEGORY> [-c <CATEGORY>] ...] [-e|--es <EXTRA_KEY> <EXTRA_STRING_VALUE> ...] [--ez <EXTRA_KEY> <EXTRA_BOOLEAN_VALUE> ...] [-e|--ei <EXTRA_KEY> <EXTRA_INT_VALUE> ...] [-n <COMPONENT>] [-f <FLAGS>] [<URI>] The start command starts activity. Use -D option to make 'DebugOption' true. The broadcast command sends broadcast. The instrument command starts instrumentation. Use -r option to make 'rawMode' true. Use -e option to add the pair of ARG_NAME and ARG_VALUE into Bundle. Use -p option to specify profileFile. Use -w option to make 'wait' true in order to new an instance of InstrumentationWatcher. Use COMPONENT to specify the name of the instrumentation component. The profile command turn on/off profiling in a particular process specified by PROCESS. Use start option to turn on and stop to turn off.Use PROF_FILE to specify the file path of profile. Use -a to set action specified by ACTION to be performed. Use -d to create a Uri(data) which parses the given encoded URI string DATA_URI. Use -t to specify the type specified by MIME_TYPE. Use -c to add a new category specified by CATEGORY to the intent. Use -e or --es to add extended data to the intent.EXTRA_KEY specifies the name of the extra data and EXTRA_STRING_VALUE specifies the string data value. Use --ez to add extended data to the intent. EXTRA_KEY specifies the name of the extra data and EXTRA_BOOLEAN_VALUE specifies the serializable data value. Use -e or --ei to add extended data to the intent. EXTRA_KEY specifies the name of the extra data and EXTRA_INT_VALUE specifies the serializable data value. Use -n to explicitly set the component specified by COMPONENT to handle the intent. Use -f to set special flags controlling how this intent is handled.FLAGS specifies the desired flags. Use URI to create an intent from a URI.
The list packages command prints all packages. Use the -f option to see their associated file.
The list permission-groups command prints all known permission groups.
The list permissions command prints all known permissions, optionally only those in GROUP. Use the -g option to organize by group. Use the -f option to print all information. Use the -s option for a short summary. Use the -d option to only list dangerous permissions. Use the -u option to list only the permissions users will see.
The list instrumentation command prints all instrumentations, or only those that target a specified package. Use the -f option to see their associated file.
The path command prints the path to the .apk of a package.
The install command installs a package to the system. Use the -l option to install the package with FORWARD_LOCK. Use the -r option to reinstall an exisiting app, keeping its data.
The uninstall command removes a package from the system. Use the -k option to keep the data and cache directories around after the package removal.
The enable and disable commands change the enabled state of a given package or component (written as "package/class").
frameworks/base/cmds下面还有一个别的命令,如下
dumpstate dumpsys ime input installd runtime service servicemanager surfaceflinger svc system_server
User 7%, System 23%, IOW 0%, IRQ 0% User 11 + Nice 0 + Sys 33 + Idle 98 + IOW 0 + IRQ 0 + SIRQ 0 = 142
PID TID CPU% S VSS RSS UID Thread Proc 743 743 26% R 928K 384K shell top top 565 581 1% S 177876K 25384K system er.ServerThread system_server 565 570 0% S 177876K 25384K system Binder Thread # system_server 565 571 0% S 177876K 25384K system Binder Thread # system_server 605 605 0% S 105820K 17540K radio app_process com.android.phone 565 619 0% S 177876K 25384K system er$SensorThread system_server 565 585 0% S 177876K 25384K system PackageManager system_server 565 586 0% S 177876K 25384K system FileObserver system_server 565 589 0% S 177876K 25384K system SyncHandlerThre system_server 565 590 0% S 177876K 25384K system UEventObserver system_server 565 591 0% S 177876K 25384K system PowerManagerSer system_server 565 592 0% S 177876K 25384K system AlarmManager system_server 565 593 0% S 177876K 25384K system WindowManager system_server 565 594 0% S 177876K 25384K system InputDeviceRead system_server 565 595 0% S 177876K 25384K system WindowManagerPo system_server 565 596 0% S 177876K 25384K system InputDispatcher system_server 565 597 0% S 177876K 25384K system ConnectivityThr system_server 565 598 0% S 177876K 25384K system WifiService system_server 565 599 0% S 177876K 25384K system WifiWatchdogThr system_server 565 600 0% S 177876K 25384K system er.ServerThread system_server 565 601 0% S 177876K 25384K system GpsEventThread system_server 565 602 0% S 177876K 25384K system AudioService system_server 565 603 0% S 177876K 25384K system android:unnamed system_server 565 604 0% S 177876K 25384K system android:unnamed system_server 565 609 0% S 177876K 25384K system watchdog system_server 565 640 0% S 177876K 25384K system r.MountListener system_server 565 651 0% S 177876K 25384K system Binder Thread # system_server 565 678 0% S 177876K 25384K system Binder Thread # system_server 605 606 0% S 105820K 17540K radio HeapWorker com.android.phone 605 607 0% S 105820K 17540K radio Signal Catcher com.android.phone ------ PROCRANK ------