Skip to content

Instantly share code, notes, and snippets.

@whunter
Created February 9, 2016 18:13
Show Gist options
  • Save whunter/832c844db80dda873a81 to your computer and use it in GitHub Desktop.
Save whunter/832c844db80dda873a81 to your computer and use it in GitHub Desktop.
android device display rotation via adb
# disable auto rotation
adb shell content insert --uri content://settings/system --bind name:s:accelerometer_rotation --bind value:i:0
# force landscape
adb shell content insert --uri content://settings/system --bind name:s:user_rotation --bind value:i:1
# back to portrait
adb shell content insert --uri content://settings/system --bind name:s:user_rotation --bind value:i:0
# upside down
adb shell content insert --uri content://settings/system --bind name:s:user_rotation --bind value:i:2
# "other" landscape
adb shell content insert --uri content://settings/system --bind name:s:user_rotation --bind value:i:3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment