I am using Android 11 (LineageOS 18.1), and I'd like to prevent Android from accidentally switching to portrait mode, like when I rotate the direction of gravity field. Camera app seem to be resetting phone orientation against all preferences.
I tried:
- setting rotation settings in android settings
- worked, but restarting camera overrides this setting, reverting back to portrait
- to disable sensors in developer mode
- worked, but doesn't preserve state between system reboots
- app "Rotation Lock + Landscape" from F-Droid
- worked, but restarting camera overrides this app, reverting back to portrait
After all (1.,2.,3.) together, the mode came back to portrait after restart, and I started getting error "open camera error id = 0
" upon trying to open camera, which only disappeared after factory reset... :/
So, none of that fully worked.
I want to permanently prevent all apps from switching screen orientation based on gyro, and the phone not resetting orientation during startup: set the orientation "in stone" (permanently, and so that I could only manually switch between it).