綁定帳號登入

Android 台灣中文網

打印 上一主題 下一主題

[分享] ADB 指令大全 for new one 幫忙補一個指令 +3 +1 +5

[複製連結] 查看: 16101|回覆: 9|好評: 1
跳轉到指定樓層
樓主
joemou | 收聽TA | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
發表於 2014-6-6 23:46

馬上加入Android 台灣中文網,立即免費下載應用遊戲。

您需要 登錄 才可以下載或查看,沒有帳號?註冊

x
本帖最後由 joemou 於 2014-6-7 19:03 編輯

ADB (Android Debug Bridge)
我跟版大發現很多人都不是很會用adb工具包,所以在此教一下!!

                               
登錄/註冊後可看大圖

  1. adb version
複製代碼

首先先確認好自己的版本~因為較早版本不支持adb sideload,下方有附載點~

                               
登錄/註冊後可看大圖

  1. adb devices
複製代碼

確認一下自己手機是否連上~

                               
登錄/註冊後可看大圖

  1. adb kill-server
複製代碼
  1. adb start-server
複製代碼

若手機連不上試試看以上指令重新啟動adb工具包

                               
登錄/註冊後可看大圖

  1. adb sideload xxx.zip
複製代碼

xxx為檔案路徑
按下enter
跑到100%即完成

                               
登錄/註冊後可看大圖

  1. adb shell <指令>
複製代碼
  1. adb logcat > 紀錄檔名
複製代碼


                               
登錄/註冊後可看大圖

  1. adb push <檔案> <在手機上的路徑>
複製代碼


遠端備份指令
  1. adb backup
複製代碼

後面可以加 -f <檔名> 表示儲存到指定檔名
加 -all 表示備份所有已安裝的程式
加 -apk / -noapk 表示是否包含 apk 備份
加 -shared / -noshared 表示是否包含記憶卡、內建容量的備份
加 -system / -nosystem 表示是否備份系統 App


遠端還原指令
  1. adb restore <備份檔案名稱>
複製代碼


重新啟動手機
  1. adb reboot
複製代碼


重新啟動手機到 FASTBOOT 模式
  1. adb reboot bootloader
複製代碼


重新啟動手機到 Recovery 模式
  1. adb reboot recovery
複製代碼


顯示手機的序號
  1. adb get-serialno
複製代碼


顯示連線狀態
  1. adb get-state
複製代碼


正常 ADB USB 偵錯連線模式
  1. device
複製代碼


Bootloader 連線模式
  1. bootloader
複製代碼


Recovery 連線模式
  1. recovery
複製代碼


讓 ADB 等到手機連上線之後進行下個步驟
  1. adb wait-for-deivce <一串指令>
複製代碼


更改模擬器網路 TCP 通訊埠
  1. adb forward tcp:6100 tcp:7100
複製代碼


顯示 Android 上所有正在執行的行程
  1. adb shell ps -x
複製代碼


顯示 adb 指令參數
  1. adb help
複製代碼


產生 adb 除錯報告
  1. adb bugreport
複製代碼


監控模擬器運作紀錄
以Ctrl + c 離開監控模式
  1. adb logcat
複製代碼


從 Android 系統下載檔案
ex:adb pull /data/app/com.####.###
  1. adb pull
複製代碼


指定模擬器來操作
ex:adb -s emulator-5554 install email.apk
  1. adb -s
複製代碼


安裝 APK 應用程式套件
ex:adb install @@@@.apk
  1. adb install apkfile
複製代碼


移除 APK 應用程式套件
ex:adb uninstall com.android.@@@
  1. adb uninstall package
複製代碼


終於打完了~
累啊~

記的假如下方有補充指令的一律以+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.假如愛上它請評個分


你們的評分和留言都是小弟最大動力



本網頁上刊載的所有內容,包括程式、文字敘述、圖片、教材….等,均受到中華民國著作權法及國際著作權法律的保障,著作權為原作者所有。
本頁所提供的內容與服務,僅供使用者個人之非商業用途的使用,使用人利用時必須遵守著作權法的所有相關規定,不可任意變更、發行、播送、轉賣、重製、改作、散布、表演、展示或利用本網站之內容或服務。


「用Android 就來APK.TW」,快來加入粉絲吧!
Android 台灣中文網(APK.TW)

apk.tw_HTC FASTBOOT 工具.rar

569.32 KB, 下載次數: 315, 下載積分: 碎鑽 -1 個

評分

參與人數 13碎鑽 +13 幫助 +16 收起 理由
a07b07c072005 + 1 + 1 非常讃
twstock + 1 很給力!
25077667 + 1 + 1 非常讃
airkevin + 1 + 1 非常讃
superbass + 1 + 1 非常讃
jacksls + 1 + 1 非常讃
jeff640545 + 1 + 1 非常讚
3252989 + 1 聽說評分可以懷孕,你就讓我試試吧.
qovw102 + 1 + 1 非常讚
lcctno + 1 非常讚

查看全部評分

收藏收藏19 分享分享 分享專題
用Android 就來Android 台灣中文網(https://apk.tw)
回覆

使用道具 舉報

沙發
arickchiu | 收聽TA | 只看該作者
發表於 2014-6-7 18:09
還有用tcp/ip連接 android 免傳輸線
adb connect <host>[:<port>]

點評

這應該很難用八~  發表於 2014-6-7 18:55
繼續加油喔~~  發表於 2014-6-7 18:47

評分

參與人數 1碎鑽 +3 經驗 +1 幫助 +5 收起 理由
joemou + 3 + 1 + 5 很給力!

查看全部評分

用Android 就來Android 台灣中文網(https://apk.tw)
回覆 支持 反對

使用道具 舉報

板凳
iapk | 收聽TA | 只看該作者
發表於 2015-8-3 00:40
感謝實用分享
用Android 就來Android 台灣中文網(https://apk.tw)
回覆 支持 反對

使用道具 舉報

地板
dk29933 | 收聽TA | 只看該作者
發表於 2015-10-19 09:15
還在研究 謝謝分享 希望能用
用Android 就來Android 台灣中文網(https://apk.tw)
回覆 支持 反對

使用道具 舉報

6
7874196 | 收聽TA | 只看該作者
發表於 2016-9-15 16:43
謝謝芬想 卡開機中                            
用Android 就來Android 台灣中文網(https://apk.tw)
回覆 支持 反對

使用道具 舉報

7
dongjessica | 收聽TA | 只看該作者
發表於 2017-1-3 13:20
太好~有你好~這樣能DIY!
用Android 就來Android 台灣中文網(https://apk.tw)
回覆 支持 反對

使用道具 舉報

8
a3333221 | 收聽TA | 只看該作者
發表於 2017-1-21 22:28
請問能把備份的檔案存到電腦的位址嗎?
用Android 就來Android 台灣中文網(https://apk.tw)
回覆 支持 反對

使用道具 舉報

您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則