top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration
Print Preview

Running a linux application on android plateform

+1 vote
133 views

Is it possible to run a linux application on android platform....

posted Apr 1, 2013 by Salil Agrawal

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button
Depends. What are you trying to do?

7 Answers

+1 vote

On Android: not directly.*but* You can run whole Linux distro on Android in light-weight virtualization (chroot).
My friends runs whole Debian-ARM on rooted Android in chroot and access the VM using VNC, so he has full-scale Linux desktop applications on his phone. It works best with pen stylus (on Galaxy Note) or with desktop-class display (20"+; via MHL cable) and keyboard.
It can also be done on convertible tablets (aka ASUS transformer). Basically what happens is that Debian Linux and Android share the same Android-Linux kernel and use Android drivers, that come with your
device, but have 2 different operating systems (userspaces) on top of a single Linux kernel. "chroot" feels like virtualization (VMware/VirtualBox), but it is more light-weight type.
The reverse is also true: if you have a Windows PC and wanna virtual Android: there is a "blue-stacks", that emulate an Android tablet on Windows PC.

answer Apr 2, 2013 by anonymous
Ohh, BTW: it is *very* difficult to setup "chroot", so only a Linux expert could help you...

+1 vote

You seem to be misunderstanding something:

Android is *basically* Linux. Sure, there are kernel mods, binary firmware, etc... But at the core, you're dealing with a Linux kernel.
The question of "can you" run a Linux application is typically "why not?" However, you may be asking a different question. Maybe you're asking "can I run a KDE application?" "Can I run an X application?"
The answer is "not easily", because Android differs in the way it implements most higher level (above the kernel) operations: Dalvik is at the core of most everything, beyond a few core operations and
daemons.

The second question is, *why* would you want to run a linux app on an Android device? Typically, it makes no sense to run a "linux app" on an Android device, unless you want to view the device as a desktop
morally. At this point, Android is not "just another distro", and is a distinct programming environment. Most batch programs from the old *nix world don't make sense, because you rarely interact with the
filesystem, raw sockets, IPC, etc... Furthermore, you typically want to run as little as possible outside of the Android framework, because that framework was designed around the platform (deviating from it is
asking to kill the battery..).

If you can pull out a good use case ("I want to run Eclipse on my tablet" is a *bad* use case...) then maybe others here can clarify..

answer Apr 2, 2013 by anonymous
I disagree. This is a good and valid use case.And if future ARM chips become stronger, with 64-bit and 8 GB of RAM, turning them into a Linux (KDE) desktop will become feasible and recommended.

0 votes

Put the linux related so files(glibc based) to /lib/ directory, then you can run the app.

answer Apr 2, 2013 by anonymous
0 votes

I'm nto sure what you're talking about: chroot is a common unix utility that allows you to run inside another environment with respect to the file system operations. This has nothing do with
virtualization, other than that it may be used in implementing sandboxing.

answer Apr 2, 2013 by anonymous
0 votes

Please illustrate how you would make an Android system fit with a compiler toolchain, given the number of tools you'd have to change.

Consider specifically the permissions and security model, how you plan to accomodate installing required packages and build managers on an Android. Also consider that the use case for Android is battery
constrained devices.

The use case for Android's process model is heavily based around the concept of ephemeral processes that fit into the "app" perspective. Saying you want to run Eclipse on your tablet is no more feasible in
today's world than saying you want to do program development in your browser. (Maybe you do, but it's not realistic to say it's quite possible yet..)

While I don't disagree that maybe everything will change, and eventually Android will become a "Linux on a tablet" distro, that's not how it works today. Just try for yourself thinking about how you would port those programs over to Android, and see what problems you run into. Then consider that when you are doing development, you usually need root privileges. Sure, you can get these on hacked distros, not vanilla Android.

If you disagree, please try to show how your use cases of desktop apps on Android (which, in my mind, implies you misunderstand Android's design) makes sense, and how you would solve these problems.

(The converse also holds, many Android apps don't make sense to run on a desktop..)

answer Apr 2, 2013 by anonymous
0 votes

Basically I imagine a hybrid device - tablet/laptop. When in tablet mode it runs pure Android (like Nexus 10), when in laptop mode it run Android + Debian (in chroot).Also I imagine, that when in Laptop mode
it is plugged into wall power. Any CPU will do (Intel or ARM). The Linux apps (Eclipse) will run inside a Debian container, when in laptop mode.
The good news ? Such device already exists: ASUS Transformer (laptop/tablet hybrid)
Hardware: It just needs more RAM, 8 gigs is recommended for a modern Linux workstation, so a future ASUS transformer will do, perhaps on ARM-64 chips. But very basic Linux machine with 1 gig of RAM will
do... (on current ASUS transformer) Debian runs inside chroot container and Android as host OS. Access to Debian is via SSH terminal + VNC for GUI (X11).
Debian runs real desktop-class browsers: FireFox and Chrome (well, IceWeasel and Chromium...) and a real office: LibreOffice and full development environments (Eclipse, KDevelop, LAMP ...) and full
desktop: KDE (and others).
With some trickery it may even become fully integrated: you could answer Android calls from Debian desktop, send SMS messages, have clipboard integration, shared contact list, shared filesystem folders,
etc...
The problem: ASUS currently runs only Android, and installing Debian on it is very tricky and way out-of-reach for majority of users. This needs to become simple. Plus integration between GNU/Linux Debian and Android must be developed (it is non-existent, except for TCP/IP networking). Running Debian on a pure touch-device is next to useless: a physical keyboard is required for many of its functions. (ASUS have
it)

answer Apr 2, 2013 by anonymous
0 votes

I understand the idea, but what you're suggesting has nothing to do with Android: it's just virtualizing a Linux desktop on an Android device.

Because this list deals exclusively with Android development, I don't see how it's relevant. The OP's question deals with running Linux programs on an Android tablet. My point is that usually this makes no sense: telling people that they should turn their Android device into a laptop by virtualizing Linux on it certainly doesn't sound like a "normal" thing to do in any capacity.

answer Apr 2, 2013 by anonymous
Similar Questions
0 votes

I have a android app and want to run it on Linux. Any clue how to achieve this???

+1 vote

How to create an application like button savior that display a button or a group of buttons on the screen when we turn them on PERMANENTLY. I tried to found solution for it but i failed. Please provide the solution for it or any example

+4 votes

How do you avoid memory leaks in an android application?

+1 vote

How do you port Android application to Kindle Application?
Is it easy or difficult?


Useful Links with Similar Problem
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#470/147, 3rd Floor, 5th Main,
HSR Layout Sector 7,
Bangalore - 560102,
Karnataka INDIA.
QUERY HOME
...