How to get Phone IMEI number with J2ME / JavaME

October 12th, 2007 Posted in J2ME / JavaME, Motorola, Nokia, Samsung, Sony Ericsson

 

International Mobile Equipment Identity (IMEI) is used to identify valid devices connected to GSM and UMTS network. This number can be accessed from a mobile phone by dialing *#06# on the keypad. IMEI is commonly use by software developers as part of software protection scheme to prevent it from being pirated.

JavaME developers however suffers from a drawback because MIDP/CLDC specification does not include an API to obtain IMEI from mobile devices. However there are few phone manufacturers included this functionality through System.getPropery() calls.

Here’s how to get IMEI number from mobile devices of different manufacturers
Nokia

System.getProperty("phone.imei");
System.getProperty("com.nokia.IMEI");

Note ; Requires signed midlet. S60 3rd edition device does not requires signing for this to work.

Sony-Ericsson

System.getProperty("com.sonyericsson.imei");

Note ; might not work on all model, YMMV

Motorola

System.getProperty("IMEI");
System.getProperty("com.motorola.IMEI");

Samsung

System.getProperty("com.samsung.imei");

Siemens

System.getProperty("com.siemens.imei");

Hopefully this information can aid you in your J2ME programming projects.

Quick Tip :
It’s quite hard to determine the phone model/manufacturer well ahead beforehand. For a more robust solution, I suggest that you combine the above call with System.getProperty(“microedition.platform”).

[tags]j2me,javame,mobile,opensource,imei,nokia,sony ericsson,samsung,motorola[/tags]

 

Random Posts


30 Responses to “How to get Phone IMEI number with J2ME / JavaME”

  1. Sebastian Says:

    Hi I just tried to retrieve the IMEI number on my nokia N80 using the code above, but it didn’t work. Is it necessary to sign the jar file before installing on the device ? If so how is it possible to sign jar files ?

    Thank you.

    Sebastian



  2. Carlos Montenegro Says:

    Hi, thanks very much for this information. I has just any more question: Is there any way (I think yes, but not sure) to get the phone manufacturer name?



  3. Cara Says:

    The property for Samsung devices does not work. Have you tried on a real device? If you did and it worked, what device was it?



  4. musthafa Says:

    blog is very useful. thanks a lot. expecting more.. dont u mind i would like to know about designing a desktop like look (icons arranged in grids)this is not in canvas…



  5. Kasun Says:

    Thank you very much.This blog is very useful.
    Plz carry on this task further



  6. hanane Says:

    thank’s for this information.

    can any one help me in developping an applet for IMEI traking?
    Best regards



  7. FiruzzZ Says:

    DOESN’T WORK

    System.out.println(“IMEI”+System.getProperty(“IMEI”));

    System.out.println(“IMEI”+System.getProperty(“phone.imei”));
    System.out.println(“IMEI”+System.getProperty(“com.nokia.IMEI”));

    System.out.println(“IMEI”+System.getProperty(“com.sonyericsson.imei”));

    System.out.println(“IMEI”+System.getProperty(“IMEI”));
    System.out.println(“IMEI”+System.getProperty(“com.motorola.IMEI”));

    System.out.println(“IMEI”+System.getProperty(“com.samsung.imei”));

    System.out.println(“IMEI”+System.getProperty(“com.siemens.imei”));



  8. pankaj Says:

    much needed info would be found on this site



  9. conbo Says:

    much needed info would be found on this site –> Where can we find these information?



  10. sowmiya Says:

    Nice article. I normally use the *#06# to find the imei number, & i used these procedure to unlock my mobile from http://www.mobile-unlocker.com/ but here to find the imei using java codes is very useful. Thanks for this information.



  11. imei number Says:

    Well, it has been made manadatory by many govts thaat every mobile phone must have a valid imei number to be operantional and to be active.



  12. N97 mit Vertrag Says:

    Absolutely cool blog. Keep on the good work, I will subscribe. What do you think of the new Nokia N97?



  13. Jarno Saarinen Says:

    Can someone verify that these really work? I have tried these with sghi450(samsung s60), N95(s60) and 6300(s40) phones and all I get is null. why?



  14. Lea Hayes Says:

    I am still experimenting with this, but on my Nokia 6220 Classic I have to use the following:

    System.getProperty(“com.nokia.mid.imei”)

    Perhaps this is of help to others?



  15. Finlay Richardson Says:

    The Nokia N97 is one of the best phones that i have ever owned. It is classy but feature packed. “



  16. cf-sami Says:


  17. David Harris Says:

    I am always on the lookout for new models of Nokia phone and also iPhone.;*.



  18. Claire Richardson Says:

    i am always on the lookout for new mobile devices. i am sort of a gadget addict.~`,



  19. Luca Richards Says:

    Nokia always makes the coolest mobile phone.-;-



  20. mehdi Says:

    I want to get IMEI number of Nokia N82 set using j2me.

    System.getProperty(“com.nokia.mid.IMEI”)
    System.getProperty(“phone.imei”)
    System.getProperty(“com.nokia.IMEI”)

    I have used these methods to get IMEi Number of Nokia Sets. But it retuns null. Is there any other way to get the IMEI number of the phone.



  21. Natalie White Says:

    mobile devices will feature more and more useful features in the next following years”`”



  22. Jayden Thomas Says:

    i often use my mobile phone compared to my netbooks,”;



  23. Polypropylene : Says:

    we would definitely see some new mobile devices this year and of course in the first quarter of 2011*,`



  24. Male Reproductive System : Says:

    mobile phones are getting cheaper and cheaper, i just hope that they add more features into it`-’



  25. Concrete Molds · Says:

    even though the Nokia N97 is an out dated model, it is still one of the best phones in the market .



  26. Ajucelves vs PS Says:

    Yes, we tried the following code

    System.getProperty(”com.nokia.mid.imei”)
    on a Nokia 5230 and it worked correctly.



  27. Car Equalizers %0B Says:

    mobile devices are always great because they always come in a handy package .’:



  28. Martina Dotson Says:

    Yes, we tried the following code System.getProperty(”com.nokia.mid.imei”) on a Nokia 5230 and it worked correctly.



  29. m[]l3ayu Says:

    I don’t get this in my Nokia 6303 classic



  30. Gayan Says:

    dear frends,

    can anyone plz help me iam developing bluetooth enabled j2me project for my reseacrch purpose in univercity.so i need to good authentication to combination with trusted user with server.so u send me the sample code to j2me(mobile application) and server application is C# need to exchange good key management(like Diffie Hellman algorithm).so if u r fammilier with these kind of project plz help me.iam stuck in key exchange to get the authentication purpose.plz help me.



Leave a Reply

This blog is protected by dr Dave\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'s Spam Karma 2: 174432 Spams eaten and counting...