Last active
January 8, 2016 17:42
-
-
Save arbo77/ee2053d76387c3fde1d3 to your computer and use it in GitHub Desktop.
Android Snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Class<?> c = Class.forName("android.os.SystemProperties"); | |
Method get = c.getMethod("get", String.class, String.class); | |
String serialNumber = (String) get.invoke(c, "sys.serialnumber", "Error"); | |
if(serialNumber.equals("Error")) { | |
serialNumber = (String) get.invoke(c, "ril.serialnumber", "Error"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment