Android app configurations and sending custom data, hardware serial number & MAC address to Android?

This is with respect to this article for another MDM: https://www.ws1inhawaii.com/2023/02/delivering-managed-configurations.html

Would like to know whether SOTI could do something similar for Android device deployments, to send over the Android device's hardware serial #s, hardware MAC address, and any custom data set from SOTI via an app configuration that an Android app would use that we can deploy with to the device. Data that is not normally exposed by Android API to Android Apps, to which we could supplement by having MDM provided that data to the app via the app configs.

Given that SOTI supports run intents like Workspace One, I assume this type of feature might also be supported? If yes, where can I find reference material for how to do the same type of thing as that blog post but for SOTI? I assume most of the steps are the same. What would vary is the config steps to do on the SOTI side.

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

Soti MobiControl can pass value for defined keys for managed configuration parameter implemented in any AppConfig COMPLIANT app, whether it is based on the your mentioned article or any other similar online documents about AppConfig.  Just set the required value(s) in the "Managed App Conifg" tab of the app in it associated "App Policy" in the web-console.   

For serial numbers and hardware MAC address, just use Mobicontrol standard macros %SERIALNUM% and  %MAC%  respectively in the value field.   If I remember correctly,  custom attributes were not supported about 18 months ago.  I have no idea if such support has been added or not in the latest releases.

RS
Rafael Schäfer
2 years ago

Hi, 

I can just add you can use Custom attributes %CustomAttr:NAME% in managed app config. We are just testing this with success (on Mobicontrol 15.6).

MD
Matt Dermody
2 years ago

Another mechanism that might possibly work is to use the JS based scripting to save these properties to a file in shared storage somewhere on the device and to then have your app read in the values from that configuration file. This is an obviously less secure method than leveraging Managed Configurations but it might technically work.

DL
David Luu
5 days ago

Hi,

We (well, my colleagues) finally attempted to make use of it 2 years later, but it seems the %MAC% injection isn't working. Did we miss something? The deployment acts as if nothing was passed in. This was for enterprise fully managed Android device enrolled in SOTI and not a BYOD Android work profile case. We tested using the Managed App Config to define parameters to be passed as well as passing via RunIntent post-install script command. We're using SOTI mobicontrol dashboard version: 2025.0.0.1032.

My colleague tells me, if we hardcode a value for the MAC variable we've defined instead of using %MAC%, the value gets passed in, but using %MAC% we get nothing.

Attaching screenshots for reference. On a related note, we tested the equivalent feature on AirWatch / Workspace ONE, and we were able to get the MAC passed using their injection macro. We're trying to confirm same functionality with SOTI.

For RunIntent, our command looks something like:

sendintent -a "intent:#Intent;action=android.intent.action.MAIN;component=com.our.package/.MainActivity;S.SOME_PARAM1=some_value;S.MOBILE_CLIENT_MAC=%MAC%;end;"

Managed App Config for client MAC address

PostInstall RunIntent for client MAC address

ZC
Zafer Cigdem
2 years ago

Hi,

I did use either Custom Attribute or Custom Data earlier. As Rafael said,

Custom attributes %CustomAttr:NAME% would be an option or similarly Custom data version as below:

Custom Data: %MCCustomData:CustomdataName%

You can use Android JS APIs to send out some data to the devices here is the source: Namespace: device | Android Agent JavaScript (soti.net)

If you may need any help on the Android APIs, feel free to let us know. I hope it helps.

Thank you

S
SMMOD@SOTI
2 years ago

Hi David,

I hope the suggestions provided by Raymond, Zafer, Rafael, and Matt have helped you answer your query. Please inform us if you require further assistance. 

Additionally, if any response has helped to address your inquiry, we kindly request you to mark it as "is solution" so that others may also benefit from this information.

Thank you Raymond, Zafer, Rafael, and Matt for your valuable suggestions.

Thank you for choosing SOTI.

DL
David Luu
5 days ago

Hi,

My apologies for not following up since initial post. I have updated findings and just posted a reply. The responses to my original post have been helpful, and makes sense in theory. At the moment, attempting to follow one of the suggestions however does not seem to work for some reason.