Android 11, IMEI and SN etcetera

T
Theun
Mobicoach BV (MSP Account)

Hello,

As most of you will know, devices running on Android 11 or higher are protecting sensitive information like the IMEI and serial number from external applications. MobiControl however seems perfectly able to show such information, even on a consumer Samsung device.

We provide an application for truck drivers, to be able to show them where to go and what to do and so forth. Our application is not able to show the IMEI or serial number of the device it is working on, starting from Android 11. Even though we are managing that very same device in MobiControl.

If a truck driver runs into issues with his device, he calls us. In prior Android versions we used to be able to check which device he is using in our own software but starting from Android 11, we can't. We now have to ask them which device they're using, before being able to help them using MobiControl.

Is there a way for MobiControl to give our own application permission to check IMEI or SN? Or the other way around, is there a way for our own application to ask MobiControl for the IMEI, SN or the MobiControl device name for instance?

Kind regards,
Theun Schellekens

p.s. These devices are all fully managed, only used in kiosk mode and for work applications.

3 years ago
Android
ANSWERS
EG
Edgar Gomez
3 years ago

Hello

You could use a Javascript script like the following to create a file with the IMEI data, then have your app read this file:

var imei = mobicontrol.cellular.imei;
var file = new mobicontrol.io.File('/sdcard/Documents/imei.txt');
file.writeText(imei);

Due to scoped storage restrictions in Android 11, the file should be created in a folder like Documents, where both Mobicontrol and your app have access

Hope this helps.

MD
Matt Dermody Diamond Contributor
3 years ago

Your app is not going to be able to achieve the same permission level as the Device Owner or other system apps with elevate permission status over device identifiers. The SOTI agent as the DO does have visibility to these values as you have seen, and the method that Edgar has outlined is a rather simple way of passing that info from SOTI to your app, assuming your app has external shared storage permissions granted through, which is a challenge in and of itself in A11.

Some OEMs are also providing mechanisms to query a system app for this info through an content provider interface. Zebra, for example, has a service called OEMInfo that you can request this information from if your app is running on Zebra devices: 

https://developer.zebra.com/blog/access-serial-number-and-imei-mobile-computers-running-android-10-and-higher

T
Theun
3 years ago

Thank you Matt for your answer, we already reached out to Zebra as well and they gave the same possible solution. Thing is, we're hardware independent and use a variety of Android devices (following the customers wishes) so we're trying to find a more universal solution. Still, half our fleet is equipped with Zebra devices so this'll still help a lot.

RS
Rafael Schäfer
3 years ago

When we were using Kiosk mode on our devices for the staff, we displayed the device name at the top of the kiosk screen, so the user can just tell you the device name which should be unique (or i bet you could even just let Mobicontrol insert the IMEI (%IMEI%) via macro there too).

Would this some kind of working solution for you instead of generating additional files etc.?

Then following will be needed in the template:

<div id="Header">
        <div class=""></div>
        <span class="Title">%MCDEVICENAME%</span>
</div>

T
Theun
3 years ago

Thank you for answering. We already applied this and are using either the serial number or the MobiControl device name. It still proves to be quite difficult for people to find it (please press home button..), drivers often tell us their vehicle number or license plate. With multiple calls a day, having to wait for them to find their serial number or device name takes more time than we'd like. If we can find a better solution for us to quickly see which device they're using,  our support can be improved.

G
GKMOD@SOTI
3 years ago

Hello Theun,

We could only found the macro alternative option so far. If you need further information, could you please raise a SOTI case.

G
GKMOD@SOTI
3 years ago

About macros, please refer below help.

https://www.soti.net/mc/help/v15.4/en/console/other/macros.html?hl=macro