buttons

 

ADB Concepts : How to “Rotate Android device screen” using “ADB Commands”

Check Out the Video Below for Complete Details!

Topic-1 : How to change Settings values from adb in Android

Use the following command to change the Settings value.

adb shell settings put <namespace> <key> <value>

put:

put means to change & get means to check

namespace:

The namespace of key, and value of the setting you want to change, such as system, global, secure.

key:

The key you want to change

value:

The value you want to change

Topic-2 : To disable the auto-rotate feature from adb in Android

To disable the auto-rotate feature:

adb shell settings put system accelerometer_rotation 0

Topic-3 : To set the desired orientation

set the desired orientation using the “user_rotation” setting

  1. (Right Landscape/ Landscape )
adb shell settings put system user_rotation 1 # 90° (Right Landscape/ Landscape )

2. (Upside Down/ Portrait Reversed )

adb shell settings put system user_rotation 2 # 180° (Upside Down/ Portrait Reversed )

3. (Left Landscape/ Landscape Reversed )

adb shell settings put system user_rotation 3 # 270° (Left Landscape/ Landscape Reversed )

4. (Normal Position/ Portrait)

adb shell settings put system user_rotation 0 # 0° (Normal Position/ Portrait)

Rotate to Landscape:

adb shell settings put system user_rotation 1 # 90° (Right Landscape/ Landscape )
adb shell settings put system user_rotation 3 # 270° (Left Landscape/ Landscape Reversed )

Rotate to Portrait:

adb shell settings put system user_rotation 0 # 0° (Normal Position/ Portrait)
adb shell settings put system user_rotation 2 # 180° (Upside Down/ Portrait Reversed )

Explore on GitHub:


No comments:

Post a Comment