adb change developer settings options programmatically

Issue

How to change Do not keep activities in espresso testing? I need to know the name of this command in adb. How can I access all available developer settings commands from adb?

I need something like following commands;

getInstrumentation().getUiAutomation().executeShellCommand("settings put global window_animation_scale 0.0");

or

$ adb shell settings put global wifi_on 0

Solution

You can use:

adb shell settings put global always_finish_activities 1 

To activate the setting and 0 to disable it.

You can find an official list of other available settings for android here.

Answered By – stamanuel

Leave a Comment