Android os.arch output for ARM, MIPS, x86?

后端 未结 3 1584
我寻月下人不归
我寻月下人不归 2020-12-30 05:27

In order to identify the platform of an Android device, it seems that the java system property \"os.arch\" will suffice:

Log.i(\"mytag\", \"os.arch: \" + Sys         


        
3条回答
  •  忘掉有多难
    2020-12-30 06:05

    According to what I can find in the Android source tree the ro.product.cpu.abi property (which you can access as CPU_ABI through the Build class) should have the following architecture-to-value mapping:

    32-bit ABIs:

    ARM: "armeabi-v7a" (or possibly "armeabi" if it's a really old / low-end device)

    x86: "x86"

    MIPS: "mips"


    64-bit ABIs:

    ARM: "arm64-v8a"

    x86: "x86_64"

    MIPS: "mips64"

提交回复
热议问题