Android emulator: specify the number of the mobile device?

Does anyone know if it is possible to set the emulator's mobile phone number? I could not find information about this anywhere. Thanks.

+4
source share
4 answers

Basically full control of the phone number described in detail at the end of this blog:

http://blog.talosintel.com/2013/04/changing-imei-provider-model-and-phone.html

The first 7 are fully customizable, the last 4 can be one of 16 allowed port numbers.

It turns out that the phone number is stored on the SIM card. Since there is no real SIM card, it is emulated. SIM card emulation is hard-coded in binary code of the emulator. The reason for the replacement for 1555521 failed because SIM cards have a specification that does not store MSISDN (digital mobile phone number of cellular subscribers, AKA phone number) in plain text. Instead, each set of numbers is replaced in some sort of reverse chest nightmare.

... Quick Search MSISDN is a search for% d% df% d in binary format (highlighted in red below). The corresponding source code is in external / qemu / telephony / sim_card.c on line 436 in the current repo. The following is part of the format string for this sprintf:

"+CRSM:144,0,ffffffffffffffffffffffffffffffffffff0781515525%d1%d%df%dffffffffffff" 

The interesting part is 515525% d1 (highlighted in blue). Rearranging each two-digit set gives 1555521% d (thanks again to CodePainters). This is similar to the prefix of our mobile number.

Edit it in a hex editor.

+2
source

You can simulate incoming SMS and calls in the simulator (using the simulator port), but that’s all, you can’t set the device number or something like that. For this you need a real device.

+1
source

The emulator’s mobile number is the port number of this emulator. More details. check this link:

http://developer.android.com/guide/developing/devices/emulator.html#calling

-2
source
 TelephonyManager tm = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE); // get IMEI String imei = tm.getDeviceId(); System.out.println("gfvnchgjvbnvhjbbnvgjvbncghvmn ngvm"+imei); // get SimSerialNumber String simSerialNumber = tm.getSimSerialNumber(); System.out.println("854755745588954754855ngvm"+simSerialNumber); //get SimCardNumber String number = tm.getLine1Number(); System.out.println("gfch5652345651szdxfcgvhbjnfcgvh ngvm"+number); And Import :]-> import android.content.Context; import android.telephony.TelephonyManager; 
-2
source

All Articles