Android/Tools/adb

start a non-data activity with adb shell am start -a com.android.contacts.action.LIST_ALL_CONTACTS

to start a more complex Intent requiring data;

To launch more complex actions through the intent mechanism, you must specify a number of

different fields. As seen in Figure 3-16, you have a number of options available including

-a to specify the action -c for a category -d to specify a Data URI -t for MIME type -e for extras.

You could launch the contacts application to add an entry with this command: adb shell am start -a android.intent.action.INSERT \ -d 'content://contacts/people' \ -t 'vnd.android.cursor.dir/person' \ -c 'android.intent.category.DEFAULT' \ -e 'name' 'Paul' \ -e 'phone' '1112223333'

launch a web browser adb shell am start 'http://www.google.com'

show the battery status adb shell dumpsys battery

ney adb shell network_management c

fe adb shell dumpsys activity

ef

command adb shell dumpsys package ef