Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Linux apps be run in Android?

Tags:

linux

android

Android is based on Linux; can native Linux applications be run on Android?

like image 644
Prabhu R Avatar asked Oct 28 '09 12:10

Prabhu R


People also ask

Can Android x86 run Linux apps?

While a reliable option, Anbox isn't the only way to run Android apps on Linux. Other Android emulators for Linux are available. There are also two Android-based operating systems compatible with x86 computers which will let you install Android apps: Android-x86.

Why can't Linux run Android apps?

In order to get an Android "distribution" running under Linux, your kernel first needs to be implementing a number of those features. Actually integrating with a Linux desktop is harder still. The graphics subsystem isn't compatible with X11, so there's no way to draw an Android app to a standard Linux desktop.

Can I run Ubuntu on Android?

You're in luck — you can install a Linux or Ubuntu desktop environment on virtually any modern Android device. You could even combine it with a Bluetooth keyboard and mouse (and maybe an external display) for a powerful desktop-grade experience.


2 Answers

In general, no. Android apps generally run in a sandboxed Java-like virtual machine, so have to be written in Java or some language that compiles to virtual-machine bytecode that use the Android API.

However, the virtual machine does run on top of the underlying Linux OS, and there are ways to call native code. See https://developer.android.com/tools/sdk/ndk/index.html

So, while it is technically possible to run native Linux programs, as there is a Linux kernel running beneath everything, most users would not be able to install such applications or use them. (If you have root access or are building your own firmware, then you can do whatever you want.)

like image 109
4 revs Avatar answered Sep 18 '22 07:09

4 revs


Yes you can. I have installed a complete Debian distribution in a chroot-jail enviroment using debootstrap. (You need a rooted device) I am now running ssh, apache, mysql, php and even a samba server under android on my htc-desire with no problems. It is possible to run x applications using a remote x server via ssh. It even runs openoffice.org and firefox. You can use this: http://code.google.com/p/android-xserver/ to run X-application on localhost but my HTC-desire has a to small screen to be productive :-) But it might be usefull on a Eee Pad Transformer or something like that.

like image 35
Chris de Vries Avatar answered Sep 18 '22 07:09

Chris de Vries