Java Code Examples for android.os.Build#FINGERPRINT
The following examples show how to use
android.os.Build#FINGERPRINT .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Device.java From hoko-android with Apache License 2.0 | 7 votes |
/** * Returns the Android build number of the device Hoko is being run on. * * @return The Android build number in case it has been found, "HOKO" otherwise. */ public static String getBuildNumber() { String buildNumber = "HOKO"; if (Build.FINGERPRINT != null) { String[] fingerPrintSplit = Build.FINGERPRINT.split("/"); if (fingerPrintSplit.length > 3) { buildNumber = fingerPrintSplit[3]; } } return buildNumber; }
Example 2
Source File: AesCbcWithIntegrity.java From java-aes-crypto with MIT License | 6 votes |
private static byte[] getBuildFingerprintAndDeviceSerial() { StringBuilder result = new StringBuilder(); String fingerprint = Build.FINGERPRINT; if (fingerprint != null) { result.append(fingerprint); } String serial = getDeviceSerialNumber(); if (serial != null) { result.append(serial); } try { return result.toString().getBytes("UTF-8"); } catch (UnsupportedEncodingException e) { throw new RuntimeException("UTF-8 encoding not supported"); } }
Example 3
Source File: PRNGFixes.java From NoteCrypt with GNU General Public License v3.0 | 6 votes |
private static byte[] getBuildFingerprintAndDeviceSerial() { StringBuilder result = new StringBuilder(); String fingerprint = Build.FINGERPRINT; if (fingerprint != null) { result.append(fingerprint); } String serial = getDeviceSerialNumber(); if (serial != null) { result.append(serial); } try { return result.toString().getBytes("UTF-8"); } catch (UnsupportedEncodingException e) { throw new RuntimeException("UTF-8 encoding not supported"); } }
Example 4
Source File: PRNGFixes.java From android with GNU General Public License v3.0 | 6 votes |
private static byte[] getBuildFingerprintAndDeviceSerial() { StringBuilder result = new StringBuilder(); String fingerprint = Build.FINGERPRINT; if (fingerprint != null) { result.append(fingerprint); } String serial = getDeviceSerialNumber(); if (serial != null) { result.append(serial); } try { return result.toString().getBytes("UTF-8"); } catch (UnsupportedEncodingException e) { throw new RuntimeException("UTF-8 encoding not supported"); } }
Example 5
Source File: PRNGFixes.java From secure-storage-android with Apache License 2.0 | 6 votes |
private static byte[] getBuildFingerprintAndDeviceSerial() { StringBuilder result = new StringBuilder(); String fingerprint = Build.FINGERPRINT; if (fingerprint != null) { result.append(fingerprint); } String serial = getDeviceSerialNumber(); if (serial != null) { result.append(serial); } try { return result.toString().getBytes("UTF-8"); } catch (UnsupportedEncodingException e) { throw new RuntimeException("UTF-8 encoding not supported"); //NOPMD } }
Example 6
Source File: AesPrngHelper.java From weMessage with GNU Affero General Public License v3.0 | 6 votes |
private static byte[] getBuildFingerprintAndDeviceSerial() { StringBuilder result = new StringBuilder(); String fingerprint = Build.FINGERPRINT; if (fingerprint != null) { result.append(fingerprint); } String serial = getDeviceSerialNumber(); if (serial != null) { result.append(serial); } try { return result.toString().getBytes("UTF-8"); } catch (UnsupportedEncodingException e) { throw new RuntimeException("UTF-8 encoding not supported"); } }
Example 7
Source File: AesCbcWithIntegrity.java From FimiX8-RE with MIT License | 6 votes |
private static byte[] getBuildFingerprintAndDeviceSerial() { StringBuilder result = new StringBuilder(); String fingerprint = Build.FINGERPRINT; if (fingerprint != null) { result.append(fingerprint); } String serial = getDeviceSerialNumber(); if (serial != null) { result.append(serial); } try { return result.toString().getBytes("UTF-8"); } catch (UnsupportedEncodingException e) { throw new RuntimeException("UTF-8 encoding not supported"); } }
Example 8
Source File: PRNGFixes.java From DeviceConnect-Android with MIT License | 6 votes |
private static byte[] getBuildFingerprintAndDeviceSerial() { StringBuilder result = new StringBuilder(); String fingerprint = Build.FINGERPRINT; if (fingerprint != null) { result.append(fingerprint); } String serial = getDeviceSerialNumber(); if (serial != null) { result.append(serial); } try { return result.toString().getBytes("UTF-8"); } catch (UnsupportedEncodingException e) { throw new RuntimeException("UTF-8 encoding not supported"); } }
Example 9
Source File: AutoErrorReporter.java From AutoCrashReporter with Apache License 2.0 | 6 votes |
private void recordInformations(Context context) { try { PackageManager pm = context.getPackageManager(); PackageInfo pi; // Version pi = pm.getPackageInfo(context.getPackageName(), 0); versionName = pi.versionName; //buildNumber = currentVersionNumber(context); // Package name packageName = pi.packageName; // Device model phoneModel = Build.MODEL; // Android version androidVersion = Build.VERSION.RELEASE; board = Build.BOARD; brand = Build.BRAND; device = Build.DEVICE; display = Build.DISPLAY; fingerPrint = Build.FINGERPRINT; host = Build.HOST; id = Build.ID; model = Build.MODEL; product = Build.PRODUCT; manufacturer = Build.MANUFACTURER; tags = Build.TAGS; time = Build.TIME; type = Build.TYPE; user = Build.USER; } catch (Exception e) { e.printStackTrace(); } }
Example 10
Source File: PRNGFixes.java From DeviceConnect-Android with MIT License | 6 votes |
private static byte[] getBuildFingerprintAndDeviceSerial() { StringBuilder result = new StringBuilder(); String fingerprint = Build.FINGERPRINT; if (fingerprint != null) { result.append(fingerprint); } String serial = getDeviceSerialNumber(); if (serial != null) { result.append(serial); } try { return result.toString().getBytes("UTF-8"); } catch (UnsupportedEncodingException e) { throw new RuntimeException("UTF-8 encoding not supported"); } }
Example 11
Source File: PRNGFixes.java From syncthing-android with Mozilla Public License 2.0 | 6 votes |
private static byte[] getBuildFingerprintAndDeviceSerial() { StringBuilder result = new StringBuilder(); String fingerprint = Build.FINGERPRINT; if (fingerprint != null) { result.append(fingerprint); } String serial = getDeviceSerialNumber(); if (serial != null) { result.append(serial); } try { return result.toString().getBytes("UTF-8"); } catch (UnsupportedEncodingException e) { throw new RuntimeException("UTF-8 encoding not supported"); } }
Example 12
Source File: PRNGFixes.java From GreenBits with GNU General Public License v3.0 | 6 votes |
private static byte[] getBuildFingerprintAndDeviceSerial() { final StringBuilder result = new StringBuilder(); final String fingerprint = Build.FINGERPRINT; if (fingerprint != null) { result.append(fingerprint); } final String serial = getDeviceSerialNumber(); if (serial != null) { result.append(serial); } try { return result.toString().getBytes("UTF-8"); } catch (final UnsupportedEncodingException e) { throw new RuntimeException("UTF-8 encoding not supported"); } }
Example 13
Source File: PRNGFixes.java From Silence with GNU General Public License v3.0 | 6 votes |
private static byte[] getBuildFingerprintAndDeviceSerial() { StringBuilder result = new StringBuilder(); String fingerprint = Build.FINGERPRINT; if (fingerprint != null) { result.append(fingerprint); } String serial = getDeviceSerialNumber(); if (serial != null) { result.append(serial); } try { return result.toString().getBytes("UTF-8"); } catch (UnsupportedEncodingException e) { throw new RuntimeException("UTF-8 encoding not supported"); } }
Example 14
Source File: BugReportDeviceInfoBuilder.java From YalpStore with GNU General Public License v2.0 | 6 votes |
private String getUserReadableName() { String fingerprint = TextUtils.isEmpty(Build.FINGERPRINT) ? "" : Build.FINGERPRINT; String manufacturer = TextUtils.isEmpty(Build.MANUFACTURER) ? "" : Build.MANUFACTURER; String product = TextUtils.isEmpty(Build.PRODUCT) ? "" : Build.PRODUCT.replace("aokp_", "").replace("aosp_", "").replace("cm_", "").replace("lineage_", ""); String model = TextUtils.isEmpty(Build.MODEL) ? "" : Build.MODEL; String device = TextUtils.isEmpty(Build.DEVICE) ? "" : Build.DEVICE; String result = (fingerprint.toLowerCase().contains(product.toLowerCase()) || product.toLowerCase().contains(device.toLowerCase()) || device.toLowerCase().contains(product.toLowerCase())) ? model : product; if (!result.toLowerCase().contains(manufacturer.toLowerCase())) { result = manufacturer + " " + result; } if (TextUtils.isEmpty(result)) { return ""; } return (result.substring(0, 1).toUpperCase() + result.substring(1)) .replace("\n", " ") .replace("\r", " ") .replace(",", " ") .trim() ; }
Example 15
Source File: EmulatorDetector.java From android-emulator-detector with Apache License 2.0 | 5 votes |
public static String getDeviceInfo() { return "Build.PRODUCT: " + Build.PRODUCT + "\n" + "Build.MANUFACTURER: " + Build.MANUFACTURER + "\n" + "Build.BRAND: " + Build.BRAND + "\n" + "Build.DEVICE: " + Build.DEVICE + "\n" + "Build.MODEL: " + Build.MODEL + "\n" + "Build.HARDWARE: " + Build.HARDWARE + "\n" + "Build.FINGERPRINT: " + Build.FINGERPRINT; }
Example 16
Source File: RomUtils.java From FloatWindow with Apache License 2.0 | 5 votes |
public static boolean isZTERom() { String manufacturer = Build.MANUFACTURER; String fingerPrint = Build.FINGERPRINT; return (!TextUtils.isEmpty(manufacturer) && (fingerPrint.toLowerCase().contains(ROM_NUBIA) || fingerPrint.toLowerCase().contains(ROM_ZTE))) || (!TextUtils.isEmpty(fingerPrint) && (fingerPrint.toLowerCase().contains(ROM_NUBIA) || fingerPrint.toLowerCase().contains(ROM_ZTE))); }
Example 17
Source File: AppUtils.java From CrashReporter with Apache License 2.0 | 5 votes |
public static String getDeviceDetails(Context context) { return "Device Information\n" + "\nDEVICE.ID : " + getDeviceId(context) + "\nUSER.ID : " + getUserIdentity(context) + "\nAPP.VERSION : " + getAppVersion(context) + "\nLAUNCHER.APP : " + getCurrentLauncherApp(context) + "\nTIMEZONE : " + timeZone() + "\nVERSION.RELEASE : " + Build.VERSION.RELEASE + "\nVERSION.INCREMENTAL : " + Build.VERSION.INCREMENTAL + "\nVERSION.SDK.NUMBER : " + Build.VERSION.SDK_INT + "\nBOARD : " + Build.BOARD + "\nBOOTLOADER : " + Build.BOOTLOADER + "\nBRAND : " + Build.BRAND + "\nCPU_ABI : " + Build.CPU_ABI + "\nCPU_ABI2 : " + Build.CPU_ABI2 + "\nDISPLAY : " + Build.DISPLAY + "\nFINGERPRINT : " + Build.FINGERPRINT + "\nHARDWARE : " + Build.HARDWARE + "\nHOST : " + Build.HOST + "\nID : " + Build.ID + "\nMANUFACTURER : " + Build.MANUFACTURER + "\nMODEL : " + Build.MODEL + "\nPRODUCT : " + Build.PRODUCT + "\nSERIAL : " + Build.SERIAL + "\nTAGS : " + Build.TAGS + "\nTIME : " + Build.TIME + "\nTYPE : " + Build.TYPE + "\nUNKNOWN : " + Build.UNKNOWN + "\nUSER : " + Build.USER; }
Example 18
Source File: DevicesUtils.java From GravityBox with Apache License 2.0 | 4 votes |
public static String getBrand() { return Build.FINGERPRINT; }
Example 19
Source File: RNDeviceModule.java From react-native-device-info with MIT License | 4 votes |
@ReactMethod(isBlockingSynchronousMethod = true) public String getFingerprintSync() { return Build.FINGERPRINT; }
Example 20
Source File: DeviceUtils.java From DevUtils with Apache License 2.0 | 2 votes |
/** * 获取设备的唯一标识, 由设备的多个信息拼接合成 * @return 设备的唯一标识, 由设备的多个信息拼接合成 */ public static String getFingerprint() { return Build.FINGERPRINT; }