0% found this document useful (0 votes)
10 views2 pages

adb android debug bridge usage

Android Debug Bridge (adb) is a command-line tool in Android Studio that facilitates communication with Android devices, allowing users to grant privileges without rooting. Users can execute specific commands to change system settings, intercept volume key presses, and read logs among other functionalities, with some manufacturers requiring additional setup. ADB can also connect over TCP/IP by executing a command to enable Wi-Fi connections, but users must authorize new hosts carefully to maintain security.

Uploaded by

weckker
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views2 pages

adb android debug bridge usage

Android Debug Bridge (adb) is a command-line tool in Android Studio that facilitates communication with Android devices, allowing users to grant privileges without rooting. Users can execute specific commands to change system settings, intercept volume key presses, and read logs among other functionalities, with some manufacturers requiring additional setup. ADB can also connect over TCP/IP by executing a command to enable Wi-Fi connections, but users must authorize new hosts carefully to maintain security.

Uploaded by

weckker
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Android Debug Bridge (adb)

Android Debug Bridge (adb) is a versatile command-line tool, included in the Android Studio, that lets
you communicate with a device.

It can be used to grant certain privileges which would otherwise require a rooted device. Start by listing
the connected devices and their serial number by executing the adb devices shell command, then to
grant a privilege:

Change system display settings:

Adb -s <serial number> shell pm grant com.llamalab.automate


android.permission.CHANGE_CONFIGURATION

Intercept volume key long press:

Adb -s <serial number> shell pm grant com.llamalab.automate


android.permission.SET_VOLUME_KEY_LONG_PRESS_LISTENER

Interact across users:

Adb -s <serial number> shell pm grant com.llamalab.automate


android.permission.INTERACT_ACROSS_USERS

Limit number of running processes:

Adb -s <serial number> shell pm grant com.llamalab.automate android.permission.SET_PROCESS_LIMIT

Modify secure system settings:

Adb -s <serial number> shell pm grant com.llamalab.automate


android.permission.WRITE_SECURE_SETTINGS

Read sensitive log data:

Adb -s <serial number> shell pm grant com.llamalab.automate android.permission.READ_LOGS

Retrieve state dump information from system services:

Adb -s <serial number> shell pm grant com.llamalab.automate android.permission.DUMP

Some manufacturers require additional steps before the above commands can be executed:

Xiaomi

System Settings → Security settings → USB debugging → choose Allow granting permissions

When the commands has been executed the app may have to be restarted, e.g. by using the “Force
close” button in system Apps setting, Automate, before taking full affect.
Connecting over TCP/IP

By default an Android device only allows an ADB host, e.g. a PC, to connection through USB. To make a
device accept connections over TCP/IP, e.g. Wi-Fi, execute the shell command adb tcpip 5555, then
disconnect the USB cable. This has to be repeated after every device reboot.

Warning! When a new ADB host connects, the user has to authorize it. Never confirm/grant access when
an unknown device tries to connect.

You might also like