Background:linux
1.The OTA (Fireware version is lower version than the currect version ,or now the firewire version is not the updatest version)android
Then it will let you to update the watch app on the watch pairing or auto trigger when sync the data on the mobile with the watch.ios
2.shell
3.Put the download file to from Mac to the android: adb pull download_file sdcardwindows
4.api
Greenleaf->Device information ,make sure the state is Conected instead of connecting瀏覽器
Greenlead->OTA->Upload the download file and click OTA緩存
Then open the watch app and it should be auto trigged the OTA update 網絡
Also another scenario is when you remove the watch and reset the bluetooth,turn off internet to pair watch to the app.
Then turn on the internet to trigger the latest firmware.app
adb push C:\Users\Administrator\Desktop\test.jpg sdcard
其餘經常使用adb指令:
1.adb install +包名 adb安裝apk (覆蓋安裝是使用 -r 選項)
2.adb uninstall +包名 adb卸載apk
3.adb connect +設備IP 網絡鏈接Android設備
4.adb reboot 重啓Android設備
5.adb devices 獲取鏈接的設備列表及設備狀態
6.adb get-state 獲取設備的狀態 (設備的狀態有 3 鍾,device:設備正常鏈接 , offline:鏈接出現異常,設備無響應 , unknown:沒有鏈接設備)
7.查看運行在 Android設備上的 adb 後臺進程:
執行 adb shell ps | grep adbd ,能夠找到該後臺進程,windows 請使用 findstr 替代 grep
8.adb shell 命令
adb 命令是 adb 這個程序自帶的一些命令,而 adb shell 則是調用的 Android 系統中的命令,這些 Android 特有的命令都放在了 Android 設備的 system/bin 目錄下
8.1. adb shell bugreport , 打印dumpsys、dumpstate、logcat的輸出,也是用於分析錯誤
輸出比較多,建議重定向到一個文件中
adb shell dumpsys > d:\bugreport.log
8.2 pm
Package Manager , 能夠用獲取到一些安裝在 Android 設備上得應用信息
8.2.1 adb shell pm list package 列出全部的應用的包名 (-s:列出系統應用 -3:列出第三方應用 -f:列出應用包名及對應的apk名及存放位置 -i:列出應用包名及其安裝來源)
8.2.2 adb shell pm path+包名 列出對應包名.apk 位置
8.2.3 adb shell pm install +apk存放路徑 安裝應用(目標 apk 存放於PC端,用 adb install 安裝 目標 apk 存放於Android設備上,用 pm install 安裝)
8.3 am
8.3.1 adb shell am start +包名/.Activity (要啓動的Activity) 啓動一個 Activity (-s先中止目標應用,再啓動 -w 等待應用完成啓動 -a 啓動默認瀏覽器打開一個網頁例:adb shell am start -a android.intent.action.VIEW -d http://testerhome.com)
8.3.2 adb shell am monitor 監控 crash 與 ANR
8.3.3 adb shell am force-stop 後跟包名,結束應用
8.3.4 adb shell am startservice 啓動一個服務
8.3.5 adb shell am broadcast 發送一個廣播
8.4 input
這個命令能夠向 Android 設備發送按鍵事件
8.4.1 adb shell input text +具體內容 發送文本內容,不能發送中文
8.4.2 adb shell input keyevent + 按鍵事件 發送按鍵事件 例如:adb shell input keyevent KEYCODE_HOME 模擬按下Home鍵
8.4.3 adb shell input tap +觸摸事件的位置 , 對屏幕發送一個觸摸事件 例如:點擊屏幕上座標爲 500 500 的位置(adb shell input tap 500 500)
8.4.4 adb shell input tap , 對屏幕發送一個觸摸事件
8.4.4 adb shell input swipe 滑動事件 例如:從右往左滑動屏幕
adb shell input swipe 800 600 100 600
8.5 screencap
截圖命令
adb shell screencap -p /sdcard/DCIM/screenTest.png
8.6 screenrecord
4.4以上系統版本新增的錄製命令
adb shell screenrecord /sdcard/demo.mp4
執行命令後操做手機,ctrl + c 結束錄製,錄製結果保存至 sdcard/ 下
8.7 ime
列出設備上的輸入法
adb shell ime list -s
其餘
1.獲取系統版本
adb shell getprop ro.build.version.release
2.獲取系統api版本
adb shell getprop ro.build.version.sdk
3.獲取手機相關製造商信息
adb shell getprop | grep "model\|version.sdk\|manufacture
r\|hardware\|platform\|revision\|serialno\|product.name\|brand"
3,獲取手機系統信息( CPU,廠商名稱等)
adb shell "cat /system/build.prop | grep "product""
或者
adb shell
cat /system/build.prop | grep "product"
4,獲取手機設備型號
adb -d shell getprop ro.product.model
5,獲取手機廠商名稱
adb -d shell getprop ro.product.brand
或者分開執行
adb shell
getprop ro.product.brand
6,獲取手機的序列號
有兩種方式
1,adb get-serialno
2,adb shell getprop ro.serialno
7,獲取手機MAC地址
adb shell cat /sys/class/net/wlan0/address
8,獲取手機內存信息
adb shell cat /proc/meminfo
9,獲取手機存儲信息
adb shell df
10,獲取手機內部存儲信息
adb shell df /data
11,獲取Android設備屏幕分辨率
adb shell "dumpsys window | grep mUnrestrictedScreen"
12,鏈接多個設備對其中一個進行操做
//以adb shell 爲例
adb -s 192.168.101.37:5555 shell
13,查看運行進程
adb shell procrank
14,關閉或殺掉進程
adb shell kill 366
15,保留數據和緩存文件,從新安裝,升級
adb install -r test.apk
16,卸載app但保留數據和緩存文件
adb uninstall -k cnblogs.apk
17,查看目錄下的文件大小
adb shell du -sh *
18,查看正在運行的Services
adb shell dumpsys activity services [<packagename>]
19,查看正在運行的Activity
adb shell dumpsys activity [<packagename>]
20,clear 清除應用數據
adb shell pm clear com.baidu
21,cp複製文件
adb shell 進入Android Linux命令中
cp -f system/app/Music/Music.apk /sdcard/Music.apk
22,刪除命令
adb shell 進入Android Linux命令中
rm -r /mnt/sdcard/a.mp3
刪除文件夾的時候須要加上-r參數
cd dir
rm * 刪除dir中全部文件
23,重啓進入recovery模式
adb reboot recovery
24,cat查看文件
cat /sdcard/test.txt
25,查看指定進程PID
ps + 進程的包名
26,查看進程具體的信息
例如:1460是要查看的進程的PID
cat /proc/1460/maps 查看進程的文件結構
cat /proc/1460/status 查看進程的狀態
27,findstr 和 grep過濾搜索
1)cmd下搜索包名爲com.android.launcher3的進程
adb shell ps|findstr /i 「com.android.launcher3」
2)shell下面搜索 先使用adb shell進去,而後使用grep命令過濾 ps | grep 「com.linux.test」