Install busybox for goldfish/phone

  1. Download busybox source code

http://www.busybox.net/

  2. Decompress busybox

$ tar xvf busybox-1.21.0.tar.bz2 -C ~/Android/
$ cd ~/Android/busybox-1.21.0

  3. Correct the cross compiler

$ vim Makefile// add the compiler following CROSS_COMPILECROSS_COMPILE ?= arm-linux-

  TIPS : You must got an cross compiler already.

  4. configure busybox

$ make menuconfig

  If we would like to use the busybox on other platform, we should choose the following option :

Busybox Setting --> Build Options -->[*] Build Busybox as a static binary (no shared libs)

  And we don't want the busybox install in our localhost system :

General Configuration -->[*] Don't use /usr

  Cross Compiler prefix

Busybox Setting --> Build Option -->(arm-linux-) Cross Compiler prefix

  TIPS : Check your cross compiler export path, if not, you should enter the complete path into Cross Compiler prefix.

  Save configurations.

  5. Compile the busybox

$ make     

  Wait a minute, there would be a new executable file : busybox

  6. Push busybox to you emulator/phone

$ adb push busybox /data/busybox

  7. Export the path to busybox

$ export PATH=$PATH:/data/busybox

  TIPS: /data/busybox directory must already exist

  8. Install busybox

  (1) make install in localhost

$ pwd~/Android/busybox-1.21.0$ make install

  (2) push the /bin to emulator/phone

// adb shell/# mkdir /data/busybox/bin// local host$ adb push _install/bin/ /data/busybox/bin/
 (3) export the PATH in init.rc
 TIPS:
 This part we shoult not edit the init.rc directly, the init.rc was loaded by ramdisk.img. It is no use to change init.rc on the rootfs. We can change the init.rc by gunziping the ramdisk.img and rebuild it.
 More details check :
http://blog.csdn.net/pansing/article/details/7565923
    
 Or just copy the file to "/system/sbin/".





更多相关文章

  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. Unity3d - Android Build : Android SDK
  2. Android2.2 官方下载地址
  3. Android写本地文件
  4. Use adb on Mac OS
  5. android日历实现__GO桌面版&&开源收藏版
  6. Android(安卓)JNI Java参数类型与本地参
  7. android音频架构
  8. Android(安卓)解决启动页白屏或者黑屏的
  9. Android--Alarm,定时闹钟
  10. Android百度地图知识汇总