Thursday, December 22, 2016

How To Calculate an IMEI from a MEID/ESN (Luhn's Algorithm)

This is a short article on how to get an IMEI number from a MEID or ESN, which should be the same. For a lot of people, this can be found within the device. But there will be times when a device will just not show this information.

Why Do I Need This?
As stated above, most of the time an IMEI can be easily found in your device settings. Other times you may even be able to find this printed on the back of a device. However, there will be times that neither provide an IMEI.

As for what it is needed for, most of us would have to give it to a carrier to register our device on a network before we can use the network. There may be other reasons, but this would be the most common.

For Me
I recently had an issue with a brand new LG G5 (US992) device that comes factory unlocked, but is branded for US Cellular. There was nothing on the back, and the settings only showed an MEID and ESN.

Reading through some forum threads, some people stated that popping in a GSM SIM card would allow me to see an IMEI in the settings if the device was on a CDMA network previously. The LG G5 had been on US Cellular for about two days, so maybe this was a simple solution. But after putting in a GSM SIM card, nothing changed...

Luhn's Algorithm
Math. Math is the solution here. If you have either the MEID or ESN, you have the ability to calculate your IMEI.

An MEID or ESN will be 14 digits, while an IMEI will be 15 digits. The IMEI will have the same first 14 digits as an MEID or ESN, with a final 15th digit called a check digit. Luhn's algorithm is a way to obtain that 15th digit. It is a public domain algorithm commonly used today for numerous devices.

The Math
I will give you a simple visual showing of how it is done. We will first write out our MEID:

12345678912345

You will then double every second digit of the MEID:

1 2 3 4 5 6   7 8   9 1 2 3 4 5  
1 4 3 8 5 12 7 16 9 2 2 6 4 10

Add up all the digits as though they were all single numbers:

1  4  3  8  5  12     7 16     9  2  2  6  4  10         
1+4+3+8+5+1+2+7+1+6+9+2+2+6+4+1+0=62

Now add to the summed number until it is divisible by 10 and results in a whole number:

62+8=70
70/10=7

The number that we added to the 62 is our check digit:

8

Our IMEI would then be:

123456789123458

This is just an example, but shows exactly how one would use a real MEID/ESN to calculate the 15th digit (to get the IMEI).

Does It Work?
I have used this during two occasions. The first was for my LG G5, and I was able to validate it through an IMEI checker, which did display the correct LG G5 variant--and was later sold to a customer with that IMEI, and who has not complained since our transaction.

The second occasion was during a job that required activating phones at times. I had an elderly customer who did not have the IMEI but provided the ESN to me. Following the formula above, I calculated his 15th digit and was able to confirm that his device was fully activated. 

16 comments:

  1. More and more people are facing dire living conditions here and over seas. Over one billion people are literally starving to death. The threat of Global Pandemics is as real as it gets.guarantor loans

    ReplyDelete
  2. Very informative article for tech enthusiast.You can follow this blog and learn to calculate IMEI from a MEID.IMEI Check is the top site to check number of your mobile whether android or iphone.

    ReplyDelete
  3. The article you have shared here is very informative and the points you have mentioned are very helpful. Your way of writing and making things clear is very impressive. Thanking you for such an informative article. Professional Energy Expert Canada.

    ReplyDelete
  4. This information is meaningful and magnificent which you have shared here. I am impressed by the details that you have shared in this post and It reveals how nicely you understand this subject. I would like to thanks for sharing this article here. creative digital agency Jakarta.

    ReplyDelete
  5. Great job for publishing such a nice article. Your article isn’t only useful but it is additionally really informative. Thank you because you have been willing to share information with us. Circuit Board Copying.

    ReplyDelete
  6. This information is meaningful and magnificent which you have shared here. Complete rich content and fully informative. Your way of writing and making things clear is very impressive. Thanking you for such an informative article. dewalt dealer in dubai.

    ReplyDelete
  7. Complete rich content and fully informative. Very well written article. It was awesome article to read. . I am impressed by the details that you have shared in this post and It reveals how nicely you understand this subject. Ink Cartridges For Sale.

    ReplyDelete
  8. This information is meaningful and magnificent which you have shared here. The article you have shared here is very informative and the points you have mentioned are very helpful. I would like to thanks for sharing this article here. creative agency jakarta.

    ReplyDelete
  9. Your article is very informative and I liked your way to express your views in this post. I read your post and got it quite informative. I couldn't find any knowledge on this matter prior to. I would like to thanks for sharing this article here. Compensation Plan Consultant in California.

    ReplyDelete
  10. The article you have shared here is very informative and the points you have mentioned are very helpful. Complete rich content and fully informative. I really appreciate your work which you have shared here. Thank you so much. Call Center Consulting Broward.

    ReplyDelete
  11. I am impressed by the details that you have shared in this post and It reveals how nicely you understand this subject. I would like to thanks for sharing this article here. Very well written article. It was awesome article to read. Complete rich content and fully informative. I would like to thanks for sharing this article here. Printer Cartridges Miami.

    ReplyDelete
  12. I read this article; it is really informative one. Your way of writing and making things clear is very impressive. Very well written article. It was awesome article to read. Complete rich content and fully informative. Thank you so much. Snapdragon 720G Phones.

    ReplyDelete
  13. I am really impressed by the way you detailed everything. It’s very informative and you are obviously very knowledgeable in this field. Very well written article. It was awesome article to read. Thanks for sharing such an amazing post here. Copy PCB Board.

    ReplyDelete
  14. You are sharing a piece of nice information, it helped me. Keep it up and in the future sharing more articles like this. I am amazed by the way you have explained things in this article. Thanks for this message. Graphic Designing Services.

    ReplyDelete
  15. I’m genuinely impressed with your knowledge. You have great knowledge of this. It was a really attractive blog. Please keep sharing your post with us. bay area compensation consulting company

    ReplyDelete