Edit .ini via script on Android

ST
Shawn T
Supply Chain Services LLC

Hello,

I have a group of MC33 devices running Nougat. Devices enrolled in Android+.

I need to be able to script the changing of device name (easy enough) then change the value in an .ini file to match. The .ini is accessible via Mobicontrol and permissions are not an issue. With CE devices I could have used writeprofstring or a replacetxt command to accomplish this. When I try either of these I receive a "command not supported" error in the log. There are 800+ devices each with a unique value. 

How do I accomplish this? Unfortunately in the case, Soti support wasn't very helpful.

Would using Android Enterprise as device owner help? If so how?

Thanks,

Shawn 

7 years ago
Android
ANSWERS
RC
Raymond Chan Diamond Contributor
7 years ago

By MC33,  are you referring to Zebra MC33xx devices?

There is probably little you can do using Android+ script commands supported on the device as of now.   However,  if the .ini file is located in a directory that is accessible (i.e. with the required read and write permissions) by the device agent, then the best you can do is probably to use file-sync rule to get the file to your server, and then use Powershell script or other software tool on the server to modify the .ini file, and have this updated ini file sync'ed back to your device.

Within the next few months,  I heard that there will likely be an additional script engine based on javascript and supports loads of new features including calls to customers's own libraries.   By then, it might be possible to do what your need directly on the device with the advanced scripts.

MD
Matt Dermody Diamond Contributor
7 years ago

Out of curiosity, why are you having to also write to the .INI file? Do you have another application that is referencing that .INI file or is there another reason for it? There may be another method to accomplish the same goal depending on your actual use case. 

TB
TJ Bukoski
7 years ago

I can't reveal anything more but this feature will be added in the Android agent in the future. Can't say when though.