writesecuresetting script

writesecuresetting script

Hi SOTI support

 

I want to use script that

1. change device from vibration to sound 

2. Set sound volume

3. use writesecuresetting  -sys 

 

I try to find writesecuresetting   -sys document but i cannot 

 

Device

Samsung Mobile

Android 8-10

Google Enterprise

3 Answers

Order By:   Standard | Newest | Votes
DDMOD@SOTI | posted this 22 May 2020

Hi Rathasatekun,

 

Thanks for the post!

 

The script "writesecuresetting" is used to change system settings directly. You can use the script "watchsetting on", trigger the setting change, then look at the "Logs" panel in MobiControl to see what the setting is called. However, "watchsetting" and "writesecuresetting" may NOT work for all devices especially newer versions of Android because of changes to the Android OS through the past few versions. You can still try however with the tutorial below:

How to identify Settings

Identify settings with the following script: watchsettings on
Toggle the settings you want to identify on the device
Check the info panel for the results
Disable watchsettings when you are done: watchsettings off

Check the Log info panel showing results from toggling some settings on.
Note that there are two types of settings: Secure and System
The System parameter is represented with a -sys. the security parameter is represented with  a -sec.

Writing the Script

Here is an example of a log entry:

Custom Log (URI:content://settings/system SETTING: screen_off_timeout VALUE:1800000)

The italic parts are what is required to create a script to change the screen timeout.
We will be using the writesecuresetting command.
writesecuresetting –sys screen_off_timeout 1800000
This command will change the screen timeout to 30 minutes. Turn it to 2 minutes with this command:
writesecuresetting –sys screen_off_timeout 120000

Practical Usage Example

With these commands we could combine policies and rules to disable or enable settings based on specific criteria.
Example: Create an Alert rule on a device and tell it to run this command if the device is low on battery:
Writesecuresetting -sys screen_brightness 50
This will reduce the screen brightness on the device and extend the battery’s life.

Also, 

writesecuresetting -sys volume_ring_speaker 5
writesecuresetting -sys volume_music_speaker 5

with the number representing the volume level

If the above does not work, then unfortunately there is no way to adjust volume settings via scripts. You will have to adjust it manually and if you have lockdown, you may need to look into Settings Manager so the user can adjust the volume within lockdown.

For zebra devices, please follow https://www.zebra.com/us/en/support-downloads/knowledge-articles/evm/Adjust-Volume-Control-Level-Zebra-Volume-Control-using-StageNow-Tool.html 

 

Regards,

Technical Support | SOTI Inc. |+1-888-494-SOTI (7684) | support@soti.net | www.soti.net |

  • 1
  • 1
rathasatekun | posted this 22 May 2020

Thx 

  • 0
  • 0
DDMOD@SOTI | posted this 22 May 2020

Hi Rathasatekun,

 

 

If the answer provided helped you in solving your inquiry, please convey it by selecting "is solution", so others may benefit from this information.

 

Regards,

Technical Support | SOTI Inc. |+1-888-494-SOTI (7684) | support@soti.net | www.soti.net |

  • 1
  • 1

Give us your feedback
Give us your feedback
Feedback