前言

记录一下容易忘记得adb命令集合,方便查询。

正文

如果grep不行就换findstr,这个是环境问题

这里记录一下常用的adb命令

开启Android指针位置

设置1表示开启,0表示关

adb shell settings put system pointer_location 1

查询

adb shell settings get system pointer_location

显示点按操作反馈

0表示关闭,1表示开启

adb shell settings put system show_touches 1

查询

adb shell settings get system show_touches

抓hprof

//后面部分是存放路径
adb shell am dumpheap com.biumall.k /sdcard/biumall.hprof

安装后的 apk 文件路径

adb shell dumpsys package com.biumall.music  | findstr path
adb shell dumpsys package com.biumall.music  | grep path

清除应用缓存数据

adb shell pm clear com.biumall.music

Top的Activity

adb shell dumpsys activity top | grep ACTIVITY
adb shell dumpsys activity activities | grep mResumed
adb shell dumpsys activity | grep Focuse

启动Activity时间

adb shell am start -W com.biumall.k/.AppActivity

内存占用

adb shell dumpsys meminfo com.biumall.k
adb shell dumpsys meminfo --package com.biumall.k

reset

git add .
git reset HEAD --hard

隐藏内容!
评论后才能查看!

媒体控制

隐藏内容!
评论后才能查看!

显示provider

adb shell pm list packages -f provider

旋转屏幕

隐藏内容!
评论后才能查看!

显示activity信息

adb shell dumpsys activity

查询启动得服务

隐藏内容!
评论后才能查看!

参考文章

1 条评论

  • lanpinggai
    lanpinggai 游客

    可以

    江西南昌市
    回复