1.androidå¦ä½è·å¾uuid
2.å¦ä½è·åandroid设å¤å¯ä¸è¯å«ç
androidå¦ä½è·å¾uuid
ææç设å¤é½å¯ä»¥è¿åä¸ä¸ª TelephonyManager.getDeviceId()
ææçGSMè®¾å¤ (æµè¯è®¾å¤é½è£ è½½æSIMå¡) å¯ä»¥è¿åä¸ä¸ª TelephonyManager.getSimSerialNumber()
æææ·»å æè°·æè´¦æ·ç设å¤å¯ä»¥è¿åä¸ä¸ª ANDROID_ID
ææçCDMA设å¤å¯¹äº ANDROID_ID å TelephonyManager.getDeviceId() è¿åç¸åçå¼ï¼åªè¦å¨è®¾ç½®æ¶æ·»å äºè°·æè´¦æ·ï¼
æ以å¦æä½ æ³å¾å°è®¾å¤çå¯ä¸åºå·ï¼ TelephonyManager.getDeviceId() ã
代ç å¦ä¸ï¼
final TelephonyManager tm = (TelephonyManager) getBaseContext().getSystemService(Context.TELEPHONY_SERVICE);
final String tmDevice,mybits源码讲解 tmSerial, tmPhone, androidId;
tmDevice = "" + tm.getDeviceId();
tmSerial = "" + tm.getSimSerialNumber();
androidId = "" + android.provider.Settings.Secure.getString(getContentResolver(), android.provider.Settings.Secure.ANDROID_ID);
UUID deviceUuid = new UUID(androidId.hashCode(), ((long)tmDevice.hashCode() << ) | tmSerial.hashCode());
String uniqueId = deviceUuid.toString();
æåçdeviceIDå¯è½æ¯è¿æ ·çç»æ: -b3-e7c7--bffd
å¦ä½è·åandroid设å¤å¯ä¸è¯å«ç
DEVICE_ID
è¿æ¯Androidç³»ç»ä¸ºå¼åè æä¾çç¨äºæ è¯ææºè®¾å¤ç串å·ï¼ä¹æ¯åç§æ¹æ³ä¸æ®éæ§è¾é«çï¼å¯ä»¥è¯´å ä¹ææç设å¤é½å¯ä»¥è¿åè¿ä¸ªä¸²å·ï¼å¹¶ä¸å¯ä¸æ§è¯å¥½ã
è¿ä¸ªDEVICE_IDå¯ä»¥åéè¿ä¸é¢çæ¹æ³è·åï¼
TelephonyManager tm = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE); String DEVICE_ID = tm.getDeviceId();
å®ä¼æ ¹æ®ä¸åçææºè®¾å¤è¿åIMEIï¼MEIDæè ESNç ï¼ä½å¨ä½¿ç¨çè¿ç¨ä¸æ以ä¸é®é¢ï¼
éææºè®¾å¤ï¼æå¼å§æè½½Androidç³»ç»é½ææºè®¾å¤ï¼èç°å¨ä¹åºç°äºéææºè®¾å¤ï¼å¦å¹³æ¿çµèãçµå书ãçµè§ãé³ä¹ææ¾å¨çãè¿äºè®¾å¤æ²¡æéè¯ç硬件åè½ï¼ç³»ç»ä¸ä¹å°±æ²¡æTELEPHONY_SERVICEï¼èªç¶ä¹å°±æ æ³éè¿ä¸é¢çæ¹æ³è·å¾DEVICE_IDã
æéé®é¢ï¼è·åDEVICE_IDéè¦READ_PHONE_STATEæéï¼å¦æåªæ¯ä¸ºäºè·åDEVICE_IDè没æç¨å°å ¶ä»çéè¯åè½ï¼ç³è¯·è¿ä¸ªæéä¸æ¥å¤§æå°ç¨ï¼äºæ¥é¨åç¨æ·ä¼æç软件çå®å ¨æ§ã
ååå®å¶ç³»ç»ä¸çBugï¼å°æ°ææºè®¾å¤ä¸ï¼ç±äºè¯¥å®ç°ææ¼æ´ï¼ä¼è¿ååå¾ï¼å¦:zerosæè asterisks
MAC ADDRESS
å¯ä»¥ä½¿ç¨ææºWifiæèççMACå°åä½ä¸ºè®¾å¤æ è¯ï¼ä½æ¯å¹¶ä¸æ¨èè¿ä¹åï¼åå æ以ä¸ä¸¤ç¹ï¼
硬件éå¶ï¼å¹¶ä¸æ¯ææç设å¤é½æWifiåèç硬件ï¼ç¡¬ä»¶ä¸åå¨èªç¶ä¹å°±å¾ä¸å°è¿ä¸ä¿¡æ¯ã
è·åçéå¶ï¼å¦æWifi没ææå¼è¿ï¼æ¯æ æ³è·åå ¶Macå°åçï¼èèçæ¯åªæå¨æå¼çæ¶åæè½è·åå°å ¶Macå°åã
è·åWifi Macå°åï¼
è·åèç Macå°åï¼
Sim Serial Number
è£ æSIMå¡ç设å¤ï¼å¯ä»¥éè¿ä¸é¢çæ¹æ³è·åå°Sim Serial Numberï¼
TelephonyManager tm = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE); String SimSerialNumber = tm.getSimSerialNumber();
注æï¼å¯¹äºCDMA设å¤ï¼è¿åçæ¯ä¸ä¸ªç©ºå¼ï¼
ANDROID_ID
å¨è®¾å¤é¦æ¬¡å¯å¨æ¶ï¼ç³»ç»ä¼éæºçæä¸ä¸ªä½çæ°åï¼å¹¶æè¿ä¸ªæ°å以è¿å¶å符串çå½¢å¼ä¿åä¸æ¥ï¼è¿ä¸ªè¿å¶çå符串就æ¯ANDROID_IDï¼å½è®¾å¤è¢«wipeå该å¼ä¼è¢«éç½®ãå¯ä»¥éè¿ä¸é¢çæ¹æ³è·åï¼
import android.provider.Settings; String ANDROID_ID = Settings.System.getString(getContentResolver(), Settings.System.ANDROID_ID);
ANDROID_IDå¯ä»¥ä½ä¸ºè®¾å¤æ è¯ï¼ä½éè¦æ³¨æï¼
ååå®å¶ç³»ç»çBugï¼ä¸åç设å¤å¯è½ä¼äº§çç¸åçANDROID_IDï¼ddecã
ååå®å¶ç³»ç»çBugï¼æäºè®¾å¤è¿åçå¼ä¸ºnullã
设å¤å·®å¼ï¼å¯¹äºCDMA设å¤ï¼ANDROID_IDåTelephonyManager.getDeviceId() è¿åç¸åçå¼ã
Serial Number
Androidç³»ç»2.3çæ¬ä»¥ä¸å¯ä»¥éè¿ä¸é¢çæ¹æ³å¾å°Serial Numberï¼ä¸éææºè®¾å¤ä¹å¯ä»¥éè¿è¯¥æ¥å£è·åã
String SerialNumber = android.os.Build.SERIAL;
2024-11-25 09:58
2024-11-25 09:32
2024-11-25 09:12
2024-11-25 08:46
2024-11-25 08:39
2024-11-25 08:10