How can we access Settings > Safety & emergency via ADB commands?

I tried the below commands but none are working.


adb shell am start -n com.android.settings/com.android.settings.emergency.EmergencyDashboardFragment

Starting: Intent { cmp=com.android.settings/.emergency.EmergencyDashboardFragment }
Error type 3
Error: Activity class {com.android.settings/com.android.settings.emergency.EmergencyDashboardFragment} does not exist.
  1. emu64xa:/ # adb shell am start -n com.android.settings/com.android.settings.SubSettings -e :android:show_fragment com.android.settings.emergency.EmergencyDashboardFragment

This only opens the settings, but not Settings > Safety & emergency

  • Where did you got the value EmergencyDashboardFragment from? Use an AndroidManifest.xml viewer to check the real activity names of the settings app.
    – Robert
    Dec 30, 2022 at 15:03
  • 1
    From the Logcat. I open the 'Safety and emergency' sub settings manually and monitored the logcat. The logcat message is below: "12-29 16:12:55.456 5268 5268 D SettingsActivity: Switching to fragment com.android.settings.emergency.EmergencyDashboardFragment"
    – Sam Sam
    Dec 30, 2022 at 15:16
  • But a fragment is not an activity you can call. Check AndroidManifest.xml to get the activity values.
    – Robert
    Dec 30, 2022 at 15:32
  • I looked over 100 activities, but couldn't find one that opens Settings > Safety & emergency via ADB. This is how I got the list of activities: 'adb shell dumpsys package | grep com.android.settings/.Settings | grep Activity'
    – Sam Sam
    Jan 9 at 16:47


You must log in to answer this question.

Browse other questions tagged .