本文整理汇总了Java中android.os.Build.TAGS属性的典型用法代码示例。如果您正苦于以下问题:Java Build.TAGS属性的具体用法?Java Build.TAGS怎么用?Java Build.TAGS使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类android.os.Build
的用法示例。
在下文中一共展示了Build.TAGS属性的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isRooted
/**
* 检测手机是否Rooted
*
* @return
*/
private static boolean isRooted() {
boolean isSdk = isGoogleSdk();
Object tags = Build.TAGS;
if ((!isSdk) && (tags != null)
&& (((String) tags).contains("test-keys"))) {
return true;
}
if (new File("/system/app/Superuser.apk").exists()) {
return true;
}
if ((!isSdk) && (new File("/system/xbin/su").exists())) {
return true;
}
return false;
}
示例2: getDeviceDetails
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;
}
示例3: isRooted
public static boolean isRooted(Context context) {
boolean isEmulator = isEmulator(context);
String buildTags = Build.TAGS;
if ((!isEmulator && buildTags != null && buildTags.contains("test-keys")) || new File("/system/app/Superuser.apk").exists()) {
return true;
}
File file = new File("/system/xbin/su");
if (isEmulator || !file.exists()) {
return false;
}
return true;
}
示例4: getBuildTags
public static String getBuildTags() {
return Build.TAGS;
}
示例5: isRootByBuildTag
public static boolean isRootByBuildTag() {
String buildTags = Build.TAGS;
return ((buildTags != null && buildTags.contains("test-keys")));
}
示例6: checkOne
private static boolean checkOne() {
return Build.TAGS != null && Build.TAGS.contains("test-keys");
}
示例7: getBuildTags
public String getBuildTags() {
return Build.TAGS;
}