Android - How to tell what architecture an APK is intended for?
One (rather crude) way to see what architecture an APK's native libraries are built for is to unzip it (it's only a zip file) and take a look at the libs folder - if the application contains any native libraries, they will be split into the following subfolders inside (with the compiled libraries inside these):
armeabi: compiled code for the older ARMv5 architecture (32-bit, support for ARMv5 was removed from the Android NDK in r17)
armeabi-v7a: compiled code for the ARMv7 architecture (32-bit)
arm64-v8a: compiled code for the ARMv8 architecture (64-bit)
x86: compiled code for the x86 architecture (32-bit)
x86_64: compiled code the x86-64 architecture (64-bit)
mips: compiled code for the MIPS32r1 architecture and later (32-bit, support for MIPS was removed from the Android NDK in r17).
mips64: compiled code for the MIPS64r6 architecture (32-bit, support for MIPS64 was removed from the Android NDK in r17).
See Android Application Package for more information on an APK's structure, and the above list's source. A more complete (including MIPS64) list, along with some information about architecture-specific things, can be found on an archived version of the Android Developer ABI Management page, captured on April 18th 2016.
Interestingly enough, targeting one single ABI (where an app includes native libraries designed for one architecture) doesn't necessarily mean that the app won't run on devices that use other architectures. ARMv8-a, for example, is backwards compatible with ARM and ARMv7-a, and Intel's x86 Android devices contain a proprietary translation layer that allows ARM code to execute on x86 devices (allowing ARM-only apps to run on x86 platforms). A list of the ABIs that an Android device can execute can be found in the
ro.product.cpu.abilist property, which can be attained in a shell (e.g. via a terminal app on the device, or over adb using
adb shell) using the