android - 如何通过ADB展开/折叠状态栏?

标签 android shell android-service adb android-statusbar

有没有办法通过ADB展开/折叠Android手机的状态栏?

最佳答案

Shell 进入设备(使用 adb shell)并使用以下命令展开/折叠状态栏:

# Expand status bar
service call statusbar 1
# Collapse status bar
service call statusbar 2

注意:如果设备已获得 root 权限,则可能需要将命令调用为 su(使用 adb shell su)


服务调用已在非 Root 设备上进行测试。

关于android - 如何通过ADB展开/折叠状态栏?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34082954/

相关文章:

Python Shell,记录命令以方便重新执行

android - 在 Android 中更改通知 Intent

java - 如何在 Android 中以编程方式查找当前正在运行的应用程序?

android - 服务绑定(bind)链

java - 为服务器端设置 gcm

android - 跟踪用户观看视频 android exoplayer 的时长

android - Android中Intent的概念?

java - 有没有办法让 Ant 创建 shell 或批处理运行时脚本?

android - CardView 中不允许元素 LinearLayout

linux - 如何确定字符串是否包含awk的子字符串