背景:
阅读新闻
Android自带的toolbox分析及扩展
[日期:2011-03-16] 来源:Linux社区 作者:a345017062 [字体:]
To build busybox
Download the latest version of busybox from the following website. At the time of writing the latest version was v.1.13.3.
the busybox source:
tar jxf busybox-1.13.3.tar.bz2Configure busybox by running menuconfig
cd busybox-1.13.3/
make menuconfigIn menuconfig set the following options
Busybox Settings --> Build Options --> Build Busybox as a static binary (no shared libs) - Enable this option by pressing "Y"
Busybox Settings --> Build Options --> Cross compiler prefix - Set this option equal to "arm-none-linux-gnueabi-"
Busybox Settings --> Installation Options --> Don't use /usr - Enable this option by pressing "Y"Export path to where the cross-compiler is located on the host, for example:
export PATH=/opt/arm/arm-2007q3/bin:$PATH
Build busybox
make
Installing Busybox
--------------------------------------------------------------------------------
To install busybox in the target file-system
Create a /bin directory in the target file-system. For example:
mkdir /<path-to-Android-fs>/binCopy the busybox binary to the /bin directory in the target file-system
cp busybox /<path-to-android-fs>/bin Install the busybox command line tools on the target by executing the following commands:
cd /bin
./busybox --install
Make the Busybox shell the default shell
--------------------------------------------------------------------------------
To make the busybox shell the default shell, edit the file "init.rc" in the target file-system as follows:
Edit the console service so that it runs the busybox shell and not the default shell by replacing:
service console /system/bin/shWith:
service console /bin/shAdd the path of the busybox command line tools to the system path variable by replacing:
export PATH /sbin:/system/sbin:/system/bin:/system/xbinWith
export PATH /bin:/sbin:/system/sbin:/system/bin:/system/xbin
Android使用socket使底层和framework通信
相关资讯 Android教程
本文评论 查看全部评论 (0)
尊重网上道德,遵守中华人民共和国的各项有关法律法规 承担一切因您的行为而直接或间接导致的民事或刑事法律责任 本站管理人员有权保留或删除其管辖留言中的任意内容 本站有权在网站内转载或引用您的评论 参与本评论即表明您已经阅读并接受上述条款
评论声明
最新资讯