Skip to main content
13 of 22
Add Google Tensor SoCs
John Dallman
  • 2.1k
  • 1
  • 14
  • 30

Yes, although this matters less than on other operating systems

On Android, most apps are written in Kotlin or Java, and are not specifically 32-bit or 64-bit. Developers build them from Kotlin or Java code, which are compiled into Dalvik bytecode for the Android Runtime. They upload their apps to app stores in that form, and devices download them in the same form.

Once downloaded, apps are compiled again, into machine code for the device. This machine code is either 32-bit or 64-bit, as suits the individual device. See "Glossary" below for the technical terms I've used.

This is quite different from Apple's iOS, iPadOS, and related operating systems. Apps for those devices are compiled into machine code by the developer, who uploads them in that form. This meant that Apple's transition from 32-bit to 64-bit was done earlier than Android's, and had less flexibility.

Native code in apps

Some Android apps, for various reasons, include machine code built by the developer, called "native code," rather like iOS apps. This gets uploaded to the app stores, downloaded again to devices, and run directly, without any compilation or translation steps along the way. An app that uses native code must provide separate versions for 32-bit and 64-bit devices if it is to be usable on both 32-bit and 64-bit devices. The APK app file format caters for providing multiple versions of machine code files; this isn't necessary for Dalvik bytecode files.

Changes in Play Store rules

Since August 2019, apps that include native code have been required to provide 64-bit native code when they are released or updated. Since August 2021 any remaining apps that use native code, but only have a 32-bit version of that code, have not been offered to 64-bit capable devices. This is presumably intended to push app developers who use native code to either (a) provide 64-bit native code or (b) stop using native code at all.

Those rules don't apply to apps that are for Wear OS or Android TV, which didn't support 64-bit as of 2019. It appears Wear OS is now preparing for 64-bit, but Android TV isn't yet.

Changes in ARM processors

When 64-bit capable ARM processors first appeared, they could also run 32-bit code. However, that part is optional, and is gradually being dropped. Since 32-bit and 64-bit ARM native code are fairly different from each other (much more so than 32-bit and 64-bit x86), leaving out 32-bit makes processors simpler and thus cheaper to manufacture.

In the early days of 64-bit, there were some odd devices. There were ones that had 64-bit capable processors, but a 32-bit Android OS, and ones that had 64-bit processors and operating systems, but a 32-bit Android Runtime. However, those are now all in the past.

Nowadays, many of the newer ARM processors can't run 32-bit code. This is easiest to explain in terms of ARM Holdings' core designs, since those form the basis of many manufacturers' SoCs.

The early 64-bit cores could run 32-bit code happily, although the ability to run a 32-bit operating system was dropped at Cortex-A76. The ARMv9 cores that were introduced in starting in 2021 mostly can't run 32-bit code at all; the only exceptions are the Cortex-A710 and Cortex-A510.

  • The Qualcomm Snapdragon 8 Gen 2 can only run 32-bit code on five of its eight cores, not including the fastest ones, and the Snapdragon 8 Gen 3 and later won't run 32-bit code at all.
  • The MediaTek Dimensity 9200 can only run 32-bit code on its slowest cores, and the Dimensity 9300 can't run 32-bit code at all.
  • The Samsung Exynos 2200 won't run 32-bit code on its fastest core, but will on all of the others, while the Exynos 2400 can't run 32-bit code at all.
  • In the Google Tensor family, the G1 and G2 can run 32-bit code on all their cores, while the G3 can only do that on its slowest cores.

The first cores in each series from ARM that don't run 32-bit code are:

Changes in installed Android

It is possible to build Android as:

  1. A 32-bit-only operating system, appropriate for devices with 32-bit processors.
  2. A 64-bit-only operating system, appropriate for devices with processors that can't run 32-bit code, and usable on devices with processors that can run 32-bit code if the manufacturer doesn't want to support that.
  3. A 64-bit operating system that can also run 32-bit native code. This is only appropriate for devices with 64-bit processors that can also run 32-bit code. It is larger than a 64-bit-only operating system, so some manufacturers may prefer the 64-bit-only option.

Recent Pixel devices from at least the 7a onwards, have 64-bit-only Android. 64-bit-only Android 13 and 14 images for Pixel 4a to Pixel 6 Pro are available for testing.

Glossary

Machine code

Computer programs consist of instructions telling the computer to do specific, simple things. The complicated and flexible behaviour of programs (which includes apps) is built out of many individual instructions. The instructions are encoded as numbers - because, to computers, everything is expressed as numbers - and the set of instructions that a computer can execute is its "machine code." The part of the computer which reads the machine code instructions and acts on them is the "processor" or "Central Processor Unit", abbreviated "CPU".

Different kinds of computer use different machine codes. Some manufacturers produce several different kinds of computers, with different machine codes. People have been designing machine codes for about 80 years (as of 2023) and new ideas are still being invented and put into use.

  • Most desktop computers use the "x86" or "x86-64" machine codes, developed by Intel Corporation and its competitor, Advanced Micro Devices, since the 1970s. Both those companies manufacture and sell CPUs. That's fine for desktop and laptop computers, which have space for lots of separate components.

  • Almost all mobile devices use the ARM family of machine codes, developed since the 1980s by ARM Holdings. ARM do not manufacture CPUs. Instead they license their designs to other companies, who manufacture "Systems-on-Chip" or "SoC"s that include the CPU and all the other electronics needed in a mobile device. Mobiles don't have space for lots of separate components: most of their small volume is taken up by the screen and the battery.

"Dalvik bytecode"?

"Bytecode" is a way of storing computer programs that isn't specific to a particular kind of computer. Many bytecodes exist, using different ways of representing programs. Dalvik bytecode was used in the Dalvik system for running Android apps that was used in Android versions before 5.0 "Lollipop". That runtime used just-in-time compiling.

Nowadays, Dalvik bytecode is used as a distribution format. When it is downloaded to a device, it is compiled by the Android Runtime ("ART") to the appropriate native code to be called by ART: 32-bit on a device with 32-bit ART, 64-bit on a device with 64-bit ART.

John Dallman
  • 2.1k
  • 1
  • 14
  • 30