8

I see that there are some projects about installing Linux on an Android Device, but how is the Hardware support?

If I install linux, can I have access to the hardware via Python, like in Android?

Mascarpone
  • 221
  • 1
  • 3
  • Bad/limited, Have you run A linux distro in a VM?, that's about as fast as you will get on these projects. – Uri Herrera Oct 31 '11 at 01:21
  • 2
    Nit-pick: Android is Linux. It's easy to tell you're meaning an alternative userland, to get a classic "Linux district". I don't often agree with RMS wanting everyone to sat GNU/Linux, but with Android it highlights the distinction. – Andrew Aylett Oct 31 '11 at 08:52
  • You can enter the android shell by installing the Android SDK on your PC and running the Android-Debug-Bridge (adb). The closest you can get to a linux environment from within your device is by installing a terminal emulator (there are some in the Google Market), of course if you wish to gain super user privileges you will need to root your device. – svarog Jun 23 '12 at 08:04
  • @AndrewAylett Android is not linux sorry! That is a very common pre-concept everybody gets wrong! From the aspect of license differences - the entire Linux from the definition of a "Linux Distro" is GPL, with lots of userspace binaries. Android is covered under Apache, using Linux kernel (which is a very small part of Android) and very minimal userland binaries, most of the command line stuff under Android is busybox and also, its a Dalvikvm from bootup and that's why. – t0mm13b Aug 17 '12 at 23:19
  • 1
    @t0mm13b: let's be clear on the distinction. Linux refers only to the kernel, Android uses Linux kernel and that's why Android is Linux. What it's not is that Android is not a GNU/Linux, as most linux distros comes with tools written by the GNU project, but GNU project is distinct from the Linux project (GNU project originally was written for their own kernel, the GNU Hurd, which was a total failure). – Lie Ryan Aug 18 '12 at 06:55
  • If you believe that Apache-licensed components makes Android not a Linux, you'd probably be surprised that most major (desktop) Linux distros aren't pure open source, much less GPL or GPL-compatible, the ones that are (e.g. debian), are the exception, not the rule. A common misconception is thinking that Linux is an operating system, it's not, Linux is not an OS, it's just a kernel for an OS. An OS consists of kernel and some userspace tools (although not everyone agrees on what parts of the userspace are operating system and what's not), Linux does not come with any userspace tools. – Lie Ryan Aug 18 '12 at 07:04
  • @tomm13b after a second reading of your comment, I came to realize that I think you're actually not incorrect, just the way you phrased your word seems highly ambiguous, and could be easily misinterpreted, one interpretation of which is blatantly incorrect, but the other is not incorrect. – Lie Ryan Aug 18 '12 at 07:16
  • @LieRyan all too often the word "Linux" implies a kernel and userland binaries that makes up "Linux". The reality, is only geeks like you and me could have unwittingly started a flamewar a lá vim vs emacs. Am not being sarcastic or smart, but its the definition of the word Linux seems to be thrown about wildly. Here's one example, Samsung Wave's Bada 2.0, its Bada, but it runs Linux kernel, does not make all of that Linux, when really its Bada. That's the distinction, same way as Android - its Android, small part is Linux kernel. Nothing more :) – t0mm13b Aug 18 '12 at 12:34

2 Answers2

4

Technically you don't "run Linux on Android". In fact, every Android device runs "under" Linux (That is, Android uses the Linux Kernel). What happens when you install a Linux distribution (I think that is what you meant by refering to Linux) on Android is that the Android OS and the Linux dsitribution share the same Kernel. Even if you replace the Android installation with a pure (GNU/)Linux one, the used Kernel is "the same".

Therefore the HW API calls are identical, and you can access the hardware from e.g. Python without any difference.

Flow
  • 18,464
  • 16
  • 79
  • 138
1

An Android app now allows device users to add custom versions of multiple Linux OS.

Andronix allows unrooted Android users with > 2.5GB free and Termux on Android 5.1 or newer to install Ubuntu and other Linux OS with Xfce, MATE, LXDE, LXQt, and KDE desktop environments. The basic app is free and runs on devices with ARMv7, ARM64, and x64 CPUs; the publisher sells customized Linux distros through the Google Play Store.

K7AAY
  • 278
  • 1
  • 5
  • 17