https://github.com/mohsenoid/SOTI-IMEI
An Android app that receives IMEI on a SOTI managed device from MobiControl agent
https://github.com/mohsenoid/SOTI-IMEI
Last synced: about 2 months ago
JSON representation
An Android app that receives IMEI on a SOTI managed device from MobiControl agent
- Host: GitHub
- URL: https://github.com/mohsenoid/SOTI-IMEI
- Owner: mohsenoid
- License: apache-2.0
- Created: 2021-07-01T09:13:54.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-07-01T10:09:07.000Z (almost 4 years ago)
- Last Synced: 2024-08-01T19:55:54.399Z (10 months ago)
- Language: Kotlin
- Size: 144 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
- awesome-list - mohsenoid/SOTI-IMEI - An Android app that receives IMEI on a SOTI managed device from MobiControl agent (Kotlin)
README
# SOTI-IMEI
An Android app that on a SOTI managed device receives IMEI from MobiControl agent.
## Why?
As almost all Android developers know, [since Android 10](https://developer.android.com/training/articles/user-data-ids) the apps cannot have any unique identifier to distinguish a specific device for the sake of user privacy which is fine from the user perspective but if you are developing for a company that has enterprise-managed devices and like to know which device is talking with the backend to white list them then it makes sense to have something like IMEI as a unique ID.
The good news is if you are using the [SOTI MobiControl device manager solution]((https://soti.net/solutions/enterprise-mobility-management)), there is a solution to ask their Agent that has access to Android Enterprise APIs to pass you the Device IMEI value!## How does it works?
This app has a simple [IMEI Broadcast receiver](app/src/main/java/com/mohsenoid/android/soti/imei/ImeiReceiver.kt) which receives a message from SOTI MobiControl Agent and stores it.## How to test?
Using ADB you can send this broadcast message intent to test how app works:`adb shell am broadcast -a com.mohsenoid.android.soti.imei.ACTION --es imei "IMEI\ from\ ADB" -n com.mohsenoid.android.soti.imei/.ImeiReceiver`
## SOTI MobiControl Script
Using the [`sendintent` command in SOTI scripts](https://www.soti.net/mc/help/v14.0/en/scriptcmds/reference/sendintent.html) the IMEI Broadcast receiver receives the IMEI value from the [`%IMEI%` macro](https://www.soti.net/mc/help/v14.0/en/console/other/macros.html):`sendintent -b "intent:#Intent;action=com.mohsenoid.android.soti.imei.ACTION;S.imei=%IMEI%;component=com.mohsenoid.android.soti.imei/.ImeiReceiver;end;"`