/*** Determine if the simulator is an emulator *@return */ Public Static BooleanIsemulator () {/*** There are other situations: * Compare IMSI * Simulator IMSI (2.2 for 310260000000000) * * Modify Android Emulator IMSI * Find Emulator-arm.exe under the. \android_sdk\tools file, open with UltraEdit text editor, search for Cimi keywords, change 310260000000000 to your own desired IMSI number. Save it. Start the emulator again and it's OK. * *--------------------------------------* * or modify the SIM card network type, simulator is 0, phone is greater than 0 * * ============================================= * found under/system folder Build.prop Modify Build * */ /*** Genymotion Simulator can simulate a lot of data, * except build.serial this for unknown*/ BooleanIsemulator = "GENERIC". Equals (Build.BRAND.toLowerCase ()); /*** Eclipse Simulator: * isemulator brand:generic, MODEL:SDK, PRODUCT:SDK * genymotion: * Isemulator brand:generic, Model:samsung Galaxy s4-4.3-api 18-1080x1920, product:vbox86p * * Comment: BRAND's generic This value can be modified under the/system folder to find the Build.prop modify Build. */ //logger.d ("Isemulator BRAND:" +build.brand+ ", MODEL:" +build.model+ ", PRODUCT:" + build.product+ ", SERIAL:" + B Uild. SERIAL); if(isemulator) {HashMap<string, string> map =NewHashmap<string, string>(); Map.put ("BRAND", Build.brand); Map.put ("PRODUCT", build.product); Map.put ("SERIAL", build.serial); Mobclickagent.onevent (Wifiapplication.getinstance (), umengcustomeventconstant.devices, map); return true; } if(Build.MODEL.contains ("Emulator") | |//Build.MODEL.contains ("Google_sdk") | |//Build.MODEL.contains ("SDK") ) {HashMap<string, string> map =NewHashmap<string, string>(); Map.put ("MODEL", Build.model); Mobclickagent.onevent (Wifiapplication.getinstance (), umengcustomeventconstant.devices, map); Isemulator=true; } if(isemulator) {return true; } return false; }
System/app
IMEI Modification Method:
Find Emulator-arm.exe under ... \android_sdk\tools files, open with UltraEdit text editor, search for CGSN keywords, put 0000000000 ... Change to your own IMEI number. Save it.
Start the emulator again and it's OK.
Modify Android Device number