adbshellpmlistpackages<FILTER-STR>adbshellpmlistpackages-f<FILTER-STR>#See their associated file.adbshellpmlistpackages-d<FILTER-STR>#Filter to only show disabled packages.adbshellpmlistpackages-e<FILTER-STR>#Filter to only show enabled packages.adbshellpmlistpackages-s<FILTER-STR>#Filter to only show system packages.adbshellpmlistpackages-3<FILTER-STR>#Filter to only show third party packages.adbshellpmlistpackages-i<FILTER-STR>#See the installer for the packages.adbshellpmlistpackages-u<FILTER-STR>#Also include uninstalled packages.adbshellpmlistpackages--user<USER_ID><FILTER-STR>#The user space to query.
adb shell pm path <PACKAGE>
指定されたAPKのパスを表示します。
adbshellpmpathcom.android.phone
adb shell pm clear <PACKAGE>
パッケージに関連付けられたすべてのデータを削除します。
adbshellpmclearcom.test.abc
ファイルマネージャー
adb pull <remote> [local]
指定されたファイルをエミュレーター/デバイスからコンピュータにダウンロードします。
adbpull/sdcard/demo.mp4./
adb push <local> <remote>
指定されたファイルをコンピュータからエミュレーター/デバイスにアップロードします。
adbpushtest.apk/sdcard
スクリーンキャプチャ/スクリーン録画
adb shell screencap <filename>
デバイスのディスプレイのスクリーンショットを撮る。
adbshellscreencap/sdcard/screen.png
adb shell screenrecord [options] <filename>
Android 4.4(APIレベル19)以降を実行しているデバイスの画面を録画します。
adbshellscreenrecord/sdcard/demo.mp4adbshellscreenrecord--size<WIDTHxHEIGHT>adbshellscreenrecord--bit-rate<RATE>adbshellscreenrecord--time-limit<TIME>#Sets the maximum recording time, in seconds. The default and maximum value is 180 (3 minutes).adbshellscreenrecord--rotate# Rotates 90 degreesadbshellscreenrecord--verbose
(録画を停止するにはCtrl-Cを押してください)
ファイル(画像や動画)をダウンロードするにはadb pullを使用します
シェル
adb シェル
デバイス内でシェルを取得します
adbshell
adb shell <CMD>
デバイス内でコマンドを実行します
adbshellls
pm
以下のコマンドはシェル内で実行されます
pmlistpackages#List installed packagespmpath<packagename>#Get the path to the apk file of tha packageamstart [<options>] #Start an activity. Whiout options you can see the help menuamstartservice [<options>] #Start a service. Whiout options you can see the help menuambroadcast [<options>] #Send a broadcast. Whiout options you can see the help menuinput [text|keyevent]#Send keystrokes to device
adblogcat*:V# lowest priority, filter to only show Verbose leveladblogcat*:D# filter to only show Debug leveladblogcat*:I# filter to only show Info leveladblogcat*:W# filter to only show Warning leveladblogcat*:E# filter to only show Error leveladblogcat*:F# filter to only show Fatal leveladblogcat*:S# Silent, highest priority, on which nothing is ever printed
adb logcat -b <Buffer>
adblogcat-b# radio View the buffer that contains radio/telephony related messages.adblogcat-b# event View the buffer containing events-related messages.adblogcat-b# main defaultadblogcat-c# Clears the entire log and exits.adblogcat-d# Dumps the log to the screen and exits.adblogcat-ftest.logs# Writes log message output to test.logs .adblogcat-g# Prints the size of the specified log buffer and exits.adblogcat-n<count># Sets the maximum number of rotated logs to <count>.
adbbackup [-apk] [-shared] [-system] [-all] -f file.backup# -apk -- Include APK from Third partie's applications# -shared -- Include removable storage# -system -- Include system Applciations# -all -- Include all the applicationsadbshellpmlistpackages-f-3#List packagesadbbackup-fmyapp_backup.ab-apkcom.myapp# backup on one deviceadbrestoremyapp_backup.ab# restore to the same or any other device