adb常用命令
adb devices列出当前与PC连接正常的所有设备
adb reboot重启到手机系统
adb reboot recovery重启进入recovery模式
adb reboot bootloader重启进入fastboot
adb reboot edl重启进入9008模式
adb shell getprop ro.product.name查询设备型号
adb shell getprop ro.build.product查询设备代号
adb shell getprop ro.build.ab update查询手机是否采用A/B分区。如果结果显示true表示手机使用A/B分区
adb shell getprop ro.serialno查询设备序列号
adb shell cat /config/usb gadget/g1/strings/0x409/serialnumber查询设备序列号
adb get-serialno查询设备序列号
adb shell reboot -p关机
adb shell pm clear [packageName]清除应用数据与缓存
adb shell am start -a android.settings.LOCATION SOURCE SETTINGS打开定位设置界面
adb shell svc wifi [disable/enable]关闭/开启WiFi
adb shell svc data [disable/enable]关闭/开启移动网络
adb shell service call statusbar 1显示状态栏
adb shell service call statusbar 2隐藏状态栏
adb shell settings get global wifi on查询WiFi是否开启,返回结果0代表关闭,1代表开启
adb shell "settings put global captive portal http url http://connect.rom.miui.com/generate_204"解决类原生系统连接wifi后,显示无法联网的错误
adb shell "settings put global captive portal https url https://connect.rom.miui.com/generate_204"解决类原生系统连接wifi后,显示无法联网的错误
adb shell screencap -p /sdcard/screenshot.png && adb pull /sdcard/screenshot.png "C:\Users\admin\Desktop\$(Get-Date -UFormat "%s").png"截屏并保存到电脑(powershell中执行)
adb shell "dumpsys window | grep mCurrentFocus"查看当前Activity
adb shell am start -n [activity]打开一个Activity
adb shell cat /proc/version查看内核版本
adb shell ime list -s只显示每个摘要行
adb shell ime list -a查看所有输入方法
adb shell ime enable 使输入法可用
adb shell ime disable 禁用输入法
adb shell ime set 切换输入法(设置默认输入法)
adb shell ime reset重置为默认输入法
adb shell settings get secure default input method查看当前正在使用的输入法
adb shell settings put secure default input method 切换输入法(设置默认输入法)
adb shell getprop ro.product.cpu.abi查询设备的主要架构
adb shell getprop ro.product.cpu.abilist查询设备支持的所有架构列表
adb shell pm list packages列出手机上所有已安装的应用及其包名
adb shell pm list packages -3列出手机上所有用户应用
adb shell wm size获取 Android 设备屏幕分辨率
adb shell wm density获取android设备屏幕密度(DPI)
adb shell dumpsys window displays打印屏幕相关的详细信息
adb shell uname -r查看内核信息
fastboot常用命令
fastboot devices列出当前已进入FASTBOOT模式,且与PC连接正常的所有设备
fastboot getvar product输出该机型内部代号名称
fastboot getvar all输出该设备的所有信息
fastboot getvar current-slotVAB(分区)机型,查询当前系统槽位( a/ b)
fastboot erase recovery清空恢复分区
fastboot flash recovery [twrp.img]烧录img镜像文件到recovery分区
fastboot flash boot [boot.img]烧录img镜像文件到boot分区
fastboot reboot重启手机
fastboot reboot-recovery从fastboot进入recovery模式
fastboot oem edl进入9008模式
fastboot oem device-info输出当前BL锁状态(非MTK)
fastboot oem lks输出当前BL锁状态(MTK)
fastboot oem unlock解除BL锁并清空所有数据
fastboot oem poweroff在拔掉数据线后立即退出FASTBOOT模式并关机
参考:https://mazhuang.org/awesome-adb/

阅读量: 256 | 标签: 暂无标签

仅有一条评论

  1. 华纳圣淘沙公司开户新手教程

    零基础学会(183-8890-9465薇-STS5099)
    华纳圣淘沙公司开户

    华纳圣淘沙公司开户保姆级教程(183-8890-9465薇-STS5099)

    一步步教你开通华纳圣淘沙公司账户(183-8890-9465薇-STS5099)

    华纳圣淘沙公司开户分步图解

    首次开户必看:(183-8890-9465薇-STS5099)
    华纳圣淘沙全攻略

    华纳圣淘沙公司开户实操手册(183-8890-9465薇-STS5099)
    华纳圣淘沙开户流程视频教程

    手把手教学:(183-8890-9465薇-STS5099)
    华纳圣淘沙公司开户

    华纳圣淘沙公司开户完全指南(183-8890-9465薇-STS5099)

添加新评论