diff --git a/pages/common/adb-shell.md b/pages/common/adb-shell.md new file mode 100644 index 0000000000..65f97760a6 --- /dev/null +++ b/pages/common/adb-shell.md @@ -0,0 +1,32 @@ +# adb shell + +> Android Debug Bridge Shell: Run remote shell commands on an Android emulator instance or connected Android devices. +> More information: . + +- Start a remote interactive shell on the emulator/device: + +`adb shell` + +- Revert all runtime permissions to their default: + +`adb shell pm reset-permissions` + +- Revoke 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/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.MAIN`