3

I want to change the IMEI of an android virtual device that is running on android studio's emulator. It seems that google provides all virtual devices with the same IMEI (358240051111110), so apps that identify users by IMEI have trouble running on virtual devices.

I tried to hex edit the binary of the emulator but had no luck as I couldn't find the hex for the IMEI. I also tried searching on Android Code Search for IMEI for the 358240051111110 itself in hex and decimal so that maybe I could change the value and rebuild.

Most question I found asking this were old and outdated and no longer work on newer apis (API 26/android 8.0 and above).

It seems adb doesn't have the ability to set or change the IMEI. fastboot however seems to have an option to change it using:

fastboot oem writeimei 123456789012347

However you can't seem to boot into fastboot as Android Emulator does not support recovery mode, just normal boot mode.

There are emulators like MEmu that have changing IMEI as a feature but I prefer to use Android Emulator as I couldn't find an alternative that has the change IMEI feature along with all the Android Emulator features.

EDIT:

I also tried to run SuperSU on a android 7.1.1 by following this tutorial and this StackOverFlow Answer, I did the exact same instructions but still couldn't get SuperSU to work so that I could maybe use an app to change the IMEI (it would always just brick the emulator on the android loading screen).

Nidal Barada
  • 373
  • 2
  • 14
  • 2
    You shouldn't be identifying based on IMEI anyway- not all devices will have one. In particular wifi tablets won't. – Gabe Sechan Feb 08 '21 at 22:00
  • You should be using GUID instead of IMEI, apart from the reason @GabeSechan mentioned, you won't be able to retrieve IMEI from Android 10 or above OS versions. refer [unique-indentifiers](https://developer.android.com/training/articles/user-data-ids) – neilharia7 Feb 17 '21 at 16:37
  • Try this solution if you still want to change IMEI for emulator https://www.getdroidtips.com/change-imei-android-id-bluestacks-4/ – Abdelrahman Farag Feb 17 '21 at 21:49

0 Answers0