adb命令清缓存
adb 命令清缓存
简介
adb shell 是 Android Debug Bridge(ADB)提供的一个命令,允许用户通过命令行访问连接到计算机的 Android 设备的 shell(命令行界面)。通过 adb shell,用户可以在设备上执行各种系统级和应用级的命令,进行调试、测试和系统管理等操作。
adb shell 常用命令
- 查看目录结构:
adb shell ls
- 查看系统当前日期:
adb shell date
- 查看系统 CPU 使用情况:
adb shell cat /proc/cpuinfo
- 查看系统内存使用情况:
adb shell cat /proc/meminfo
adb shell 查看应用列表
1
- 显示所有应用:adb shell pm list packages
- 显示系统自带应用:adb shell pm list packages -s
- 显示第 3 方应用:adb shell pm list packages -3
adb shell 查看当前的页面名
- MacOS:
adb shell "dumpsys window | grep mCurrentFocus"
- Windows:
adb shell "dumpsys window | findstr mCurrentFocus"
清除应用数据及缓存
adb shell pm clear <包名>
总结
- adb shell 命令
- 查看应用列表
- 查看当前的页面名
- 清除应用数据及缓存