美文网首页
android常用命令

android常用命令

作者: tzlf | 来源:发表于2021-03-09 17:31 被阅读0次

    1. settings

    adb shell settings get system xxx

    adb shell settings get secure xxx

    adb shell settings get global xxx

    修改: adb shell settings put  global xxx   xxx2

    2. dumpsys

    可导出系统服务如

    adb shell dumpsys display

    adb shell dumpsys activity top

    adb shell dumpsys  power

    还可导出Activity信息,Activity需实现dump方法

    如adb shell dumpsys activity com.android.launcher3.Launcher

    3. input

    可模拟输入按键,tp事件

    返回键:adb shell input keyevent 4

    4. getevent

    可查看输入设备

    有时执行adb shell getevent会卡住,可先adb shell ,再执行getevent

    5. am

    adb shell am start -a "action"

    adb shell am start -n 包名/类名

    adb shell am broadcast -a "action"

    6. pm

    adb shell pm path 包名 -----用于查看路径,或判断是否存在

    相关文章

      网友评论

          本文标题:android常用命令

          本文链接:https://www.haomeiwen.com/subject/zfsbqltx.html