ADB命令-Android
-
- adb logcat -c 清空缓存Log
-
- adb logcat -G 2m 扩大缓冲区大小
-
- adb devices 查看连接的设备名称
-
- adb -s xxx shell 连接指定设备,xxx指序列号
-
- adb kill-server && adb start-server 停止、启动adb服务
-
- adb tcpip 5555 && adb connect <手机ip> 通过wifi连接adb
-
- adb disconnect && adb usb 断开wifi、切换至usb模式
-
- adb reboot bootloader && fastboot flashing unlock 进入fastboot模式、unlock解锁
-
- adb root && adb disable-verity && adb reboot 获取root权限、禁用verity、重启
-
- adb root && adb remount 将文件系统重挂载可读写模式
-
- adb reboot recovery && adb sideload xxx.root.zip OTA升级
-
- adb reboot edl 高通平台进入9008口
-
- adb push xxx.file /vendor/ 将文件push至vendor分区
-
- adb install -r xxx.apk 安装apk(-r表示覆盖安装)
-
- adb shell;logcat -v time threadtime > 1.log 打印android log(带线程信息)
-
- adb shell;logcat -v time |grep -E "camera|lcd" 打印android log检索多个关键字
-
- adb shell logcat -v time |findstr /c:"" 打印android log检索单个关键字
-
- adb shell screencap -p sdcard/01.png 截屏
-
- adb shell screenrecord /sdcard/record.mp4 录像
-
- adb shell getprop ro.build.id 查看版本号
-
- adb shell getprop ro.build.type 查看user或者debug版本
-
- adb shell getprop ro.product.model 查看产品名称
-
- adb shell getprop ro.build.version.release 查看android版本号
-
- adb shell getprop ro.kernel.version 查看内核版本
-
- adb shell top 持续监视进程信息
-
- adb shell ps -ef |grep "camera" 查看camera进程的瞬间信息
-
- adb shell kill -9 进程号 强制kill进程
-
- adb shell getenforce 查看selinux状态
-
- adb shell setenforce 0 关闭selinux
-
- adb shell ps -Z 查看进程上下问题
-
- adb shell ls -lZ 查看文件上下文
-
- adb shell getprop -Z 查看属性上下问题
-
- adb shell dumpsys media.camera dump 相机信息
-
- adb shell dumpsys window dump窗口服务信息
-
- adb shell dumpsys battery 查看电池信息:百分比、电压、温度等
-
- adb shell pm list package -f techinfo 查看包名
-
- adb shell pm list package 列出手机所有包名
-
- adb shell dumpsys activity |findstr ResumedActivity 查看包名:先打开应用、再执行命令
-
- adb shell dumpsys activity |findstr camera 查看包名:先打开应用、再执行命令
-
- adb shell am monitor 查看包名:先输入命令、再打开应用
-
- adb shell logcat |grep -i cmp 查看包名
-
- adb shell am start -n com.android.camera2/com.android.camera.CameraLauncher 启动包名:{packageName}/.
-
- adb shell am force-stop com.android.camera2 停止包名
-
- adb shell pm -p com.android.camera2 删除包名
-
- adb shell am startservice 启动服务
-
- adb shell am stopservice 停止服务
-
- adb shell am start -a android.intent.action.VIEW -d http://www.12306.cn 打开12306网站
-
- adb shell am start -a android.intent.action.CALL -d tel:10086 拨打10086
-
- adb shell pm install xxx.apk 安装apk
-
- adb shell pm uninstall xxx.apk 卸载apk
-
- adb shell settings put global airplane_mode_on 1 "打开飞行模式"
-
- adb shell am broadcast -a android.intent.action.AIRPLANE_MODE --ez state true
-
- adb shell settings put global airplane_mode_on 0 关闭飞行模式
-
- adb shell am broadcast -a android.intent.action.AIRPLANE_MODE --ez state false
浙公网安备 33010602011771号