Disabling power/screen off button

Solved

Hi guys

we are having issues with galaxy tab active 3 where users are turning the screen off while the tablet is supposed to be in use. There are cases where it is getting turned off for nefarious reasons and I was wondering if there was a way to prevent this. The devices are running android 13 and we are using Mobicontrol Version: 15.1.1.1184

2 years ago
SOTI MobiControl
ANSWERS
RC
Raymond Chan Diamond Contributor
2 years ago

Managing the screen timeout is another issue, and won't help if a device-user intentionally press the hardware key to turn off the screen or the whole device.   Without considering variations such as your kiosk configurations, apps in the kiosk mode, device brand/firmware version, etc, the simplest workaround is to set the screen timeout to arbitrary large value with the writesecuresetting script command, instead of considering other more advanced policies such as feature control, application-run-control, etc. 

So, returning to the issue highlighted by your title for this discussion thread,  you can try using the script command

   hardwarekeys -keys 26  /block

to disable the power hardware key on your Samsung device.

Solution
J
Jason
2 years ago

Thanks Raymond. I will try that in the next few days when I am finished field work and get back to you

J
Jason
2 years ago

That worked perfectly thanks Raymond. What would the script be to unblock the key? I tried hardwarekeys -keys 26  /unblock but it had no effect

**Edit - The script to unblock it worked as well 

hardwarekeys -keys 26 /unblock
RC
Raymond Chan Diamond Contributor
2 years ago

Are your devices running with lockdown menu/kiosk mode turned on?

Do you just want the device to be always powered on (i.e. cannot be powered-off with power button or on-screen soft power-off button)? Or do you want the hardware power button to be TOTALLY inactive, which means that pressing it has no effect in ANY system or user apps?

J
Jason
2 years ago

We are running them in lockdown mode. At the moment I have them running with screen on while on charge, which they are during a drivers shift as they are in a cradle. But yes I was wondering if there was an app identifier I could black list for the power button or a way to make sure the screen stays on even if they press the side button.

RS
Rafael Schäfer
2 years ago

We did it following way with oem config app (depends on what your manufacturer provides in it'S oem config app):

- set the screen timeout to "never" (done manually on the device during rollout process, not available in oem config app yet for our vendor of the devices.)
- set the device to boot on charger
- disabled power and volume keys

And we use activity suppresion in lockdown profile.

G
GPMOD@SOTI
2 years ago

Hi Jason, 

Thanks for posting on SOTI Pulse and thanks Rafael and Raymond for responding to the post. 

I am glad that you were able to find the solution of this query. 


Thank you. 

Kind regards,

Technical Support | SOTI Inc. |1.905.624.9828 | support@soti.net | www.soti.net |