Compile, Install, Run Linux Apps on Android

Compile, Install, Run Linux Apps 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:

su
bostbrew
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
./a.out

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



Read more: http://geeknizer.com/install-run-linux-applications-on-android/#ixzz3QllaLH2h

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值