2

Firstly, I searched (a lot) and I'm confused about my Android architecture.

The main ways that I used are:

  1. The uname -m command says that I'm using armv8l.
  2. The dpkg --print-architecture command says that I'm using arm
  3. The lscpu shows this output:
~ $ lscpu
Architecture:           armv8l
Byte Order:             Little Endian
CPU(s):                 8
On-line CPU(s) list:    0-3
Off-line CPU(s) list:   4-7
Vendor ID:              ARM
Model name:             Cortex-A53                                              Model:                  4
Thread(s) per core:     1
Core(s) per socket:     4
Socket(s):              1
Stepping:               r0p4
CPU(s) scaling MHz:     79%
CPU max MHz:            1586.0000
CPU min MHz:            0.0000
Flags:                  half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 id                        iva idivt lpae evtstrm aes pmull sha1 sha2 crc32
  1. The cat /proc/cpuinfo shows this output:
~ $ cat /proc/cpuinfo
processor       : 0
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt lpae evtstrm aes pmull sha1 sha2 crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd03                                                     CPU revision    : 4

processor       : 1
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt lpae evtstrm aes pmull sha1 sha2 crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd03                                                     CPU revision    : 4

processor       : 2
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt lpae evtstrm aes pmull sha1 sha2 crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd03
CPU revision    : 4

processor       : 3
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt lpae evtstrm aes pmull sha1 sha2 crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd03
CPU revision    : 4
  1. AIDA64 (Device info app) shows me in the CPU section:

enter image description here

And lscpu says that I'm using Cortex-A53 model, and according to Cortex-A53 it's says that I'm using ARMv8-A 64-bit.

So, I don't know exactly what my Android arch is, like when I install node.js or other packages or binary files, do I install it in armv7l or armv8 (arm64) from node.js dist?

And I know installing node.js manually in Android is not really supported, or I don't know how to do it.

If anyone has a question, I'm ready for answering.

Thanks for all.

iTzVoko
  • 135
  • 2
  • 10

3 Answers3

5

The other answers are right, but here is some more background that may help your understanding.

The original ARM architecture was 32 bits. Starting with ARMv8, a 64-bit instruction set is also supported. ARMv8-A CPUs are supposed to support both modes, so such a chip effectively gives you two architectures in one. Generally arm or aarch32 refers to the 32-bit mode, and arm64 or aarch64 for the 64-bit mode.

The armv8l mode in uname means your kernel is built to run on an ARMv8 chip in its 32-bit mode. (A kernel built for the 64-bit mode would say arm64 here.) The l stands for "little endian"; the architecture supports both little-endian and big-endian modes, with little-endian being much more widely used. armv8b would be 32-bit big-endian mode.

The lscpu and /proc/cpuinfo data are directly querying the capabilities of your CPU hardware. The Cortex A-53 is a full ARMv8-A implementation and they are correctly telling you that it physically supports a 64-bit mode.

The uname -m and dpkg --print-architecture commands are querying the operating system, not the hardware. So they say you are running a 32-bit kernel and OS. Thus you are not able to use the 64-bit mode with this kernel/OS install. For all intents and purposes, right now you have a 32-bit arm / aarch32 CPU.

The ARMv8 architecture is backwards compatible with ARMv7, so your armv7l node package will run on it. The armv8/arm64 package will not, unless you want to reinstall the entire OS first.

Nate Eldredge
  • 48,811
  • 6
  • 54
  • 82
  • Thanks a lot for you Nate, you the only one who answer me the full answer, even about Cortex-53 and why commands say different things. I understand from you that armv8l it's an ARMv8 but in 32-bit mode, So why it's not saying armv7 instead of armv8l? Is armv8l architecture can be enabled on 64-bit mode but armv7 can not? Thanks again. – iTzVoko Sep 13 '22 at 08:16
  • 1
    @AliAyed: It is true that an ARMv8 CPU does support a 64-bit mode (if you install an operating system written for that mode) and ARMv7 does not, but that isn't the reason why `armv7l` and `armv8l` have different names. Even running in 32-bit mode, an ARMv8 CPU has features that an ARMv7 CPU does not, e.g. guaranteed support for [Neon](https://en.wikipedia.org/wiki/ARM_architecture_family#Advanced_SIMD_(Neon)), and the `armv8l` architecture tag tells you those features are present and usable within your current 32-bit operating system. – Nate Eldredge Sep 13 '22 at 13:40
1

armv8l is 32 bit mode in 64 bit CPU, dpkg goes to arm if your have this cpu, but not lscpu and uname because they checking system arch

0

It's an aarch32-only architecture without the aarch64 ISA.

Jake 'Alquimista' LEE
  • 6,197
  • 2
  • 17
  • 25
  • So do I've to download Node.js armv7l or armv8? and why my AIDA64 app says `instructions set: 64-bit ARMv8-A (32-bit mode)? – iTzVoko Sep 12 '22 at 12:08