-7

Since Android is a Linux-based operating system, I would expect Ubuntu, another Linux-based OS, to support .apk files, but this is not the case.

Why is that?

  • 4
    By Linux, we mean the kernel. Kernel does not handle application management, only low level resource handling and other jobs. So, even if you have the same kernel you can't use this way. Also android application runs on virtual machine actually, not on Linux kernel directly. This is another big difference – Anwar Apr 9 '17 at 19:04
6

First of all, Linux is just a kernel and an operating system like Ubuntu, Debian, etc is something more than that.

Let's say I grab a copy of the Linux source code and then add some new features to it. Now, why and how would other distributions have my changes implemented in their code?

I get a red car, paint it blue; does it make other red cars blue?

As Wikipedia says:

Android Package Kit (APK) is the package file format used by the Android operating system for distribution and installation of mobile apps.

So it has nothing to do with other distributions.

| improve this answer | |
  • 6
    Not to mention that APKs are compiled for the ARM CPU architecture... – You'reAGitForNotUsingGit Apr 9 '17 at 19:00
  • 1
    This has nothing to do with architecture though. If there is ARM version of the OS, then there can be packages compiled for that architecture. Good example is Ubuntu Snappy. It runs on Raspberry Pi or other ARM-enabled devices, so it can use .deb files with program compiled for that architecture. – Sergiy Kolodyazhnyy Apr 9 '17 at 19:15
2

A VW Golf is a car. A VW Passat is a car. Even though they're both even made by the same manufacturer, a VW Golf door will not fit on a VW passat because although fundamentally they are both cars that work off the same combustion engine design, they are not the same thing. Even their engines, which are both combustion engines, are not identical and cannot be used in place of the other.

Linux Kernel is the combustion engine. Each Linux distribution provides its own version. Some (like android) take that kernel and heavily modify it. The operating system you see is the chassis, and while sometimes some car parts can be interchangeable, more often each manufacturer makes their own custom parts.

Basically, not all Linux based operating systems are the same, just like not all cars are the same.

| improve this answer | |
1

All Linux distributions (including Android) require packages formatted the way they can understand them. For example in Ubuntu software packages end in .deb (because Ubuntu is a descendant of Debian and uses Debian's package format):

Build for amd64 succeeded (see BUILD.LOG.amd64):
  linux-headers-4.9.21-040921_4.9.21-040921.201704080434_all.deb
  linux-headers-4.9.21-040921-generic_4.9.21-040921.201704080434_amd64.deb
  linux-image-4.9.21-040921-generic_4.9.21-040921.201704080434_amd64.deb

I'm downloading these three packages for Ubuntu 16.04 right now as I'm typing this message.

These three packages won't install in Android. Packages from Android ending in .apk (Android Package) won't install in Ubuntu.

| improve this answer | |

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