IMEI2 becomes the default IMEI with an eSIM.
Hello,
On our Ivanti Neurons MDM, we use this API to retrieve IMEIs:
getImei() in TelephonyManager is equivalent to:
getImei(getDefaultSim());
So when the only sim is inserted in the second slot:
getImei() is the same as getImei(1) causing duplication in the report.
Ref:
https://android.googlesource.com/platform/frameworks/base/+/b6587ea/telephony/java/android/telephony/TelephonyManager.java#843
The API used to retrieve IMEIs seems to target getImei(getDefaultSim()), which causes problems with eSIMs that use IMEI2.
It therefore retrieves IMEI2 as the default IMEI, which can cause problems with registration consoles such as ZTE, where only IMEI1 is entered.
Is there a way to correct this to avoid IMEI swapping?
Regards.