Compile, Install, Run Linux Apps on Android

To get basic Linux apps running on Android, you needBusyBox. 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 installBostBrew Basilfrom Play store.

BostBrew Basil bootstraps the base system and do some basic package management by usinguses 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

更多相关文章

  1. 代码中设置drawableleft
  2. android 3.0 隐藏 系统标题栏
  3. Android开发中activity切换动画的实现
  4. Android(安卓)学习 笔记_05. 文件下载
  5. Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
  6. 技术博客汇总
  7. android 2.3 wifi (一)
  8. AndRoid Notification的清空和修改
  9. Android中的Chronometer

随机推荐

  1. 常用网址
  2. android下使用i2c-tools工具
  3. Android(安卓)Retrofit实现上传头像(仿京
  4. android利用OpenGLES开发动态壁纸用到的G
  5. xml解析(一) XmlPullParser的使用
  6. 基于Android的推箱子小游戏 源码
  7. 【android】查看软件布局神器Hierarchy V
  8. Android之MIME TYPE
  9. H5调android 的方法修改UI无效
  10. cocos2d-x 编译成android apk常见错误