android.os.Build#CPU_ABI2 ( )源码实例Demo

下面列出了android.os.Build#CPU_ABI2 ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: Cake-VPN   文件: VPNLaunchHelper.java
private static String writeMiniVPN(Context context) {
    String[] abis;
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) abis = getSupportedABIsLollipop();
    else
        //noinspection deprecation
        abis = new String[]{Build.CPU_ABI, Build.CPU_ABI2};
    String nativeAPI = NativeUtils.getNativeAPI();
    if (!nativeAPI.equals(abis[0])) {
        VpnStatus.logWarning(R.string.abi_mismatch, Arrays.toString(abis), nativeAPI);
        abis = new String[]{nativeAPI};
    }
    for (String abi : abis) {
        File vpnExecutable = new File(context.getCacheDir(), getMiniVPNExecutableName() + "." + abi);
        if ((vpnExecutable.exists() && vpnExecutable.canExecute()) || writeMiniVPNBinary(context, abi, vpnExecutable)) {
            return vpnExecutable.getPath();
        }
    }
    return null;
}
 
源代码2 项目: SimpleOpenVpn-Android   文件: VPNLaunchHelper.java
private static String writeMiniVPN(Context context) {
       String[] abis;
       if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
           abis = getSupportedABIsLollipop();
       else
           //noinspection deprecation
           abis = new String[]{Build.CPU_ABI, Build.CPU_ABI2};

       String nativeAPI = NativeUtils.getNativeAPI();
       if (!nativeAPI.equals(abis[0])) {
           VpnStatus.logWarning(R.string.abi_mismatch, Arrays.toString(abis), nativeAPI);
           abis = new String[] {nativeAPI};
       }

       for (String abi: abis) {

           File vpnExecutable = new File(context.getCacheDir(), getMiniVPNExecutableName() + "." + abi);
           if ((vpnExecutable.exists() && vpnExecutable.canExecute()) || writeMiniVPNBinary(context, abi, vpnExecutable)) {
               return vpnExecutable.getPath();
           }
       }

       return null;
}
 
源代码3 项目: MobileInfo   文件: CpuInfo.java
private static String putCpuAbi() {
    String[] abis;
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        abis = Build.SUPPORTED_ABIS;
    } else {
        abis = new String[]{Build.CPU_ABI, Build.CPU_ABI2};
    }
    StringBuilder stringBuilder = new StringBuilder();
    for (String abi : abis) {
        stringBuilder.append(abi);
        stringBuilder.append(",");
    }

    try {
        return stringBuilder.toString().substring(0, stringBuilder.toString().length() - 1);
    } catch (Exception e) {
        Log.i(TAG, e.toString());
    }
    return null;

}
 
源代码4 项目: loco-answers   文件: AppUtils.java
public static String getDeviceDetails(Context context) {

        return "Device Information\n"
                + "\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
                + "\nBRAND : " + Build.BRAND
                + "\nCPU_ABI : " + Build.CPU_ABI
                + "\nCPU_ABI2 : " + Build.CPU_ABI2
                + "\nMANUFACTURER : " + Build.MANUFACTURER
                + "\nMODEL : " + Build.MODEL
                + "\nPRODUCT : " + Build.PRODUCT;

    }
 
源代码5 项目: Cybernet-VPN   文件: VPNLaunchHelper.java
private static String writeMiniVPN(Context context) {
    String[] abis;
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) abis = getSupportedABIsLollipop();
    else
        //noinspection deprecation
        abis = new String[]{Build.CPU_ABI, Build.CPU_ABI2};
    String nativeAPI = NativeUtils.getNativeAPI();
    if (!nativeAPI.equals(abis[0])) {
        VpnStatus.logWarning(R.string.abi_mismatch, Arrays.toString(abis), nativeAPI);
        abis = new String[]{nativeAPI};
    }
    for (String abi : abis) {
        File vpnExecutable = new File(context.getCacheDir(), getMiniVPNExecutableName() + "." + abi);
        if ((vpnExecutable.exists() && vpnExecutable.canExecute()) || writeMiniVPNBinary(context, abi, vpnExecutable)) {
            return vpnExecutable.getPath();
        }
    }
    return null;
}
 
源代码6 项目: bitmask_android   文件: VPNLaunchHelper.java
private static String writeMiniVPN(Context context) {
    String[] abis;
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
        abis = getSupportedABIsLollipop();
    else
        //noinspection deprecation
        abis = new String[]{Build.CPU_ABI, Build.CPU_ABI2};

    String nativeAPI = NativeUtils.getNativeAPI();
    if (!nativeAPI.equals(abis[0])) {
        VpnStatus.logWarning(R.string.abi_mismatch, Arrays.toString(abis), nativeAPI);
        abis = new String[]{nativeAPI};
    }

    for (String abi : abis) {

        File vpnExecutable = new File(context.getCacheDir(), "c_" + getMiniVPNExecutableName() + "." + abi);
        if ((vpnExecutable.exists() && vpnExecutable.canExecute()) || writeMiniVPNBinary(context, abi, vpnExecutable)) {
            return vpnExecutable.getPath();
        }
    }

    throw new RuntimeException("Cannot find any execulte for this device's ABIs " + abis.toString());
}
 
源代码7 项目: EasyVPN-Free   文件: VPNLaunchHelper.java
private static String writeMiniVPN(Context context) {
       String[] abis;
       if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
           abis = getSupportedABIsLollipop();
       else
           //noinspection deprecation
           abis = new String[]{Build.CPU_ABI, Build.CPU_ABI2};

       String nativeAPI = NativeUtils.getNativeAPI();
       if (!nativeAPI.equals(abis[0])) {
           VpnStatus.logWarning(R.string.abi_mismatch, Arrays.toString(abis), nativeAPI);
           abis = new String[] {nativeAPI};
       }

       for (String abi: abis) {

           File vpnExecutable = new File(context.getCacheDir(), getMiniVPNExecutableName() + "." + abi);
           if ((vpnExecutable.exists() && vpnExecutable.canExecute()) || writeMiniVPNBinary(context, abi, vpnExecutable)) {
               return vpnExecutable.getPath();
           }
       }

       return null;
}
 
源代码8 项目: mollyim-android   文件: LogSectionSystemInfo.java
private static @NonNull Iterable<String> getSupportedAbis() {
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
    return Arrays.asList(Build.SUPPORTED_ABIS);
  } else {
    LinkedList<String> abis = new LinkedList<>();
    abis.add(Build.CPU_ABI);
    if (Build.CPU_ABI2 != null && !"unknown".equals(Build.CPU_ABI2)) {
      abis.add(Build.CPU_ABI2);
    }
    return abis;
  }
}
 
源代码9 项目: SoLoader   文件: SysUtil.java
/**
 * Return an list of ABIs we supported on this device ordered according to preference. Use a
 * separate inner class to isolate the version-dependent call where it won't cause the whole class
 * to fail preverification.
 *
 * @return Ordered array of supported ABIs
 */
public static String[] getSupportedAbis() {
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
    return MarshmallowSysdeps.getSupportedAbis();
  } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
    return LollipopSysdeps.getSupportedAbis();
  } else {
    return new String[] {Build.CPU_ABI, Build.CPU_ABI2};
  }
}
 
源代码10 项目: Android-utils   文件: DeviceUtils.java
public static String[] getABIs() {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        return Build.SUPPORTED_ABIS;
    } else {
        if (!TextUtils.isEmpty(Build.CPU_ABI2)) {
            return new String[]{Build.CPU_ABI, Build.CPU_ABI2};
        }
        return new String[]{Build.CPU_ABI};
    }
}
 
源代码11 项目: QPM   文件: BasicInfoUtils.java
private static String getCPUType() {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        return join(",", Build.SUPPORTED_ABIS);
    } else {
        if (!TextUtils.isEmpty(Build.CPU_ABI2)) {
            return Build.CPU_ABI + "," + Build.CPU_ABI2;
        }
        return Build.CPU_ABI;
    }
}
 
源代码12 项目: ReLinker   文件: SystemLibraryLoader.java
@Override
public String[] supportedAbis() {
    if (Build.VERSION.SDK_INT >= 21 && Build.SUPPORTED_ABIS.length > 0) {
        return Build.SUPPORTED_ABIS;
    } else if (!TextUtils.isEmpty(Build.CPU_ABI2)) {
        return new String[] {Build.CPU_ABI, Build.CPU_ABI2};
    } else {
        return new String[] {Build.CPU_ABI};
    }
}
 
源代码13 项目: DevUtils   文件: DeviceUtils.java
/**
 * 获取支持的指令集 如: [arm64-v8a, armeabi-v7a, armeabi]
 * @return 支持的指令集
 */
public static String[] getABIs() {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        return Build.SUPPORTED_ABIS;
    } else {
        if (!TextUtils.isEmpty(Build.CPU_ABI2)) {
            return new String[]{Build.CPU_ABI, Build.CPU_ABI2};
        }
        return new String[]{Build.CPU_ABI};
    }
}
 
源代码14 项目: Common   文件: DeviceUtils.java
/**
 * Return an ordered list of ABIs supported by this device. The most preferred ABI is the first
 * element in the list.
 *
 * @return an ordered list of ABIs supported by this device
 */
public static String[] getABIs() {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        return Build.SUPPORTED_ABIS;
    } else {
        if (!TextUtils.isEmpty(Build.CPU_ABI2)) {
            return new String[]{Build.CPU_ABI, Build.CPU_ABI2};
        }
        return new String[]{Build.CPU_ABI};
    }
}
 
源代码15 项目: Neptune   文件: CpuAbiUtils.java
/**
 * 获取设备支持的abi列表
 */
public static String[] getSupportAbis() {
    String[] cpuAbis;
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        cpuAbis = Build.SUPPORTED_ABIS;
    } else {
        cpuAbis = new String[]{Build.CPU_ABI, Build.CPU_ABI2};
    }
    // avoid NPE
    if (cpuAbis == null) {
        cpuAbis = new String[0];
    }

    return cpuAbis;
}
 
源代码16 项目: fdroidclient   文件: SupportedArchitectures.java
/**
 * The most preferred ABI is the first element in the list.
 */
@TargetApi(21)
@SuppressWarnings("deprecation")
public static String[] getAbis() {
    if (Build.VERSION.SDK_INT >= 21) {
        return Build.SUPPORTED_ABIS;
    }
    return new String[]{Build.CPU_ABI, Build.CPU_ABI2};
}
 
源代码17 项目: CrashReporter   文件: AppUtils.java
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;
    }
 
源代码18 项目: AndroidUtilCode   文件: DeviceUtils.java
/**
 * Return an ordered list of ABIs supported by this device. The most preferred ABI is the first
 * element in the list.
 *
 * @return an ordered list of ABIs supported by this device
 */
public static String[] getABIs() {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        return Build.SUPPORTED_ABIS;
    } else {
        if (!TextUtils.isEmpty(Build.CPU_ABI2)) {
            return new String[]{Build.CPU_ABI, Build.CPU_ABI2};
        }
        return new String[]{Build.CPU_ABI};
    }
}
 
源代码19 项目: NetworkMapper   文件: MainActivity.java
private String donexteabi() {
    switch (currentEabi++) {
        case 0:
            return Build.CPU_ABI;
        case 1:
            return Build.CPU_ABI2;
    }
    return null;
}
 
源代码20 项目: QPM   文件: DeviceUtils.java
public static String getABI() {
	String CPU_ABI = Build.CPU_ABI;
	String CPU_ABI2 = Build.CPU_ABI2;
	
	

	return CPU_ABI + " " + CPU_ABI2;
}