1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-08-10 23:55:51 +02:00

adb-shell: add page (#4287)

This commit is contained in:
Axel Navarro 2020-08-30 20:20:36 -03:00 committed by GitHub
parent cb2073c4ff
commit d103a229a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

32
pages/common/adb-shell.md Normal file
View file

@ -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: <https://developer.android.com/studio/command-line/adb>.
- 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`