String uuid = ""; String serial = null; String m_szDevIDShort = "35" + Build.BOARD.length() % 10 + Build.BRAND.length() % 10 + Build.CPU_ABI.length() % 10 + Build.DEVICE.length() % 10 + Build.DISPLAY.length() % 10 + Build.HOST.length() % 10 + Build.ID.length() % 10 + Build.MANUFACTURER.length() % 10 + Build.MODEL.length() % 10 + Build.PRODUCT.length() % 10 + Build.TAGS.length() % 10 + Build.TYPE.length() % 10 + Build.USER.length() % 10; // 13 the try { serial . = Android.os.Build class .getField ( "the SERIAL") GET (. Null ) .toString (); // the API> Using the serial number. 9 = UUID = new new the UUID (m_szDevIDShort.hashCode ( .), serial.hashCode ()) toString (); } the catch (Exception Exception) { // Serial requires an initialization Serial = "Serial"; // just one initialization // 15 bit number information is revealed to hardware uuid = new new the UUID (m_szDevIDShort.hashCode (), serial.hashCode ()) toString ();. }
Transfer: https://blog.csdn.net/u014031072/article/details/70257907