馬上加入Android 台灣中文網,立即免費下載應用遊戲。
您需要 登錄 才可以下載或查看,沒有帳號?註冊
x
本帖最後由 joemou 於 2014-6-7 19:03 編輯
ADB (Android Debug Bridge)
我跟版大發現很多人都不是很會用adb工具包,所以在此教一下!!
首先先確認好自己的版本~因為較早版本不支持adb sideload,下方有附載點~
確認一下自己手機是否連上~
若手機連不上試試看以上指令重新啟動adb工具包
xxx為檔案路徑
按下enter
跑到100%即完成
遠端備份指令
後面可以加 -f <檔名> 表示儲存到指定檔名
加 -all 表示備份所有已安裝的程式
加 -apk / -noapk 表示是否包含 apk 備份
加 -shared / -noshared 表示是否包含記憶卡、內建容量的備份
加 -system / -nosystem 表示是否備份系統 App
遠端還原指令
重新啟動手機
重新啟動手機到 FASTBOOT 模式
重新啟動手機到 Recovery 模式
顯示手機的序號
顯示連線狀態
正常 ADB USB 偵錯連線模式
Bootloader 連線模式
Recovery 連線模式
讓 ADB 等到手機連上線之後進行下個步驟
- adb wait-for-deivce <一串指令>
複製代碼
更改模擬器網路 TCP 通訊埠
- adb forward tcp:6100 tcp:7100
複製代碼
顯示 Android 上所有正在執行的行程
顯示 adb 指令參數
產生 adb 除錯報告
監控模擬器運作紀錄
以Ctrl + c 離開監控模式
從 Android 系統下載檔案
ex:adb pull /data/app/com.####.###
指定模擬器來操作
ex:adb -s emulator-5554 install email.apk
安裝 APK 應用程式套件
ex:adb install @@@@.apk
移除 APK 應用程式套件
ex:adb uninstall com.android.@@@
終於打完了~
累啊~
記的假如下方有補充指令的一律以+3 +1 +5
格式:
功能:
指令:
大家也可以在ADB help 找只是要轉換成中文喔!!
歡迎專人翻譯~
-a - directs adb to listen on all interfaces for a c
onnection
-d - directs command to the only connected USB devic
e
returns an error if more than one USB device is
present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is r
unning.
-s <specific device> - directs command to the device or emulator with
the given
serial number or qualifier. Overrides ANDROID_S
ERIAL
environment variable.
-p <product name or path> - simple product name like "sooner", or
a relative/absolute path to a product
out directory like "out/target/product/sooner".
If -p is not specified, the ANDROID_PRODUCT_OUT
environment variable is used, which must
be an absolute path.
-H - Name of adb server host (default: localhost)
-P - Port of adb server (default: 5037)
devices [-l] - list all connected devices
("-l" will also list device qualifiers)
connect <host>[:<port>] - connect to a device via TCP/IP
Port 5555 is used by default if no port number
is specified.
disconnect [<host>[:<port>]] - disconnect from a TCP/IP device.
Port 5555 is used by default if no port number
is specified.
Using this command with no additional arguments
will disconnect from all connected TCP/IP devic
es.
device commands:
adb push <local> <remote> - copy file/dir to device
adb pull <remote> [<local>] - copy file/dir from device
adb sync [ <directory> ] - copy host->device only if changed
(-l means list but don"t copy)
(see "adb help all")
adb shell - run remote shell interactively
adb shell <command> - run remote shell command
adb emu <command> - run emulator console command
adb logcat [ <filter-spec> ] - View device log
adb forward --list - list all forward socket connections.
the format is a list of lines with the followin
g format:
<serial> " " <local> " " <remote> "
"
adb forward <local> <remote> - forward socket connections
forward specs are one of:
tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
dev:<character device name>
jdwp:<process pid> (remote only)
adb forward --no-rebind <local> <remote>
- same as "adb forward <local> <remote>" but fail
s
if <local> is already forwarded
adb forward --remove <local> - remove a specific forward socket connection
adb forward --remove-all - remove all forward socket connections
adb jdwp - list PIDs of processes hosting a JDWP transport
adb install [-l] [-r] [-s] [--algo <algorithm name> --key <hex-encoded key> --
iv <hex-encoded iv>] <file>
- push this package file to the device and instal
l it
("-l" means forward-lock the app)
("-r" means reinstall the app, keeping its data
)
("-s" means install on SD card instead of inter
nal storage)
("--algo", "--key", and "--iv" mean the file is
encrypted already)
adb uninstall [-k] <package> - remove this app package from the device
("-k" means keep the data and cache directories
)
adb bugreport - return all information from the device
that should be included in a bug report.
adb backup [-f <file>] [-apk|-noapk] [-shared|-noshared] [-all] [-system|-nosy
stem] [<packages...>]
- write an archive of the device"s data to <file>
.
If no -f option is supplied then the data is wr
itten
to "backup.ab" in the current directory.
(-apk|-noapk enable/disable backup of the .apks
themselves
in the archive; the default is noapk.)
(-shared|-noshared enable/disable backup of the
device"s
shared storage / SD card contents; the defau
lt is noshared.)
(-all means to back up all installed applicatio
ns)
(-system|-nosystem toggles whether -all automat
ically includes
system applications; the default is to inclu
de system apps)
(<packages...> is the list of applications to b
e backed up. If
the -all or -shared flags are passed, then t
he package
list is optional. Applications explicitly g
iven on the
command line will be included even if -nosys
tem would
ordinarily cause them to be omitted.)
adb restore <file> - restore device contents from the <file> backup
archive
adb help - show this help message
adb version - show version num
scripting:
adb wait-for-device - block until device is online
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints: <serial-number>
adb get-devpath - prints: <device-path>
adb status-window - continuously print device status for a specifie
d device
adb remount - remounts the /system partition on the device re
ad-write
adb reboot [bootloader|recovery] - reboots the device, optionally into the boo
tloader or recovery program
adb reboot-bootloader - reboots the device into the bootloader
adb root - restarts the adbd daemon with root permissions
adb usb - restarts the adbd daemon listening on USB
adb tcpip <port> - restarts the adbd daemon listening on TCP on th
e specified port
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PPP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns
adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:
- If <directory> is not specified, both /system and /data partitions will be u
pdated.
- If it is "system" or "data", only the corresponding partition
is updated.
environmental variables:
ADB_TRACE - Print debug information. A comma separated list
of the following values
1 or all, adb, sockets, packets, rwx, usb, sync
, sysdeps, transport, jdwp
ANDROID_SERIAL - The serial number to connect to. -s takes prior
ity over this if given.
ANDROID_LOG_TAGS - When used with the logcat option, only these de
bug tags are printed.
請踴躍發言啊!
還有adb shell的指令請先不要發將在開一篇文章
1.本人的軟體都是從自己電腦或是網路得來
2.假如喜歡的話請大家留個言
3.假如愛上它請評個分
你們的評分和留言都是小弟最大動力
本網頁上刊載的所有內容,包括程式、文字敘述、圖片、教材….等,均受到中華民國著作權法及國際著作權法律的保障,著作權為原作者所有。
本頁所提供的內容與服務,僅供使用者個人之非商業用途的使用,使用人利用時必須遵守著作權法的所有相關規定,不可任意變更、發行、播送、轉賣、重製、改作、散布、表演、展示或利用本網站之內容或服務。
|
評分
-
查看全部評分

|