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

JAVA:
  1. System.getProperty("phone.imei");
  2. System.getProperty("com.nokia.IMEI");

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

Sony-Ericsson

JAVA:
  1. System.getProperty("com.sonyericsson.imei");

Note ; might not work on all model, YMMV

Motorola

JAVA:
  1. System.getProperty("IMEI");
  2. System.getProperty("com.motorola.IMEI");

Samsung

JAVA:
  1. System.getProperty("com.samsung.imei");

Siemens

JAVA:
  1. 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

12 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?



Leave a Reply