如何通过ADB扩展/折叠状态栏?

7
有没有办法通过ADB扩展/折叠Android手机的状态栏?
3个回答

21

通过adb shell进入设备,并使用以下命令展开/折叠状态栏:

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

注意:如果设备已经取得了Root权限,命令可能需要使用su(通过adb shell su)调用。


该服务调用是在一个非Root设备上测试的。


1
加1分 - 非常感谢。同时,可以使用“service call statusbar 7”来扩展它的完整性。 - wuseman

13

另一种方法是使用 ""adb shell cmd"" 命令:

  1. 展开通知栏

adb shell cmd statusbar expand-notifications

  1. 收起通知栏

adb shell cmd statusbar collapse

  1. 你也可以展开快捷设置

adb shell cmd statusbar expand-settings

请查看帮助文档获取更多信息:

adb shell cmd statusbar help


你有什么想法可以让它在Windows Subsystem for Android上运行吗? - Kahan Bhalani

-1

如果你想通过adb将安卓设备的通知信息拉到shell中,你可以使用以下命令:
adb shell dumpsys notification

如果你想要下拉通知栏,你可以尝试使用mokeyrunner


请在您的回答中添加更多信息,并描述为什么这个命令会解决问题。否则,您的回答可能因质量不佳而被删除。 - user1438038

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接