Android devices have different processors like ARM and Intel processors. Can Android apps run just the same regardless of which architecture the device has? Or are there apps that will only run on ARM-architecture, etc?

  • 1
    Far as I know, libraries can be arch-depedant, not softwares.
    – SarpSTA
    Dec 26 '15 at 14:48

Yes, applications (APKs) are independent of the architecture.

Android is made up of 4 major levels. Android Architecture

The apps you write is compiled into Dalvik EXecutable (DEX) code, which is finally converted into assembly code (according to the required architecture) by the kernel to send to the processor.

So, the kernel is the final one that's responsible to act according to the required architecture and it's compiled by the ROM developer accordingly.

The DEX code is always independent of the architecture, so that application developers needn't worry about the type of processor.

  • Gokul, hi, is that where JIT compiler comes into play? At least for android 4.x and dalvik runtime ?
    – moonbutt74
    Dec 26 '15 at 19:54
  • 1
    @moonbutt74 JIT is used during compilation (dynamic codes may or may not compile) and finally converted into corresponding DEX code which is processed accordingly by executing. More info here: m.pocketnow.com/2012/09/11/what-is-jit
    – Gokul NC
    Dec 27 '15 at 3:47
  • So there is actually some sort of local, device-specific compilation going on as the app is being installed on any given device?
    – Fiksdal
    Dec 27 '15 at 10:56
  • Regarding the question in my last comment, the top answer here answers it very well: android.stackexchange.com/questions/82978/…
    – Fiksdal
    Apr 4 '16 at 5:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.