Android Plus, writeprivateprofstring, pbd.ini

Android Plus, writeprivateprofstring, pbd.ini

Hi,

can anyone explain me the "writeprivateprofstring" for Android Plus devices? I'm using MobiControl "14.1.3".

 I don't undestand the help: https://www.soti.net/mc/help/v14.1/en/scriptcmds/gsrindex.html?gsrid=reference/writeprivateprofstring.html

 

How can I read the value from my device?

 

Where can I find the pbd.ini on my Android device?

 

What I have tried:

"writeprivateprofstring isAllowed "Zebra Technologies" "MC18N0" "Yes"

 It looks like the command works but I don't know how to read the value

 

7 Answers

Order By:   Standard | Newest | Votes
Raymond Chan | posted this 07 May 2018

Based on what I found when working on MobiControl v10/11 some years ago,  pdb.ini is accessible only on devices of legacy Windows platforms.    There is no such file accessible on Android+ platform.

 

Did Soti support team or any official documentation give you the argument  

       isAllowed "Zebra Technologies" "MC18N0" "Yes"

to try out?   Or did you just make this up randomly to test the command?

 

 

  • 0
  • 0
Support Staff | posted this 07 May 2018

Hi Jurgen, 

 

Just curious, how do you know if it worked or not?   I usually suggest extra caution when using this particular script. 

 

Perhaps it would be easier to tell you how to use it, if we know what you are trying to do?

 

Regards,

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

  • 0
  • 0
Jürgen Zahn | posted this 08 May 2018

Hi Raymond,

no one give me the argument.

I searched a bit and found this Web-Site: https://handstandsam.com/2017/05/04/identifying-an-android-device/

I then compared this with the information on the "View devices" informations.

Yes, I agree with you: I do not think there is a pbd.ini, but according to the documentation, there is a pbd.ini on Android devices.

  • 0
  • 0
Raymond Chan | posted this 08 May 2018

I believe the description related to pdb.ini, which should be specific to legacy Windows platforms,  has been inherited from earlier document versions, and should be considered inaccurate in the latest documentations for v13.x/v14.x.  So, don't bother about it for your Android+ devices.

 

Also, the command writeprivateprofstring is used to configure Mobicontrol specific configurations with proprietary syntax/arguments, which should not to be confused with any configuration parameters documented in Generic Android API documentation released by Google.  So, don't try writing anything randomly using this command as hidden problem(s) may be caused.  If you have anything specific you want to do on your device,  send the relevant device information and requirements to Soti support team.  If it is doable, you shouldl be told about how to do it properly, say with script command(s) or by some other means.

 

  • 0
  • 0
Jürgen Zahn | posted this 08 May 2018

Hi Support,

I was looking for a way to create and manipulate a settings-file on a android device.

  • 0
  • 0
Support Staff | posted this 08 May 2018

Hi Jurgen, 

 

Let me share a little information that may make your quest a little easier.  *Please note that this may not work on all OS Versions, manufacturers and Devices Models.

  • How to use the “watchsettings” and “writesecuresettings” to manipulate settings on Android+ devices. Please note that this feature was added in MobiControl Version 10 R4 (build 9619) and as such will not work older versions

 

  • The user has a desire to alter Android settings remotely with script commands. Customer has MobiControl v10 R4 or better and has Android+ devices.

 

  • Android settings includes any setting that can be found in the default settings application on the Android device.

 

  • Some settings may not be configurable on the device with this method. This can vary between device and OS version, so the expectation for the customer before attempting the scripts

 

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
(see below screenshot for example)

User-added image

Screenshot of Log info panel showing results from toggling some settings on:

User-added image

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 highlighted 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.
   

 

When sending a writesecuresetting command, watchsettings will detect the change and display it in the log panel. You can also check the Android settings on the device to make sure.

Some settings will not toggle because they require a separate API call. This includes turning adapters on or off. If turning on the WiFi, Bluetooth or Cellular adapter is needed then use the "setradioenable" command instead:

For Example:  setradioenable <wifi/bt/phone> <1/0>

To disable Bluetooth radio:
 
setradioenable bt 0
 
To enable Bluetooth radio:
 
setradioenable bt 1

Some settings belong to a third category called "general". MobiControl does not yet have support for this setting category as of the current version (11.0.2).  

 

*Please be aware that this will make changes to system files and exercise caution when deploying to groups and devices     

 

Cheers, 

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

  • 0
  • 0
Jürgen Zahn | posted this 14 May 2018

Hi Raymond,

thanks for your answer. I'm looking for a way to read and write my own settings on an Android device.

  • 0
  • 0

Give us your feedback
Give us your feedback
Feedback