Files
tldr/pages.ru/common/adb-shell.md
2020-11-16 15:18:22 -03:00

37 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# adb shell
> Android Debug Bridge Shell: Запуск удалённой командной оболочки на эмуляторе Android или подключенном устройстве Android.
> Больше информации: <https://developer.android.com/studio/command-line/adb>.
- Запустить удалённую интерактивную оболочку на эмуляторе или устройстве:
`adb shell`
- Получить все свойства от эмулятора или устройства:
`adb shell getprop`
- Вернуть всем разрешениям значение по умолчанию:
`adb shell pm reset-permissions`
- Отозвать опасные разрешения для приложения:
`adb shell pm revoke {{пакет}} {{разрешения}}`
- Вызвать событие клавиши:
`adb shell input keyevent {{код_клавиши}}`
- Очистить данные приложения на эмуляторе или устройстве:
`adb shell pm clear {{пакет}}`
- Запустить activity на эмуляторе или устройстве:
`adb shell am start -n {{пакет}}/{{активность}}`
- Запустить базовый activity на эмуляторе или устройстве:
`adb shell am start -W -c android.intent.category.HOME -a android.intent.action.MAIN`