LinuxCommandLibrary

adb-shell

Android Debug Bridge Shell: Run remote shell commands on an Android emulator instance or connected Android devices.

TLDR

Start a remote interactive shell on the emulator or device

$ adb shell
copy


Get all the properties from emulator or device
$ adb shell getprop
copy


Revert all runtime permissions to their default
$ adb shell pm reset-permissions
copy


Revoke a dangerous permission for an application
$ adb shell pm revoke [package] [permission]
copy


Trigger a key event
$ adb shell input keyevent [keycode]
copy


Clear the data of an application on an emulator or device
$ adb shell pm clear [package]
copy


Start an activity on emulator or device
$ adb shell am start -n [package]/[activity]
copy


Start the home activity on an emulator or device
$ adb shell am start -W -c android.intent.category.HOME -a android.intent.action.MAIN
copy

Copied to clipboard