有没有办法通过
ADB
扩展/折叠Android手机的状态栏?ADB
扩展/折叠Android手机的状态栏?通过adb shell
进入设备,并使用以下命令展开/折叠状态栏:
# Expand status bar
service call statusbar 1
# Collapse status bar
service call statusbar 2
注意:如果设备已经取得了Root权限,命令可能需要使用su
(通过adb shell su
)调用。
该服务调用是在一个非Root设备上测试的。
另一种方法是使用 ""adb shell cmd
"" 命令:
adb shell cmd statusbar expand-notifications
adb shell cmd statusbar collapse
adb shell cmd statusbar expand-settings
请查看帮助文档获取更多信息:
adb shell cmd statusbar help
如果你想通过adb将安卓设备的通知信息拉到shell中,你可以使用以下命令:
adb shell dumpsys notification
如果你想要下拉通知栏,你可以尝试使用mokeyrunner。