permissions for third party apps to read the IMEI on Android 10

D
Daniel
KOMSA Kommunikation Sachsen AG

Hi there,

we've got a problem with a customer app and Android 10. Our Customer is using the IMEI of the device, to validate the usage of the app. With Android 9, the customer app had no problem requesting the IMEI directly from the device. Now with Android 10, there are some changes and the app don't got the needed permissions (link). The app needs the READ_PRIVILEGED_PHONE_STATE permission or have to be the device owner. As far as I know, I've got no possibility to set these permissions for this app through SOTI - or do I? 

Is there somebody who's familiar with this problem and got any workaround? Maybe requesting the IMEI from the MobiControl Agent? I'm not a developer so I could really need some help with this.

MobiControl: v15.1

Agent: 14.2.0.1069

Device: Samsung Galaxy A40 EE (Android 10)

Management Method: Android Enterprise, Fully Managed / Lockdown

-> we are using Knox Configure and Knox Mobile Enrollment 

Thank you,

Daniel

Edited 5 years ago
Android
ANSWERS
RC
Raymond Chan Diamond Contributor
5 years ago (edited 5 years ago)

My governmental customer in Hong Kong reported the same problem for an existing app that was OK when running on Android 9 or earlier.

I just did some tests with the latest AE device agent (v14.2.0.1069), but could not grant the required permission for an affected app.  So, granting permission doesn't seem to be a solution, at least not until a newer AE device agent with such support is released. 

However, as MobiControl device agent itself can read IMEI on Android 10, I've advised my customer to consider adding new codes in their app to get the IMEI number from the device agent via Android's "intent", which can be initiated using MobiControl script. 

D
Daniel
5 years ago

Hi Raymond, thanks for your speedy reply! 

Thats's what I've also thought about. Do you have any feedback from your customer, if he was able to get this workaround going? And which scripts/intents he used? 

RC
Raymond Chan Diamond Contributor
5 years ago (edited 5 years ago)

The problem was reported to us two days ago.  I don't even know if my suggested workaround has reached the app developers yet.

The MobiControl script command to use is always "sendintent", and I have just tested that this command works fine with the v14.2.0 AE device agent on Android 10 devices.   As for the intent itself, it should be a custom intent defined by the app developer himself/herself.  Once the name, type, number of arguments, data-type of each argument to pass, etc. of the custom intent have all been decided and implemented in the app,  just use the "sendintent" script command with the right arguments to initiate the intent.  The IMEI of the device can be included in script commands using the standard %IMEI% macro (though there might be some issue to solve for the script command parser to handle sendintent command argument enclosed between double quotes).   The  remaining issues are to decide when, how often, or choosing which MobiControl mechanism to initiate running of the script.

J
JVMOD@SOTI
4 years ago

Hello Daniel,


Following up on this thread, were you able to resolve the issue? If yes, I would like to know what were the steps taken to resolve the issue and I can mark that as a Solution.

OR

if @Raymond's post has helped you in solving your inquiry, I would request you to mark the particular comment as "is solution", so others may benefit from this information.


Regards,

RC
Raymond Chan Diamond Contributor
4 years ago

Hi Daniel,

My customer updated me that they successfully used the sendintent script command to send device IMEI to their proprietary app.

D
Daniel
4 years ago

Hi Raymond, 
our customer used another solution to this problem.. in the process of staging the devices for our customer, we insert the IMEI into their app. The App creates a file with the IMEI in it and saves it in the device storage. So the app can look into the file and read the IMEI from there. 
In the package for deploying the app, we give their app the permission to read and write in the external storage. We knew this solution from another customer and adopted it. I knew, it's not automated but works fine for us as the sendintent-solution is something really knew and I have to learn more about this before implementing.

Thanks for your help! 

RC
Raymond Chan Diamond Contributor
4 years ago (edited 4 years ago)

Hi Daniel,

I had also advised my customer to save the time-invariant IMEI received via intent to an proprietary encrypted internal file for subsequent use (especially when the device is offline).  So, in principle,  the app only  need to get the IMEI data from intent once after the app is deployed/installed, and the app can operate properly even if the device is offline.  Any tempering of the encrypted internal file can be easily detected by the app to avoid inaccurate IMEI being read and used for functions such as authentication, app licensing, etc. 

Also, to improve the security of the intent mechanism, my customer had been advised to

1. proprietary shuffle or format the IMEI when passed as parameter of the intent, so that no other unathorized app/sevice can easily read the data (especially if the intent used is a broadcast intent)  

2. verify the bundle-ID or activity name of the initiator of the intent, which should be the MobiControl device agent.

I hope the above can give you some more insights if you decide to use the intent approach in the future.

D
Daniel
4 years ago

Thanks for your explanation Raymond, I will keep this in mind next time I talk with my customer :) 

C
Chris
4 years ago

Hi,

is there an documentation available for the supported intents?