Created
May 13, 2016 07:46
-
-
Save oksep/da027fa86d19e42f7268ae5777fc3de5 to your computer and use it in GitHub Desktop.
Get Cpu Abi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static String getCpuAbi() { | |
ShellUtils.CommandResult result = ShellUtils.execCommand("getprop ro.product.cpu.abi", false); | |
String cpuAbi; | |
switch (result.successMsg) { | |
case "arm64-v8a": | |
cpuAbi = "arm64-v8a"; | |
break; | |
case "armeabi": | |
cpuAbi = "armeabi"; | |
break; | |
case "armeabi-v7a": | |
cpuAbi = "armeabi-v7a"; | |
break; | |
case "mips": | |
cpuAbi = "mips"; | |
break; | |
case "mips64": | |
cpuAbi = "mips64"; | |
break; | |
case "x86": | |
cpuAbi = "x86"; | |
break; | |
case "x86_64": | |
cpuAbi = "x86_64"; | |
break; | |
default: | |
cpuAbi = "armeabi"; | |
} | |
Log.e("AAA", "1111: " + cpuAbi); | |
Log.e("AAA", "2222: " + result); | |
return cpuAbi; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment