I am trying to launch Settings through adb using the adb monkey command, but it keeps printing out "Killed". How can I find out what is causing this?
adb shell am start -a android.settings.SETTINGS
To bring up developer settings (in Gingerbread at least):
adb shell am start -a com.android.settings.APPLICATION_DEVELOPMENT_SETTINGS
Here is a bash script to demonstrate more settings - on my Nexus One, it crashes and reboots a few times...
#!/bin/bash
# This FC's android
# android.settings.WIMAX_SETTINGS:
# list of commands were commied from output of this:
# adb shell dumpsys | grep "SETTINGS"
# quick hask that seemed to work, but prob. not correct.
while read L; do
[[ -z "$L" ]] && continue
printf "\nTry [%s]\n" "$L"
adb shell am start -a ${L:: -1} # remove trailing colon
sleep 5
printf "NOTE: Watch screen... Settings may FC and after a few seconds android will reboot\n"
adb wait-for-device
done <<EOF
android.settings.DATE_SETTINGS:
com.android.settings.APPLICATION_DEVELOPMENT_SETTINGS:
android.settings.LOCATION_SOURCE_SETTINGS:
android.settings.MEMORY_CARD_SETTINGS:
android.settings.LOCALE_SETTINGS:
android.search.action.SEARCH_SETTINGS:
android.net.vpn.SETTINGS:
ACCESSIBILITY_FEEDBACK_SETTINGS:
android.settings.ACCOUNT_SYNC_SETTINGS:
com.android.settings.DISPLAY_SETTINGS:
android.settings.INPUT_METHOD_SETTINGS:
android.settings.SOUND_SETTINGS:
android.settings.WIFI_SETTINGS:
android.settings.APPLICATION_SETTINGS:
com.android.settings.SOUND_SETTINGS:
android.settings.ACCOUNT_SYNC_SETTINGS_ADD_ACCOUNT:
android.settings.MANAGE_APPLICATIONS_SETTINGS:
android.settings.SYNC_SETTINGS:
android.settings.SETTINGS:
com.android.settings.DOCK_SETTINGS:
android.settings.ADD_ACCOUNT_SETTINGS:
android.settings.SECURITY_SETTINGS:
android.settings.DEVICE_INFO_SETTINGS:
android.settings.WIRELESS_SETTINGS:
android.settings.DISPLAY_SETTINGS:
android.settings.SYSTEM_UPDATE_SETTINGS:
android.settings.MANAGE_ALL_APPLICATIONS_SETTINGS:
android.settings.DATA_ROAMING_SETTINGS:
android.settings.APN_SETTINGS:
android.settings.USER_DICTIONARY_SETTINGS:
com.android.settings.VOICE_INPUT_OUTPUT_SETTINGS:
com.android.settings.TTS_SETTINGS:
android.settings.WIFI_IP_SETTINGS:
android.search.action.WEB_SEARCH_SETTINGS:
android.settings.BLUETOOTH_SETTINGS:
android.settings.AIRPLANE_MODE_SETTINGS:
android.settings.INTERNAL_STORAGE_SETTINGS:
android.settings.ACCESSIBILITY_SETTINGS:
com.android.settings.QUICK_LAUNCH_SETTINGS:
android.settings.PRIVACY_SETTINGS:
EOF
Since the question is about launching the Settings, there will also be some people looking for the adb command to kill the Settings.
Here you are:
adb shell am force-stop com.android.settings