Fix screen rotation on Android 10

Solved

Good morning,

I need to fix the screen rotation into this device type:

Producer: emdoor

Android: 10

Enrollment type: Android Enterprise – Work Managed Device

Agent version: 15.1.5.1049

MobiControl web instance version: 15.5.0.1021

The aim is to force it to landscape mode and then disable the automatic rotation. I already tried with this script:

writesecuresetting -sys hide_rotation_lock_toggle_for_accessibility 1
writesecuresetting -sys accelerometer_rotation 0
 
But they are working with Android 8, not with Android 10. Into Android 10, which is the OS version installed in the device I need to set, if I send that script it only disables the automatic screen rotation, but it doesn't set it into landscape. It just remain in the position during which the automatico sceen rotation was disabled.
 
Is there any difference into Android 10 to force the landscape mode, before toggling off the automatic screen rotation?
 
Thank you, best regards.
3 years ago
SOTI MobiControl
ANSWERS
RC
Raymond Chan
3 years ago

Hi Brando,

Though I don't have any of your device model to do any test, I believe the following should work for forcing landscape mode when your device is enrolled in Android-Enterprise Device-Owner (or Work Managed) mode:

  writesecuresetting -sys user_rotation          1

Please update everyone here in this forum about your test result.

Solution
GB
Giuseppe, Brando
3 years ago

Hi Raymond,

thank you for your reply, it looks like it is working.