I have created a virtual machine using Virtual Box that is running android X86. I obtained the .iso image from here http://www.android-x86.org/releases/releasenote-8-1-rc2 I have tried to run my apk and NullPointerException occurs every time when I'm attempting to get the IMEI from the TelephyManger. Here is my code:
final TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
String imei = "" + tm.getDeviceId();
In the native settings screen I noticed that the serial number is not available (see screen-shot below)
Does anyone know how to get the IMEI in android X86?
Based on @TheWanderer answer the telephony.getDeviceId() is expected to return null.