3

The newest ARM processors only support 64-bit code. The Play Store has stopped showing 32-bit only apps to 64-bit capable devices. 32-bit support has not been a requirement for devices since Android 9.

Will Android become a 64-bit only operating system as time passes?

0

1 Answer 1

9

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 supported 64-bit rather later than baseline Android. Wear OS 4 onwards run 64-bit apps, and are starting to transition to 64-bit only. Android TV is mostly 32-bit, although there have been some 64-bit devices.

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 from 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 and later 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 and later 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 G4 and later can't run 32-bit code at all.

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

Emulators, translators, etc.

Xiaomi ships a 32-bit to 64-bit binary translator on some devices called "Tango." This allows 64-bit only hardware, such as the Snapdragon 8 Gen 3 in the Xiaomi 14 and Xiaomi 14 Pro, to run 32-bit apps. It does this by translating their 32-bit native code libraries into 64-bit native code. News story here. More details under tango in the tag wiki.

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.

Android compatibility definitions

As of the Android 15 compatibility rules, devices with 2GB RAM or less physical RAM are required to only run 32-bit applications, and devices with 2GB to 4GB are strongly recommended to only run 32-bit applications. Of course, running 32-bit applications requires having processor cores that can run 32-bit code, and that capability is missing from newer cores. This will confine 32-bit devices to using older and slower processor cores, causing them to gradually fade away.

More precisely, devices with less than 2GB of RAM available to the operating system (some is always used for other purposes) must only support one ABI, and 32-bit is the sane choice. Supporting both the 32- and 64-bit APIs takes up more RAM, because many libraries would have to be provided in both 32- and 64-bit forms. Supporting only 64-bit is technically allowed, but would be foolish, because 64-bit code uses more memory for data.

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.

4
  • "As of the Android 14 compatibility rules, devices with less than 2GB RAM are required to only run 32-bit applications" Is that why my Stratus C5 """"Elite"""" is on a 32bit build of Android despite the SOC supporting 64bit? Commented Dec 1 at 17:16
  • @qwertykeyboard: Yes. It's generally safe to assume anything low-cost and labelled "Elite" is suffering from excessive marketing. This version of the SoC's ability to run 64-bit code is thus not useful for Android, but it may well be the easy and cheap way to get 32-bit performance. Commented Dec 1 at 18:32
  • But the strange thing is that I had a "Wiko Ride", another ultra low end mediatek phone, that ran the ARM64 version of Android 9. Similar specs too. Commented Dec 13 at 3:29
  • @qwertykeyboard: Possible causes for that include a rules change (Android needs more and more RAM as it is developed), or lack of enforcement back in Android 9 days. Commented Dec 13 at 7:48

You must log in to answer this question.

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