2

I have a armv7a device and am not able to install armv8a applications. But I am able to install armv7a + armv8a applications.

How I am able to install armv7a + armv8a and armv7a but not armv8a applications?

7
  • 4
    If somebody understands English and French she/he will be able to read a book written in English or French. If you only understand French it will be very hard for you to understand a book in English. ARMv7 and ARMv8a are also like languages and the CPU is like a person reading the book of a certain language. Most ARMv8 CPUs are multi language capable. ARMv7 only understand one "language". As the language is hard coded in the CPU you can't change it by software.
    – Robert
    May 6, 2021 at 18:37
  • 1
    Nice explanation by Robert, thanks! Another analogy: A newer version of your word processor has added additional "formatting elements" to the document format. It can still read the older formats fine – but the older version naturally cannot understand the new format (think *.doc vs *.docx). ARMv7 is the (older) predecessor of ARMv8, the latter added new instruction sets ARMv7 does not understand.
    – Izzy
    May 6, 2021 at 20:07
  • 1
    @Izzy Things are getting even more complicated as CPUs will be released that only support ARMv8 but not ARMv7 and then there is the new 64bit only CPU type ARMv9 (bit incompatible to ARMv8 as far as I know) which just been announced. Things will really getting complex next year's...
    – Robert
    May 6, 2021 at 20:37
  • Ouch, that's indeed bad news. So ends our "easy chain"…
    – Izzy
    May 7, 2021 at 22:55

2 Answers 2

6

Basics

Applications that are entirely built from Java or Kotlin code, including all the libraries and SDKs they use, don't care about which of armv7a and armv8a a device supports. However, quite a few apps include "native code", or "machine code", usually compiled from C or C++ code using the Android Native Development Kit ("NDK").

A given piece of machine code is either 32-bit (armv7a) or 64-bit (armv8a). It cannot be both.

Running native code

Applications that support both armv7a and armv8a have two sets of machine code included in their APK files:

  • One set for armv7a
  • One set for armv8a

Your armv7a device can happily run the code that's intended for it. It can understand that, and has the libraries and other software it needs to run it. It can't understand armv8a code at all, and is thus unable to run it. Applications that only support armv8a thus can't be run, so Android prevents you from installing them.

Forthcoming Complexities

The ARMv9 architecture will start to appear in Android devices quite soon. The Qualcomm Snapdragon 8 Gen 1 was one of the first v9 chips announced, in November 2021. Most ARMv9 cores can't run armv7a code, because they don't implement that 32-bit instruction set (or any other). They can run armv8a code. This means that devices with ARMv9 processors:

  • Can run apps that support armv7a and armv8a.
  • Can run apps that only support armv8a.
  • Can't run apps that only support armv7a.

It's a good thing that Google have been demanding that new and updated apps support include armv8a code since August 2019 if they include any native code.

If the Android NDK acquires an option to build for armv9a, such code won't run on armv7a or armv8a devices. I presume that Google will require APKs with armv9a code to provide armv8a code as well, at least for a few years.

Why is there any armv7a machine code in use?

Android has quite a long history, and when it started, neither armv7a nor armv8a had been created. So there's been a gradual process of upgrading native code to newer standards.

In more detail, the original NDK in June 2009 only supported "armeabi" machine code, using the ARMv5TE instruction set. Armv7a was added in June 2010, x86 in June 2011 and MIPS in May 2012. Armv8a, along with 64-bit x86 and MIPS was added in July 2014. Armeabi, MIPS and MIPS64 were removed in June 2018.

Someone starting on Android NDK work today would support armv7a and armv8a, or maybe only armv8a if they were only interested in newer, faster devices, or their app needed to use lots of memory.

There have been a few Android devices that had 64-bit processors and a 64-bit Android kernel, but didn't have 64-bit Java/Kotlin run-times. The one I encountered was a 2017 model of the Amazon Kindle Fire HD 10, which is now discontinued. I bought it for the 64-bit Android 5, and the lack of 64-bit Java run-times was no problem for the native code I needed to test in the ADB shell.

The main benefit of 64-bit Java/Kotlin run-times is that they allow apps running on them to access more memory. This is only significant on devices with at least 4GB of RAM, so providing those run-times on devices with smaller memories has little value.

1

Arm v7 SoC => 32 bit

Arm v8 SoC => 32 bit + 64 bit both

Arm v7a + Arm v8a packages => it has both Armv7a and v8a binaries of that app bundled, so it installs 32 bit version (Arm v7a) of package if device has an Arm v7 SoC, 64 bit version if device has an Arm v8 SoC

Arm v7a packages => it only has 32 bit binaries, installable on both Armv7 and v8 chips

Arm v8a packages => it only has Armv8a installable binaries, so if device is 32 bit, the app package simply won't install

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .