Compile, Install, Run Linux Apps on Android

The advantage of using a POSIX based mobile OS is that you can run and install any Linux applications on your mobile (smartphone) with ease. And thanks to Open Source, its even easier to Compile, Install & Run Linux Applications on Android.

To get basic Linux apps running on Android, you need BusyBox. To give you some background, BusyBox is a software application that provides many standard Unix tools, much like the larger (but more capable) GNU Core Utilities. BusyBox is designed to be a small executable for use with the Linux kernel, which makes it ideal for use with embedded devices. It has been self-dubbed “The Swiss Army Knife of Embedded Linux”.

Using this guide, you’ll be able to:

  • Compile Linux C, C++ app directly on Android
  • Install, Run Linux apps on Android.

How to Compile, Run Linus Apps on Android

Step 1. Install BusyBox from Play Store (requires root). If you don’t have Root access, you can follow steps mentioned in the video which involves adb push for busybox binary to /data/ and setting permissions.

BusyBox would allow you to install various Linux apps on Android coz BusyBox is bundled with all the runtime dependecies.

Step 2. To make your environment even more capable, lets go ahead and install BostBrew Basil from Play store.

BostBrew Basil bootstraps the base system and do some basic package management by using uses Dpkg and Apt instead of Opkg. This will let you install various linux packages, this is where BostBrew shines.

Step 3. Install Linux apps using APT Package manager

To install apps using apt package manager, all you need to do is:

apt-get install gcc g++

This will install gcc, g++ compilers and you can specify any other package name and ARM version should be automatically installed to your android.

Step 4. Compiling C, C++ source code on Android

Compile any source file using g++ and run it:

g++ ./sourceCode.cpp

That’s it. You’ve successfully compiled and run your own C code.

You can watch the video below, it essentially covers the same steps in an easy to follow tutorial:

We write latest and greatest in Tech GuidesAppleiPhoneTabletsAndroid,  Open Source, Latest in Tech, subscribe to us @geeknizer OR on Facebook FanpageGoogle+.

VN:F [1.9.22_1171]
Rating: 6.6/10 (17 votes cast)
VN:F [1.9.22_1171]
Rating: +2 (from 6 votes)
Compile, Install, Run Linux Apps on Android, 6.6 out of 10 based on 17 ratings
Filed in: Android Tags: , ,

Related Posts

Bookmark and Promote!

© 2018 Geeknizer. All rights reserved. XHTML / CSS Valid.
Designed by taranfx.