简体   繁体   中英

How to find if apk is 32-bit or 64-bit

Given a APK, how can we find whether its a 32-bit app or a 64-bit app? I am observing an app is unable to run on 64-bit android OS. I guess its a 32-bit app.

APK is ZIP. You can open it and check directory lib to see which architectures are supported. If there is no directory lib , it supports all architectures.

64-bit Android is backwards compatible and can run 32-bit applications. On the other hand, Intel Android (both 32-bit and 64-bit) has very limited compatibility with ARM Android (a binary translator called libhoudini is shipped on Intel but from my experience, it works for only very simple code), and ARM Android is completely incompatible with Intel Android. This affects only applications with NDK code in lib , pure Java applications can be run on both.

Apps without JNI

If you're not using the JNI, your APK won't contain any .so files.

Apps with JNI

Unzip the APK, eg unzip tensorflow-lite.aar -d tensorflow-lite

Look inside /jni , and observe the directories inside it:

It looks like the APK/ AAR I unzipped contains .so files for all 4 JNI ABI's. This is good, because I built the tensorflow lite library for all platforms.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM