snippetbashTip
adb shell — Run shell commands on a connected Android device or emulator. More information: <https://developer.a
Viewed 0 times
adb shellshellcommandruncommandsconnectedcliandroid
Problem
How to use the
adb shell command: Run shell commands on a connected Android device or emulator. More information: <https://developer.android.com/tools/adb>.Solution
adb shell — Run shell commands on a connected Android device or emulator. More information: <https://developer.android.com/tools/adb>.Start a remote interactive shell on the emulator or device:
adb shellGet all the properties from emulator or device:
adb shell getpropRevert all runtime permissions to their default:
adb shell pm reset-permissionsRevoke a dangerous permission for an application:
adb shell pm revoke {{package}} {{permission}}Trigger a key event:
adb shell input keyevent {{keycode}}Clear the data of an application on an emulator or device:
adb shell pm clear {{package}}Start an activity on emulator or device:
adb shell am start -n {{package}}/{{activity}}Start the home activity on an emulator or device:
adb shell am start -W -c android.intent.category.HOME -a android.intent.action.MAINCode Snippets
Start a remote interactive shell on the emulator or device
adb shellGet all the properties from emulator or device
adb shell getpropRevert all runtime permissions to their default
adb shell pm reset-permissionsRevoke a dangerous permission for an application
adb shell pm revoke {{package}} {{permission}}Trigger a key event
adb shell input keyevent {{keycode}}Context
tldr-pages: common/adb shell
Revisions (0)
No revisions yet.