10

As long as a 64 bit CPU is supposed to execute 32 bit programs, it is sometimes hard to know which one do I have installed on my device.

There are programs that require this knowledge, like the Xposed Framework installer.

What could be considered the proper method, whether be it ADB, command-line or software?

I used to do on desktop Linux:

 sudo uname -a

Maybe there is some equivalent for Android?

Further data:

  • Some programs that should inform about this are not clear enoguh for me. This is a example of some AIDA64 report. Even when it shows 32 bit, is this info about the operating system? I would say it is just about the hardware:

    (Click image to enlarge; my AIDA64 is in Spanish)

    IMG: AIDA64 report example

Question extended to this other

Sopalajo de Arrierez
  • 601
  • 5
  • 12
  • 20
  • What device do you have? – New-To-IT Oct 22 '15 at 20:08
  • See this page: https://software.intel.com/en-us/blogs/2014/12/16/how-to-identify-the-image-is-32-bit-or-64-bit-user-space It says to see the property ro.product.cpu.abi and the related ro.product.cpu.abilist32 and ro.product.cpu.abilist64 in the output of getprop. I don't have a 64-bit device so I can't test few things. There is also a similar question on Quora here. – Firelord Oct 22 '15 at 20:11
  • @New-To-IT , I have multiple Android devices. And, as a computer scientist, I use to work with several different models. Finding a generic method (or, at least, as generic as possible) would be preferred for me. Specifying a device would transform this question in "How can I guess if the installed Android version for my [Brand][Model][Number] is a 64 or 32 bit one?". – Sopalajo de Arrierez Oct 22 '15 at 20:16
  • @Firelord : thanks for the link. It seems related to "current device", not "current installed Android version". Would it be the same? – Sopalajo de Arrierez Oct 22 '15 at 20:18
  • When it comes to desktop, if you run a 32 bit kernel on a 64 bit machine, the kernel simply says the machine is a 32 bit. Things might have changed (I don't know the current scene) so that's as far as I can tell. May be others can provide a better input. – Firelord Oct 22 '15 at 20:21
  • @Sopalajo de Arrierez Have you tried Antutu benchmark app? It displays the 32/64 bit information for all devices. ;) – Lucky Oct 22 '15 at 20:21
  • 1
    @Lucky: I have tested AIDA64, and some others tools that report the 32/64 bit information, but none of them sets clear if they are talking about the operating system or the hardware. Added a capture screen to my original question to show. – Sopalajo de Arrierez Oct 22 '15 at 20:57
  • Related, if not a dupe: http://android.stackexchange.com/q/36291/44325 – Andrew T. Oct 23 '15 at 20:29
  • @AndrewT. : I don't think that question to be a duplicate, as long as it is asked on 2012, when there were no 64-bit hardware for Android devices. It just ask if the Android (the existing then) operating system is a 32 or 64 bits softwarre. – Sopalajo de Arrierez Oct 23 '15 at 21:02
  • I'm not really sure either if that's a dupe (that's why I didn't vote to close), but when I researched about this, I never encountered such term as Android OS 64-bit, compared to other OS like Windows (x64). All I found was that it only depends on the CPU architecture, and Android L is the first 64-bit OS. Unless that's what you meant, or I'm missing something about 64-bit OS vs CPU on Android, please enlighten me. – Andrew T. Oct 24 '15 at 03:30
  • (con't) Other than that, I also never encountered download images for Android with specific bitness (32 or 64), unlike Windows or Linux OS (x86 vs x64). – Andrew T. Oct 24 '15 at 03:36
  • Well, @AndrewT. maybe we should start another thread (or change this one) with the title "Is there a 64-bit Android version and a 32-bit one?". Another way to ask it: "Could a 64-bit hardware device run a 32-bit Android version?". Some times the problem is the question, more than the answer. – Sopalajo de Arrierez Oct 24 '15 at 04:05
  • I think that's a good idea, since it seems it's easier to have misunderstanding between bitness in Android OS (using SoC) than other OSes (at least I was confused with this topic when researching). But don't change this question since it already has an answer. Either extend this, or post a new question and refer to this question. – Andrew T. Oct 24 '15 at 04:22
  • Modified the original question to extend it to the new one, @AndrewT. – Sopalajo de Arrierez Oct 24 '15 at 16:32

1 Answers1

10

uname -m will display the architecture of the running kernel. This is different than whatever your hardware may be capable of running.

Unfortunately, you have to know which architectures are 32-bit and which are 64-bit. But you can easily find this out.

For example, my m7 displays arm7l. A quick search confirms that this is a 32-bit architecture, meaning that my running kernel was compiled as a 32-bit executable.

Paul Ratazzi
  • 949
  • 9
  • 22