Disabling Screen rotation -Android Enterprise -Android 8

S
Sayeed
CEVA Logistics (Australia)

I am running soti mobicontrol and Surf on Zebra TC57, Android 8/Android Enterprise.

I would like to disable the screen rotation, locking the screen in portrait mode.

I have tried to send a script "lockdownorientation portrait"  but with no luck. I also tried with few other scripts but

again failed to achieve my goal. Zebra Stage Now also does not have any option to do it.

Any suggestions?

5 years ago
Android
ANSWERS
OS
Onno Smit
5 years ago

For use with our TC7x devices we have created a MCStudio package with the following Post Install.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; Post-Install Script File
; Date Created: woensdag 31 mei 2017
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


; Description: Set Sleep time to 10 minutes
writesecuresetting -sys screen_off_timeout 600000

; Description: Set 24-hour format to True
writesecuresetting -sys time_12_24 24

; disable screen rotation
writesecuresetting -sys accelerometer_rotation 0

Maybe worth a try.

MD
Matt Dermody Diamond Contributor
5 years ago

The issue you will face is the fact that writesecuresetting permission is not automatically granted to the MobiControl Agent under Android Enterprise for Zebra 8.1 and higher devices. If you issue that script you will be prompted to enable a permission so that the Agent can use writesecuresetting scripts. The last I checked this still was not possible to automate so it does require manual interaction at the device level. There theoretically should be a new Zebra plugin available that would grant this permission automatically but both Zebra and SOTI are aligning very closely with Google moving forward and Google doesn't want us to leverage write secure settings long term. It is really unfortunate as we have lost a significant amount of configurability as we were prematurely forced to AEDO. Android Oreo supports the DA management API but Zebra and SOTI do not support it and have forced us to use AEDO moving forward. 

After that permission is granted the following script will lock the current orientation and disable rotation:

writesecuresetting -sys accelerometer_rotation 0

S
Sayeed
5 years ago (edited 5 years ago)

Thanks Onno and Matt for your help and the clarification.

The script only works after manually enabling permission Mobicontrol at device level and it much easier just to disable screen rotation swapping settings. Looking forward to have a fully automated option to disable screen rotation through script. Thanks.

MD
Matt Dermody Diamond Contributor
5 years ago

Agreed that the manual granting of that permission requires an extra step just like manually configuring the screen orientation but once that permission is granted the devices can be administered with a whole slew of other writesecuresettings scripts. 

There are a ton of examples in the following thread where the community listed all of the options that we used to have with writesecuresettings under DA that we are now missing in AEDO. If you manually grant the permission for writesecuresetting in AEDO then you can regain access to these extra configuration options but admittedly, most of us want to avoid manually granting that setting on a device. 

https://discussions.soti.net/thread/wish-list-for-zebra-ae-functionality/

S
Sayeed
5 years ago

Thanks Matt.

Luckily I needed to change rotation screen for few scanners and manual configuration in this regard is easier. You are right If I can grant permission manually from the scanner it will give me more options to perform writesecuresettings scripts. But the issue is we are having around 700 X TC57 scanners and it would be a night mare granting permission manually through each scanner. Hope that SOTI and Google/Android will find out a way to make our life easier.