I'm wondering why Android apps won't be able to be run natively on Ubuntu Touch. I mean, isn't it all just Linux?

  • 1
    Desktop environment is a big factor in what an application is compatible with. – Patrick C. James Oct 10 '14 at 15:26
  • 8
    This is actually quite a good question. Nooby indeed, but very valid. Have an upvote. – don.joey Oct 10 '14 at 15:38
  • I concur with @don.joey since this isn't something easily researched beyond a "yes" or "no" type of conclusion. – MGodby Oct 10 '14 at 15:42
  • There was some interesting discussion on the latest ubuntu live, that covered much of this topic: youtube.com/watch?feature=player_embedded&v=etMduYRRwDc 25:00 27:10 52:45 54:47 55:20 <time stamps on some relevant points – Mateo Oct 10 '14 at 16:05
  • Isn't it also an issue that they likely have different CPUs? – Kevin Fegan Oct 10 '14 at 19:17

The short answer is "no."

Strictly speaking, the Linux kernel provides little more than a direct interface to the hardware it is running on. There is an entire stack of additional Android-phone-specific APIs, programs, applications, etc. on which Android applications depend. Additionally, Android does not run on a generic Linux kernel, but instead runs on one that has been highly customized by Google with the specific purpose of running their OS.

Even if it is technically possible to reproduce the entire stack required for Android applications to run on another system, it would be bloated and extremely inefficient.

  • 3
    Right - running a set of phone libraries on a desktop that's 10 times more powerful is extremely inefficient? We've been running mobile phone emulators on desktops for a decade now. – MSalters Oct 10 '14 at 23:16
  • 3
    I answered on the premise that the asker meant natively, i.e. without emulators or virtualization. – MGodby Oct 11 '14 at 0:34
  • 5
    @MSalters An emulator would use more resources to produce the same output compared to a native program. That's pretty much the definition of inefficiency. And the Android Emulators are particularly slow in my experience. – jmathew Oct 11 '14 at 4:33
  • 1
    @jmathew From a developer's perspective (at least mine) one benefit to that is if an app runs reasonably well in an emulator on a slowish machine then it will perform reasonably well on the piles of low-end bargain phones out there. – zxq9 Oct 11 '14 at 9:24
  • 2
    @jmathew I think what MSalters was trying to say was that when it has been practical for several years to use an emulator, then there is no way that running the same thing natively could be inefficient. – kasperd Oct 11 '14 at 14:11

Nokia n900 runs maemo witch is a linux os and yet it can run android's app via the dalvik environement wich was develloped for it but never put on market or repisitories. Why? Only the society who developped the dalvik for n900 knows. Now there was another initiative call apkenv. Seems there's was not so much thing's to add to make the n900 running some android games and no matter about the gpu or cpu power or maemo's desktop the apps run there some lake like in any emulation but some runs perfectly some not. So about ubuntu touch it is not question of technic (may be i am wrong but one official ubuntu's touch phone is a xiaomi wich is used for android too so hardware is nor a problem in this case) but will and law thout that google won't be happy that ubuntu runs android app and use the google play as second repository (note that is is possible to download the .apk as .deb and install after).

The answer to your question is a BIG NO.

Android is completely different from Ubuntu Touch although android is based on linux kernel but that does not mean that the native applications of android can run on linux and vice-versa.

The similarity in kernel between different OS doesn't make their applications executable on these different OS. Kernel is the lowest software layer of a system. Above kernel lies user space which consists of system software and application interface.

OS with the same kernel may have entirely different user spaces and native applications execute in a particular user space.

Moreover, Android apps are developed usually using java and android apps execute in a runtime environment (Dalvik or ART) which takes bytecode from JVM as an input , whereas linux applications are directly converted into machine code upon compilation.

Applications developed for android using C++ cannot be executed in linux environment directly rather they have to be compiled first for linux systems.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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