Android ADB 命令总结

来源:互联网 发布:兰芝淘宝旗舰店 编辑:程序博客网 时间:2024/04/25 12:50
================================
搜集Android 所有Log
adb logcat -c 清理Log
adb logcat > 1212.txt
adb logcat -v time > 1212.txt 带时间
================================
adb uninstall com.**
adb shell rm /sdcard/crash/*.*
adb shell ls /sdcard/crash/
================================
Push 整个文件夹
adb remount
adb push D:\liuliu\. /data/media
======================================
top 查看进程的资源占用情况
mv 重命名文件
======================================
设置系统日期(手机需要root)
adb shell
su
date -s 20160823.131500
======================================
adb shell input keyevent 24 增加音量
adb shell input keyevent 25 降低音量
adb shell input keyevent 4 返回键
adb shell input keyevent 3 HOME 键
164 静音
27 拍照键
26 电源键
176 打开系统设置
66 返回键
adb shell input keyevent 187 切换应用

adb shell am force-stop <packagename> 强制停止应用
adb shell am broadcast [options] <INTENT> 发送自定义广播
ps -x [PID] 查看单个进程的状态
adb shell procrank 查询各进程内存使用情况
adb shell service list 查看services信息
adb shell cat /proc/meminfo 查看当前的内存情况
adb shell cat /proc/cpuinfo 查看CPU信息(硬件)
adb shell cat /proc/iomem 查看IO内存分区

adb shell getprop 列出系统所有属性
adb shell getprop | findstr "gsm" 列出包含gsm的属性
adb shell setprop 修改系统属性
adb shell sqlite3 可以执行sql语句查看数据库信息, 具体使用情况待调查
adb shell pm list packages 列出所有包名
======================================
卸载系统软件(手机需要root)
adb remount
adb shell rm -Rf /system/priv-app/Ro**
adb reboot
======================================
ADB 命令启动常用软件
adb shell am start com.android.browser 启动浏览器
adb shell am start com.android.settings 启动设置
adb shell am start com.tencent.android.qqdownloader 启动应用宝
adb shell am start com.kingroot.kinguser 启动Root工具
adb shell am start com.android.camera2 打开系统相机
adb shell am start com.android.soundrecorder 打开录音软件
======================================
打开无线调试模式
adb tcpip 5555
======================================
ifconfig eth0 up 打开有线网
ifconfig eth0 down 关闭有线网
svc wifi enable打开无线网
svc wifi disable 关闭无线网
======================================







0 0