App query custom data from MC Agent

App query custom data from MC Agent

We have to integrate some Android 10 and 11 solutions to our environment.

There are some solutions which parameters we would like to set by MC console.

Some of this parameter demand information that is available by MACROS as %IMEI% or by custom data.

I could not find a way to create a .ini file or .xml file in the device that could receive such values, but we may see the information reaches the device, because in the lock down menu it shows as passed.


Is there a way to an app request to MC agent a custom attribute or values such IMEI ?

Is there a way, by script ou rule, to write a file, which content includes the IMEI and Custom:Data?


Up to now, my solution has been to create a filesync rule and, by its post sync script,  rename it to the

(%IMEI% could be any macro I want to share, including custom attributes or custom data)

The application in the device searchs for the .xxx file and by checking its name finds what would be the content.

Other way was to pass it by send intent command, but I could not find how to do it in the lockdown launchers.


If there were a way to the app inquire directly to the MC agent, it would be better.



2 Answers

Order By:   Standard | Newest | Votes
Matt Dermody | posted this 23 June 2021

Access to device identifiers has been increasingly restricted over time with pretty harsh restrictions hitting in A10 and above. The EMM Device Owner and system apps have the ability to query this information but other custom apps do not have this access. The official recommendation from Google is to use a self-generated GUID in the application rather than relying on properties like the IMEI. 



Some manufacturers like Zebra are providing programatic access to the underlying device identifiers via a custom content provider, specific to Zebra devices. If you are using Zebra devices this could be your path forward. I do not otherwise believe there are any options to query this information from the SOTI agent with a custom app. Using a file based handoff of this information is likely not viable either as there are scoped storage constraints in Android 11 and so your app would likely struggle to access a file containing an IMEI value even if the SOTI agent were to be able to save it somewhere. 



 Source: Darryn Campbell - Zebra



These recent Javascripting options could be the ticket to your solution however. In theory you could use the Agent to query the IMEI and then save that to a file in the scoped storage directory for your app. 


  • 0
  • 0
Joao Nelson Cavezale de la Torre | posted this 24 June 2021

Thanks Matt.

%IMEI% is just an example.

There are several CustomData we have set in the console, that we are able to show in the lockdown screen of the device (meaning the device has received it).

What we would like to do is to share such information, that we may see in the lockdown screen,  to an app in the device.

I have not found yet any javascript examples. Is there any that aids how  to grab such kind of data. Do you known where to download some basics as a simple console.write or even toststr to check this custom data?

In soti reference page ( we may see how to get a bunch of info from device, but no reference to the custom data or custom attributes.

  • 1
  • 0

Give us your feedback
Give us your feedback