1

I am trying to get serial number of my Lenovo Tab in android. I tried

Method get = c.getMethod("get", String.class, String.class);
serialnum = (String) (get.invoke(c, "ro.serialno", "unknown"));

serial = Build.SERIAL;

ro.serialno and Build.SERIAL is giving a value as 0123456789ABCDEF, but the serial in status-> about Tablet is HLB04JSJ and the printed serial number in the back side of the tab is also HLB04JSJ.

Any suggestions, Thanks in advance.

2 Answers2

0

Have you tried doing the following?

TelephonyManager tManager = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
String serial= tManager.getDeviceId();

Also include the following permission in your Manifest

<uses-permission android:name="android.permission.READ_PHONE_STATE" />
Bidhan
  • 10,607
  • 3
  • 39
  • 50
0

please try this:

String imei = SystemProperties.get("ro.gsm.imei")

or take a look at this answer

Community
  • 1
  • 1