Pokemon Go is releasing today but sadly I saw somewhere in the Internet stating that Niantic has claimed that the app is not supported by devices with intel processor (in my case asus zenfone 5). So I wonder why the type of processor will be one of the factors determining whether the app is compatible for the device. Any help is appreciated. =)
-
Apart from portable Dalvik code, an app can provide precompiled libraries in a native format, compiled for a specific CPU architecture. Intels CPUs are all x86/x86_64 but some developers decide to only compile for arm/arm64 and leave users of devices with Intel CPUs with an imconpatible app (although there is a way to at least get those to work on Genymotion). – GiantTree Jul 06 '16 at 16:04
-
@GiantTree thanks for the explaination. But does that means that this is merely caused by compilation by developers? As I am a software engineering student I am interested in this matter and am worried if I had accidentally made my app uncompatible for certain devices just because the decision made during compilation. – Han Lim Jul 06 '16 at 17:33
-
2It's also depending on the code/other libraries used. Depending on how the developers used native functions, some of them might not be available on x86. Sometimes the compilation for arm is already long enough, that a developer does not want to wait longer just because of x86. Also: Apart from the ZenFone, no major device uses x86, they all rely on arm. – GiantTree Jul 06 '16 at 17:36
-
@GiantTree sorry for disturbing you again but, is there any way for intel processor devices to run those apps which are incompatible to the processor like pokemon go? Will rooting do the work or any other suggestion? – Han Lim Jul 07 '16 at 00:21
-
You will need an ARM Translation package / libHoudini, but after some testing, the only way to get Pokemon Go working is to use an ARM image of the AVD. Neither Genymotion nor the x86 images work. – GiantTree Jul 07 '16 at 00:25
-
I also have Intel (ZF2). Didn't work for me either. After the Niantic logo, I just get a black screen. It works on my ARM Samsung, though :) – Fiksdal Jul 07 '16 at 20:41
-
@Fiksdal yea same issue, the game is running without properly on my xperua z1. Hopefully new solution can be found or niantic can solve it asap for the sake of zenfone users – Han Lim Jul 08 '16 at 01:07
1 Answers
Note: This answer covers other apps than Pokémon Go, as Pokémon Go has been updated to work with x86 processors
Apps contain multiple architecture dependent and architecture independent parts:
Independent:
- Dalvik code
- Android resources
- the Manifest
Dependent:
- Libraries
- Special assembly code in the Dalvik executable (rare but possible)
The major things are the libraries.
Those are shared objects (.so files) much like DLLs on Windows that contain bytecode.
They are compiled using the Android NDK (Native Development Kit) and are compiled for a specific architecture (like compiling Linux applications using a cross-compiler, ie. compile ARM code on an x86 machine).
In our example, this library can only be used in an ARM environment were the ARM bytecode is understood.
Some Android x86 devices (commercial phones/tablets, not the emulators) come with a special ARM Translation toolkit, aka. libhoudini. It basically translates ARM instructions to x86 instructions.
Those instructions however, are not optimized to run on x86 hardware and thus result in poor performance and high battery usage (the latter of those is one reason x86 is not primarily used in mobile processors).
The real problems are the developers:
Either:
They do not compile their libraries (often containing proprietary code) for any other architecture, for some reason.
They use specialized bytecode, only available on ARM so that any ARM Translator or libhoudini fails.
Luckily Pokémon Go received an update, allowing users of x86 devices to run the app, but other apps (mostly games) do require a real ARM device.