Skip to content

Instantly share code, notes, and snippets.

@monkeydone
Created March 28, 2020 11:27
Show Gist options
  • Save monkeydone/4d4e7e7d83664e8cc4dea2bde40801ae to your computer and use it in GitHub Desktop.
Save monkeydone/4d4e7e7d83664e8cc4dea2bde40801ae to your computer and use it in GitHub Desktop.
https://juejin.im/post/5d689058e51d4562054103e0
@monkeydone
Copy link
Author

adb shell screencap 文件保存路径

@monkeydone
Copy link
Author

adb shell screenrecord 文件保存路径

@monkeydone
Copy link
Author

adb shell am start -a android.intent.action.VIEW

@monkeydone
Copy link
Author

adb shell am start -n 包名/类名

@monkeydone
Copy link
Author

adb shell am startservice 包名/类名

@monkeydone
Copy link
Author

adb shell am boradcast -a 广播Action

@monkeydone
Copy link
Author

adb shell force-stop 包名

@monkeydone
Copy link
Author

adb shell pm list packages

@monkeydone
Copy link
Author

adb shell pm list permission-groups

@monkeydone
Copy link
Author

adb shell pm list features

@monkeydone
Copy link
Author

adb shell pm path 包名

查看包名安装路径

@monkeydone
Copy link
Author

adb shell pm clear 包名

@monkeydone
Copy link
Author

查看支持最多用户数
adb shell pm get-max-users
查询系统所有用户
adb shell pm list users
创建新用户
adb shell pm create-user user_name
移除指定id用户
adb shell pm remove-user user_id

@monkeydone
Copy link
Author

adb shell dumpsys activity | findstr Run

查看activity

adb shell dumpsys package com.xxx.xxx(包名)

查看包名信息

@monkeydone
Copy link
Author

a.模拟拔下设备电源

adb shell dumpsys battery unplug

b. 低电量条件下的行为

adb shell settings put global low_power 1

c .恢复电源修改

adb shell dumpsys battery reset

@monkeydone
Copy link
Author

进入Recovery 模式可以使用组合键,也可以使用adb 命令 adb 命令进入recovery 模式如下adb reboot recovery

@monkeydone
Copy link
Author

adb logcat -s 关注log标签

@monkeydone
Copy link
Author

adb shell top

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment