Exciting things are coming - our community is moving to a new home!
Whilst we make this move, please note any posts/replies made between 21st February - 5th March 2026 will not be carried across. Learn more here.

Forum Discussion

kEvaR's avatar
kEvaR
Level 1.6: Donut
2 months ago

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.

8 Replies

  • Moombas's avatar
    Moombas
    Level 4.4: KitKat
    2 months ago

    Maybe this is default behavior by Android (and in my opinion an issue) as we see the same when the device has an IMEI, it's not recognized as an eSIM by the MDM but as a normal SIM with the IMEI2.

     

    For me it looks like an Android internal issue.

    • Moombas's avatar
      Moombas
      Level 4.4: KitKat
      2 months ago

      Need to correct my first paragraph:

      Maybe this is default behavior by Android (and in my opinion an issue) as we see the same when the device has an eSIM, it's not recognized as an eSIM by the MDM but as a normal SIM with the IMEI2.

      • Michel's avatar
        Michel
        Level 4.0: Ice Cream Sandwich
        2 months ago

        I believe you are correct. From a device perspective, eSIM is considered second sim when you have physical sim tray as well. 

  • Rafa's avatar
    Rafa
    Google Community Manager
    2 months ago

    Hi kEvaR​, I’ve shared your question with our internal team for guidance. Please note that it may take a few days to hear back. 

  • kEvaR's avatar
    kEvaR
    Level 1.6: Donut
    5 days ago

    Hello, do you have any updates on this?

    • Emilie_B's avatar
      Emilie_B
      Google Community Manager
      5 days ago

      Hello kEvaR​ - I hope you're well.

       

      Unfortunately, I haven't heard back from the team yet - I'll chase this with them now :)

  • Alex_Muc's avatar
    Alex_Muc
    Level 3.0: Honeycomb
    4 days ago

    We have been experiencing such problems with IMEI1/IMEI2 for several years with WorkspaceOne. Unfortunately, only the default SIM (and IMEI) is beeing reported there. A SIM is set as the default if it is the only card in the device or if it is the default card for calls.
    With multi-SIM devices (regardless of SIM+SIM, SIM+eSIM, eSIM+eSIM), each radio interface has its own IMEI. Before eSIMs, this was already a problem when someone inserted the SIM into SIM2.

    With WorkspaceOne UEM 26.02, reporting for multiple SIM slots is finally coming. Unfortunately, I don't know what APIs they use in the background.

    In theory, the UEM should report all IMEIs, regardless of whether the radio interfaces are used or not. If there is an enrollment restriction, the UEM should check whether the IMEI appears in any radio interface of the device.

    • Emilie_B's avatar
      Emilie_B
      Google Community Manager
      3 days ago

      Thank you for sharing this Alex_Muc​ 🤩