blog.minskio.co.uk

Content and theme behind minskio.co.uk
Log | Files | Refs

disabling-rotation-android.md (1232B)


      1 ---
      2 title: "Disabling rotation suggestions on Android"
      3 date: 2026-10-20T16:49:00
      4 tags: ["Android", "Linux", "Snippets", "Software"]
      5 ---
      6 
      7 I use GrapheneOS on my Pixel 7 phone with screen rotation disabled and have done since the moment I got this phone.
      8 
      9 If I'm using it while lying down however, I get a ~~helpful~~ *infuriating* little floating button at the bottom of the phone which offers to rotate my screen. Accidentally pressing this will rotate the screen but locking it in place. There's a way to disable this however instead of being a toggle in the settings menu, you need to delve in using `adb`.
     10 
     11 As a certified masochist, I'm naturally doing all of this over Wifi on my distro of choice, NixOS.
     12 
     13 Firstly, you'll need to enable debugging on your phone:
     14 
     15 * Enable developer options\
     16 About phone > tap Build number 7 times
     17 * Developer options > Debugging > Wireless Debugging > Enable
     18 * Allow over your SSID
     19 
     20 Then, on the computer front, we're connecting via ADB:
     21 
     22 ```
     23 nix-shell -p android-tools
     24 adb pair your.phone.ip.address:port
     25 adb connect your.phone.ip.address:second-port-number
     26 adb devices
     27 adb shell settings put secure show_rotation_suggestions 0
     28 adb disconnect
     29 exit
     30 ```
     31 
     32 And you're done, enjoy being horizontal.