본문 바로가기

안드로이드/ADB & Rooting

How to Install BusyBox on Rooted Android Phone

BusyBox is a single multicall binary that packages the functionality of most widely used standard Unix tools. Follow the simple steps below to install BusyBox on rooted Android device.

busybox

BusyBox combines tiny versions of many common UNIX utilities into a single small executable. It provides replacements for most of the utilities you usually find in GNU fileutils, shellutils, etc. BusyBox provides a fairly complete environment for any small or embedded system.

BusyBox binary highlights
chown, chgrp: change permission ownership.
awk, sed: languages to both process & transform text
grep: a text search utility
du: shows disk usage
vi: a shell based text editor
pidof: return the pid of a running process
less: text reader with back and forward nav
tail: trail the end of a file for activity
gunzip, gzip, tar, bzip2: archival compression software
clear: clear screen
crontab, crond: task scheduling
diff: compare files
httpd: a light webserver
telnet: basic TCP remote login
xargs: use the output of a command as the arguments for another
su: masquerade as another system user
wget: retrieves content from a web server
which: identifies the location of an executable

How to  Install BusyBox on rooted Android device

Step #1 Download BusyBox 1.15.3 built for your phone. Unzip it and place the busybox file in your SDK/tools dir

Step #2 Reboot your android device normally and plug in to your PC.
Step #3 Open the command prompt/console and cd to the SDK/tools dir. At the prompt:

1
2
3
4
5
6
7
8
adb shell
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
exit
adb push busybox /data/local
adb shell
cd /system
ls –al

You’re pushing busybox to the phone rather than the SD card as the SD card is mounted noexec.
if the dir /system/xbin is not there:

1
/data/local/busybox mkdir /system/xbin

 
then use busybox to install busybox

1
2
3
4
5
6
7
cd /data/local
chmod busybox 755
/data/local/busybox cp /data/local/busybox /system/xbin/busybox
cd /system/xbin
chmod busybox 755
./busybox --install -s /system/xbin
rm /data/local/busybox

Yes you’re chmod’ing busybox twice. This is to make sure the permissions work in the /system/xbin folder as well.

Then exit and reboot: