改变与亚行的Andr​​oid设备方向 [英] Changing Android Device orientation with ADB

查看:196
本文介绍了改变与亚行的Andr​​oid设备方向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是真实的设备上Android 4.4的,我想通过设置亚行设备的方向。我不希望它做uiautomator,因为它不会在uiautomator code终止后持续。

I'm using Android 4.4 on a real device and I want to set the device orientation via adb. I don't want it done with uiautomator since it won't last after the termination of the uiautomator code.

我怎样才能做到这一点?

How can I do this?

推荐答案

您可能需要先关闭自动旋转

You may first need to turn off the automatic rotation

adb shell content insert --uri content://settings/system --bind name:s:accelerometer_rotation --bind value:i:0

旋转为横向

    adb shell content insert --uri content://settings/system --bind name:s:user_rotation --bind value:i:1

旋转纵向

    adb shell content insert --uri content://settings/system --bind name:s:user_rotation --bind value:i:0

这篇关于改变与亚行的Andr​​oid设备方向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆