Windows命令行查看文件的MD5
certutil -hashfile D:\1.exe MD5
certutil -hashfile D:\1.exe SHA1
certutil -hashfile D:\1.exe SHA256
Lint 没有使用的资源文件
D:\sdk\tools>lint.bat --check UnusedResources D:\code\OS_xiangmu --html UnusedResources.html
monkey:
adb shell monkey --ignore-crashes --ignore-timeouts --kill-process-after-error --ignore-security-exceptions -p com.android.dialer --throttle 100 -v 200000
检查内存泄露
adb shell dumpsys meminfo 包名
查字符串
find frameworks/ packages/ vendor/ -name "*.xml" | xargs grep -n --color ""
常用adb 命令
导出Trace.
adb pull /sdcard/Android/data/com.android.dialer/files/dmtrace.trace
1.清除应用数据与缓存
adb shell pm clear <packagename>
adb shell pm clear com.android.dialer
adb shell pm clear com.android.providers.contacts
2.查看前台 Activity
adb shell
dumpsys activity activities | grep mFocusedActivity
3.点亮/熄灭屏幕
点亮屏幕:
adb shell input keyevent 224
熄灭屏幕:
adb shell input keyevent 223
4.滑动解锁
adb shell input swipe 300 1000 300 500
5.输入文本
adb shell input text hello
6.屏幕分辨率
adb shell wm size
7.屏幕截图
adb shell screencap -p /sdcard/sc.png
然后将 png 文件导出到电脑:
adb pull /sdcard/sc.png
8.录制屏幕
adb shell screenrecord /sdcard/test.mp4
停止 Ctrl + C
adb pull /sdcard/test.mp4
9.模拟点击
模拟点击返回按键
adb shell input keyevent 4
//更多
每个数字与keycode对应表
http://blog.csdn.net/q610098308/article/details/48781747