adb常用命令(一)

2021-09-29 10:12:49 字數 1673 閱讀 5692

一、使用全域性命令

設定**:

如:adb shell settings put global http_proxy 127.0.0.1:8888

移除**:

注意:移除**後要重啟手機才能生效。設定**可以多次設定,立即生效。

但是,adb shell settings delete global http_proxy,再有些沒有delete引數的裝置上報錯?

invalid command: delete

usage:  settings [--user num] get namespace key

settings [--user num] put namespace key value

'namespace' is one of , case-insensitive

if '--user num' is not given, the operations are performed on the owner user.

解決方法,sqlite中找到settings.db,在資料庫中刪除**資訊(需要root)

然後重啟裝置:reboot

如果不進入adb shell,執行會報錯:

error: unable to open database "/data/data/com.android.providers.settings/databases/settings.db": unable to open database file

解決辦法是執行adb shell命令進入android shell介面,再執行sqlite3命令。

下好apk後,安裝到手機

adb install proxy-setter-debug-0.2.1.apk

設定**:

adb shell am start -n tk.elevenk.proxysetter/.mainactivity -e host **ip位址 -e port 埠號 -e ssid wifi名稱 -e reset-wifi true -e key wifi密碼

如:adb shell am start -n tk.elevenk.proxysetter/.mainactivity -e host 127.0.0.1 -e port 8888 -e ssid your-wifi-name -e reset-wifi true -e key your-wifi-password

adb常用命令(一)

常用adb命令 l adb devices 獲取裝置列表及裝置狀態 l adb get state 獲取裝置的狀態 l adb kill server adb start server 結束 adb 服務,啟動 adb 服務 l adb logcat 列印 android 的系統日誌,這個可以單獨拿...

adb 常用命令一

adb s 裝置號 install 安裝包路徑 adb uninstall package名 4.3 adb shell dumpsys power 檢視電源管理 5.1 adb shell cat proc cpuinfo 5.2 adb shell cat proc meminfo 5.3 ad...

adb常用命令

安裝軟體 adb install apk檔名稱.apk 重新安裝該軟體 adb install r apk檔名稱.apk 解除安裝apk軟體 adb uninstall apk包名.apk 檢視手機上的執行日誌,此項可以用來查錯 adb logcat 檢視手機是否連線,以及連線了幾台手機 adb d...