ADB高級(jí)應(yīng)用
來(lái)源:程序員人生 發(fā)布時(shí)間:2014-11-19 09:00:55 閱讀次數(shù):3207次
ADB高級(jí)利用
1、利用無(wú)線來(lái)查看adb shell
> adb tcpip 5555
連接:
> adb connect IP:5555
見后文《調(diào)試注意事項(xiàng)》
2、摹擬按鍵
> adb shell input keyevent "value"
部份常見按鍵對(duì)應(yīng)值:
Key | Constant Value
Back 4
Power 26
Menu 82
Home 3
Search 84
方向鍵:
上 19
下 20
左 21
右 22
確認(rèn)(類似單擊):23
3、adb shell下查看系統(tǒng)盤符
> adb shell df
4、adb shell下掛載系統(tǒng)
> adb shell
> busybox mount -o remount,rw /system
5、adb shell 下移除USB裝備
> adb shell
> vdc unshare /mnt/sdcard ums
6、adb shell 下查看內(nèi)核信息
> cat /proc/kmsg &
7、查看build配置的值(以heap為例)
> adb shell getprop | grep heap
8、通過sendevent
摹擬按鍵和鼠標(biāo)
直接用input實(shí)現(xiàn):
> adb shell input keyevent 3
> adb shell input tap 250 250
> adb shell input swipe 250 250 300 300
9、查看屏幕顯示的fps
開啟系統(tǒng)屬性:debug.sf.fps=1
然后直接logcat -s SurfaceFlinger -v time
(看SurfaceFlinger里面打印出來(lái)時(shí)多少)
10、查看當(dāng)前運(yùn)行程序棧
> dumpsys window windows | busybox grep "Window #"
101、查看當(dāng)前裝備DDR運(yùn)行頻率
> cat /proc/clocks | busybox grep "ddr"
102:ADB logcat過濾
adb logcat -s TAG_NAME
adb logcat -s TAG_NAME_1 TAG_NAME_2
adb logcat “*:PRIORITY”
adb logcat -s TAG_NAME:PRIORITY
adb logcat -s TAG_NAME_1:PRIORITY_1 TAG_NAME_2:PRIORITY
優(yōu)先級(jí)(PRIORITY)分為以下幾種:
V
生活不易,碼農(nóng)辛苦
如果您覺得本網(wǎng)站對(duì)您的學(xué)習(xí)有所幫助,可以手機(jī)掃描二維碼進(jìn)行捐贈(zèng)
------分隔線----------------------------
------分隔線----------------------------