LoginSignup
4
3

More than 3 years have passed since last update.

コーディング無しでAndroidデバイスが64bit CPUか判別する方法

Last updated at Posted at 2019-05-16

2019/8/1以降 64bit対応していないアプリはPlay Storeにアップできないとwarningが表示されるようになりました。

対応方法は 公式 の案内通りでできそうですが、動作確認する際に64bit端末で動作確認する必要があります。しかし公式ページでは ↓ な感じでどの端末が具体的に64bit対応なのか不明なので、手元の検証端末が64bitなのか調べる必要があります。

アプリのテストを開始するには、64 ビット対応のデバイスが必要です。Google の Pixel やその他の主力デバイスなど、さまざまな人気機種が 64 ビットに対応しています。

Antutu Benchmarkのようなアプリをインストールする方法もありますが、adbでサクッと確認できると楽だなと思い調べました。

方法1

unameコマンドが端末で使用できる場合は以下の方法で確認できます。

$adb shell uname -m
# ↓結果
aarch64

方法2

unameコマンドがない場合は直接 /proc/cpuinfo を表示するとよさそう。
この例は SC-04E の端末ですが Processor : ARMv7 の表記から 64bitじゃないと判断できそう。

$adb shell cat /proc/cpuinfo
# ↓結果
Processor   : ARMv7 Processor rev 0 (v7l)
processor   : 0
BogoMIPS    : 13.53

processor   : 1
BogoMIPS    : 13.53

processor   : 2
BogoMIPS    : 13.53

processor   : 3
BogoMIPS    : 13.53

Features    : swp half thumb fastmult vfp edsp neon vfpv3 tls vfpv4
CPU implementer : 0x51
CPU architecture: 7
CPU variant : 0x1
CPU part    : 0x06f
CPU revision    : 0

Hardware    : SAMSUNG JF
Revision    : 000f
Serial      : 0000922000000b99

方法3(追記)

Play Consoleのデバイスカタログで端末を検索するとのが早いかも。 ABI を見れば64bit対応かどうかわかる
image.png

方法4(追記)

bundletoolが入っているなら以下のワンライナーで接続されているデバイスの仕様を表示できます。

$tmp=`mktemp`.json && bundletool get-device-spec --output $tmp && cat $tmp && rm $tmp
結果
{
  "supportedAbis": ["arm64-v8a", "armeabi-v7a", "armeabi"],
  "supportedLocales": ["ja-JP", "en-US"],
  "deviceFeatures": ["reqGlEsVersion=0x30002", "android.hardware.audio.output", "android.hardware.bluetooth", "android.hardware.bluetooth_le", "android.hardware.camera", "android.hardware.camera.any", "android.hardware.camera.autofocus", "android.hardware.camera.capability.manual_post_processing", "android.hardware.camera.capability.raw", "android.hardware.camera.external", "android.hardware.camera.flash", "android.hardware.camera.front", "android.hardware.faketouch", "android.hardware.fingerprint", "android.hardware.location", "android.hardware.location.gps", "android.hardware.location.network", "android.hardware.microphone", "android.hardware.nfc.any", "android.hardware.opengles.aep", "android.hardware.screen.landscape", "android.hardware.screen.portrait", "android.hardware.sensor.accelerometer", "android.hardware.sensor.compass", "android.hardware.sensor.gyroscope", "android.hardware.sensor.light", "android.hardware.sensor.proximity", "android.hardware.sensor.stepcounter", "android.hardware.telephony", "android.hardware.telephony.gsm", "android.hardware.touchscreen", "android.hardware.touchscreen.multitouch", "android.hardware.touchscreen.multitouch.distinct", "android.hardware.touchscreen.multitouch.jazzhand", "android.hardware.usb.accessory", "android.hardware.usb.host", "android.hardware.vulkan.level=1", "android.hardware.vulkan.version=4194307", "android.hardware.wifi", "android.hardware.wifi.direct", "android.software.activities_on_secondary_displays", "android.software.app_widgets", "android.software.autofill", "android.software.backup", "android.software.companion_device_setup", "android.software.connectionservice", "android.software.cts", "android.software.device_admin", "android.software.file_based_encryption", "android.software.home_screen", "android.software.input_methods", "android.software.live_wallpaper", "android.software.managed_users", "android.software.midi", "android.software.picture_in_picture", "android.software.print", "android.software.securely_removes_users", "android.software.sip", "android.software.sip.voip", "android.software.verified_boot", "android.software.voice_recognizers", "android.software.vr.mode", "android.software.webview", "com.google.android.feature.ZERO_TOUCH"],
  "screenDensity": 480,
  "sdkVersion": 26
}
4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3