Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

adb change developer settings options programmatically

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
like image 322
DiRiNoiD Avatar asked Oct 18 '17 12:10

DiRiNoiD


People also ask

What is ADB in developer options?

Android Debug Bridge (adb) is a versatile command-line tool that lets you communicate with a device. The adb command facilitates a variety of device actions, such as installing and debugging apps, and it provides access to a Unix shell that you can use to run a variety of commands on a device.

What are adb shell commands?

Android Shell Commands. ADB is Android Debug Bridge which is a command line utility included with Google's Android SDK. It provides a terminal interface to control your Android device connected to a computer using a USB. ADB can be used to run shell commands, transfer files, install/uninstall apps, reboot and more.


1 Answers

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.

like image 73
stamanuel Avatar answered Oct 23 '22 18:10

stamanuel