Search code examples
androidandroid-emulatoradb

How to enable "Always show crash dialog" in developer options on an Android emulator via adb commands?


How to enable or disable a specific developer options using adb?

I have found some posts saying to enable developer settings via adb shell settings put global development_settings_enabled 1. But how to enable a specific developer option?

For example, suppose I want to enable "Always show crash dialog" on an Android emulator. Except of physically switching the button, is it possible to programmatically enable it like using adb commands?

enter image description here


Solution

  • Try adb shell settings list global ...once with the option enabled and once with it disabled.

    Maybe this one?

    private static final String SHOW_FIRST_CRASH_DIALOG_KEY = "show_first_crash_dialog";
    

    https://github.com/aosp-mirror/platform_packages_apps_settings/tree/master/src/com/android/settings/development