Skip to content

Instantly share code, notes, and snippets.

@oksep
Created May 13, 2016 07:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oksep/da027fa86d19e42f7268ae5777fc3de5 to your computer and use it in GitHub Desktop.
Save oksep/da027fa86d19e42f7268ae5777fc3de5 to your computer and use it in GitHub Desktop.
Get Cpu Abi
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