settings - Get hardware serial number of Android device -



settings - Get hardware serial number of Android device -

i need hardware serial code of android device app installed. hardware serial number 1 can see on settings > device > status > serial number.

i though using settings.secure.android_id or android.os.build.serial, neither of them worked, meaning didn't give me unique identifier i'm looking for. instance android.os.build.serial got me unique id shown on adb when run command adb devices.

notice goal of question not find unique identifier help me, it's getting device hardware serial number.

thanks help.

edit:

please clear i'm not looking value provided string android.os.build.serial. know how value i'm not interested in it.

i have samsung device, therefore, serial number used different 1 provided android.os.build.serial.

the solution simple:

class<?> c = class.forname("android.os.systemproperties"); method = c.getmethod("get", string.class, string.class); serialnumber = (string) get.invoke(c, "sys.serialnumber", "error"); if(serialnumber.equals("error")) { serialnumber = (string) get.invoke(c, "ril.serialnumber", "error"); }

this serial number of samsung devices. utilize "sys.serialnumber" value serial number of sm-t210 (galaxy tab 3) , sm-t230 (galaxy tab 4) tablets, works lot more samsung tablets. "ril.serialnumber" value on samsung gt-i8550l (galaxy win).

i hope helps.

android settings uniqueidentifier serial-number

Comments

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Is there a way to convert an HTML page styled with Bootstrap CSS into email-compatible html? -