Hii itataja vifaa vilivyounganishwa; ikiwa "isiyothibitishwa" inaonekana, hii inamaanisha kwamba unapaswa kuondoa kizuizi kwenye simu yako na kukubali muunganisho.
Hii inaashiria kwa kifaa kwamba kinapaswa kuanzisha na adb server kwenye bandari 5555:
adb tcpip 5555
Unganisha kwenye IP hiyo na Bandari hiyo:
adb connect <IP>:<PORT>
Ikiwa unapata kosa kama ifuatavyo katika programu ya Virtual Android (kama Genymotion):
adb server version (41) doesn't match this client (36); killing...
Ni kwa sababu unajaribu kuungana na seva ya ADB yenye toleo tofauti. Jaribu tu kutafuta binary ya adb ambayo programu inatumia (nenda kwenye C:\Program Files\Genymobile\Genymotion na tafuta adb.exe)
Vifaa vingi
Wakati wowote unapata vifaa vingi vimeunganishwa kwenye mashine yako utahitaji kueleza ni kipi unachotaka kutumia kuendesha amri ya adb.
Ikiwa adbbandari inapatikana tu kutoka localhost kwenye kifaa cha android lakini una ufikiaji kupitia SSH, unaweza kupeleka bandari 5555 na kuungana kupitia adb:
Inachapisha pakiti zote, kwa hiari zile tu ambazo jina la pakiti lina maandiko katika <FILTER>.
adb shell pm list packages [options] <FILTER-STR>
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>
Chapisha njia ya APK ya iliyotolewa.
adbshellpmpathcom.android.phone
adb shell pm clear <PACKAGE>
Futa data zote zinazohusiana na kifurushi.
adbshellpmclearcom.test.abc
File Manager
adb pull <remote> [local]
Pakua faili maalum kutoka kwa emulator/kifaa hadi kwenye kompyuta yako.
adbpull/sdcard/demo.mp4./
adb push <local> <remote>
Pakia faili maalum kutoka kwa kompyuta yako hadi emulators/kipande.
adbpushtest.apk/sdcard
Screencapture/Screenrecord
adb shell screencap <filename>
Kuchukua picha ya skrini ya onyesho la kifaa.
adbshellscreencap/sdcard/screen.png
adb shell screenrecord [options] <filename>
Kurekodi onyesho la vifaa vinavyotumia Android 4.4 (API level 19) na juu.
adbshellscreenrecord/sdcard/demo.mp4adbshellscreenrecord--size<WIDTHxHEIGHT>adbshellscreenrecord--bit-rate<RATE>adb shell screenrecord --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
(press Ctrl-C to stop recording)
Unaweza kupakua faili (picha na video) kwa kutumia _adb pull_
Shell
adb shell
Pata shell ndani ya kifaa
adbshell
adb shell <CMD>
Tekeleza amri ndani ya kifaa
adbshellls
pm
Amri zifuatazo zinafanywa ndani ya shell
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
Processes
Ikiwa unataka kupata PID ya mchakato wa programu yako unaweza kutekeleza:
adbshellps
Na tafuta programu yako
Au unaweza kufanya
adbshellpidofcom.your.application
Na itachapisha PID ya programu
System
adbroot
Inarestart huduma ya adbd na ruhusa za mzizi. Kisha, unapaswa kuungana tena na seva ya ADB na utakuwa mzizi (ikiwa inapatikana)
adbsideload<update.zip>
flashing/restoring Android update.zip packages.
Logs
Logcat
Ili kuchuja ujumbe wa programu moja tu, pata PID ya programu na tumia grep (linux/macos) au findstr (windows) kuchuja matokeo ya logcat:
adblogcat|grep4526adblogcat|findstr4526
adb logcat [option] [filter-specs]
adblogcat
Notes: bonyeza Ctrl-C kuacha kufuatilia
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>.
Notes: Battery Historian inabadilisha data hiyo kuwa uonyeshaji wa HTML. STEP 1adb shell dumpsys batterystats > batterystats.txtSTEP 2python historian.py batterystats.txt > batterystats.html
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