Is IMSI number unique for each phone - android

Is IMSI number unique for each phone ?
I want to know the answer with respect to Android.
Please help.

Wikipdia:
An International Mobile Subscriber Identity or IMSI (play /ˈɪmziː/) is a unique identification associated with all GSM and UMTS network mobile phone users.
Not all android devices are on GSM or UMTS. So I would guess that the ones that don't use those networks aren't going to have any value at all for IMSI. But I would be really really carful relying on something like that to be unique. I've found that different manufacturers/carriers sometimes put the same # as the value on every device for some of the supposedly unique IDs. Which will cause you major headaches if it turns out that there are thousands of devices out there using the same ID.
That being said, I have no experience working specifically with IMSI so this is just my guess.
Edit: there is no one end all be all "correct" value to use as unique ID as far as I am aware. Here are some links that can give you some ideas though:
Is Secure.ANDROID_ID unique for each device?
Is there a unique Android device ID?
If possible I think you are better off generating your own UUID and storing it yourself. But this of course means that it won't persist through uninstallation of your application (or through SDcard wipe if you choose to store it there)

IMSI is the subscriber identifier and is associated with the SIM, not the phone. If you move the SIM from one phone to another you are moving the IMSI also, so no, it is not unique per phone if this was what you were looking for.
There is an identifier associated with the phone itself - it's the IMEI (International Mobile Equipment Identity). This should be unique per phone - one key use is by operators to detect stolen handsets.
See: http://en.wikipedia.org/wiki/International_Mobile_Equipment_Identity

Related

How is Serial number (unique) is set on an android devices?

In Android devices how is the unique Serial number is assigned to each device? Most of the Samsung devices have a unique serial number on each device. When is this serial number is inserted? Is this serial number assigned before firmware installation or after installing the firmware? Or it has some mechanisim/ algorithm to assign the serial number during firmware is installed.
I want to burn firmware to devices but need some algorithm which helps me to assign the unique serial number to each device and it will remain same even if the firmware is burned multiple times.
There are several options to identify a unique serial number in a android device. One of them being IMEI and another most commonly used is MAC. But from Android M version google has restrictions on people using MAC for unique identity and moreover you will need to have WIFI to be ON to read the MAC.
And also it is not advisable to use MAC/IMEI for secure reasons.
One other possible solution is to generate a unique global identifier in your code.
String uniqueID = UUID.randomUUID().toString.
At the highest level, a globally unique identifier will never have a collision - even on other devices/apps.
Source : https://developer.android.com/training/articles/user-data-ids.html#working_with_instance_ids_&_guids.
You can also try using android serial number which is unique number generated on first ever boot. But, please note that the serial number changes on Factory data reset.
For detailed insight into unique identifier please also look into android device id confusion
Hope I have answered your query.
The unique number is called IMEI. It is a unique number inserted in phone by the manufacturers. Every phone on earth has a different IMEI. Though with rooting your phone you can spoof it.
Hope this helps.

Android Telephony - dual SIM versus single SIM with multiple IMSI

Mobile handsets can have dual SIMs, where each SIM (usually) has a single IMSI. However it is possible for a SIM card to have dual IMSI as well, and in fact IMSI that can be "configured on it" on-the-fly by operator. The latter mechanism is used for roaming scenarios, such as for business customers, where one (fixed) IMSI will be used by your home-country operator's phone number, and the other (flexible) IMSI that could be configured to visited-country operator's phone number (with whom your operator has a specific roaming arrangement). This way people can call you on either number, and you do not have to swap SIMs. Note that this was possible even before dual-SIM phones became relatively common.
For multi-SIM, I found some answers such as this one where one answer suggests using MultiSIM API (from 3rd party), and another answer suggests using the official supported API available since Android 5.1 (API level >22) or the unsupported TelephonyManager way from this answer (which I presume works for older API levels as well). However, it is not evident if those API's work for single SIM multi IMSI as well.
Unfortunately, I am yet to lay my hands on dual-IMSI SIM card to try this out. While I am trying to procure one, can anyone who has tried confirm or share findings ?
I'm not exactly sure what the question is, however a single SIM will only ever have one active imsi. Yes SIM cards can can multiple imsi's and an operator can update the imsi. However a SIM will only have ONE active IMSI.
A SIM can only have one active IMSI due to the SIM specification which says a IMSI must be stored in file ID:
3F00 (MF) -> 7F20 -> (DF_GSM) -> 6F07 (EF_IMSI).
A device (phone/modem) will request the IMSI from this file and only this file. if they were two "active" IMSI's no device currently would know where to find that IMSI without a firmware change.

Do all Devices have a IMEI number? If so, Can another Device Have the same one?

I have three questions on what and how the IMEI can be used. My current knowledge is the IMEI is the devices "Social Security Number", Source Here, so:
Can another phone/device have the same IMEI?
If not, can I have my app use the IMEI to recognize that the device it is on is the exact same device it was used on before?
If this one is also a yes how could I get the Android SDK to pull the IMEI for device validation. (I'm looking for something like ANDROID_PULL_IMEI then Android_VALIDATECHECK_KEY or similar)
CDMA devices have a MEID instead of an IMEI. This answer describes how to obtain them programmatically.
This is not foolproof. I've encountered cheap Chinese devices where TelephonyManager#getDeviceId() returns null or some obviously bogus string like "0123456789ABCDEF".

Fetching Android MSISDN value

I have a query. Can someone please guide me how to get my MOBILE MSISDN Number. Is there any sample application for fetching/ displaying the MSISDN number. I need to get the MSISDN number. Any sample project will be of great help.
Thanks in advance.
It has been covered in some topics, namely: Programmatically obtain the phone number of the Android phone .
However, bear in mind that this doesn't always work. With a couple of portuguese SIM cards at least, I wasn't able to retrieve the phone number using these methods.
Quoting from #Johan's answer in that topic:
There is no guaranteed solution to this problem because the phone
number is not physically stored on all SIM-cards, or broadcasted from
the network to the phone. This is especially true in some countries
which requires physical address verification, with number assignment
only happening afterwards. Phone number assignment happens on the
network - and can be changed without changing the SIM card or device
(e.g. this is how porting is supported).
I know it is pain, but most likely the best solution is just to ask
the user to enter his/her phone number once and store it.

Getting the TMSI from the SIM card

Is it possible, in Android or any other mobile OS, to access the encrypted information passed from the SIM card to the cellular network? I mean the mobile signature, or the TMSI number. I need this data after it is encripted by the sim. I mean the IMSI after it is encrypted by the SIM to be sent to the network.
Thanks :)
Impossible. Android so far does not provide any direct API's and/or other interfaces to SIM card, except for some basic information like country code, operator name, etc, which is kindly provided by TelephonyManager.
Additionally, SIM interface normally is connected to modem CPU, not application one, thus eliminating any possible hacks/workarounds.
As I know SIM doesn't encrypt the IMSI information,that's the one reason to use TMSI.
Exactly, SIM doesn't do that. Its all done using Hardware of phone. And TMSI don't have anything to do with phone. It is used in radio interfaces just to secure user information and confidentiality. Phone will be always identified by IMSI not TMSI.
Basically they uses some key values. And those keys do the twist. Algorithm A5 and A8 are used for key purpose.
Pankaj Singh

Categories

Resources