2015年6月12日 星期五

[轉] How to identify the android device is 32-bit or 64-bit ?

Android is going to support 64-bit, but there are so many android devices, how do developer know current device is 32-bit  or 64-bit  ?
Let's begin from  this command:
adb shell getprop ro.product.cpu.abi 
for adb command, you can check Android official website for more detail:  ADB (Android Debug Bridge)
getprop is an android utility to retrieve a property via the android property service.
ro.product.cpu.abi is android property, this property could help you confirm this device is ARM or Intel x86
·         ro.product.cpu.abi = armeabi-v7a
·         ro.product.cpu.abi = x86
 you can check all the property by use the command
adb shell getprop
you will find some related property for check the device is 32bit or 64bit  
·         ro.product.cpu.abilist32
·         ro.product.cpu.abilist64
·         ro.product.cpu.abilist
ro.product.cpu.abilist32 shows an ordered list of 32 bit ABIs supported by this device.
We may need to detect the device information in app,   check this page: Build (android.os.build)
import android.os.Build;
and get the information about CPU and ABIs

·         CPU_ABI
·         CPU_ABI2
·         SUPPORTED_32_BIT_ABIS
·         SUPPORTED_64_BIT_ABIS

·         SUPPORTED_ABIS

沒有留言:

張貼留言