I get device names by the command "adb deivces" in command line. Now I want get name in my android device.
String serial = null;
try {
Class<?> c = Class.forName("android.os.SystemProperties");
Method get = c.getMethod("get", String.class);
serial = (String) get.invoke(c, "ro.serialno");
System.out.println(serial);
}
catch (Exception ignored) {
}
those works fine in my android phone.But my acer a500 tablet gets the real serial number. This is not correspond with the name I get from the adb command.
I surpose the ddms gets the devices name by another method. But i dont know.