Making life easier with busy box.

ivyvisors

Senior Member
Dec 29, 2010
233
52
Hi everyone,

Here's some tips of what you can do to make your life easier with busybox. As the wikipedia page says:

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".

There is a good version of busybox that can be downloaded using Titanium Backup. Or from their site you can download it from their site here.

More information on how to install it can be found at the titanium back up troubleshooting faq.

Anyway, lets say we've got busybox installed. Now to get a list of all of the commands just type busybox and press enter (this is via adb shell) and you'll be presented with all of the commands built into busybox.

To run one of these commands, we'd normally type:

busybox <command>

where command is the command you wish to run. Now it gets tedious having to type busybox before every command. But there is a solution!

First we need to mount system read write with the following command:

mount -o rw,remount -t yaffs2 /dev/block/mtdblock1 /system

now we need to change to the system/bin directory (bin is where all our command line applications and commands live.)

Using the command ln (link) we can create softlinks to the busybox binary with the name of the command we wish to run. Busybox recognises this and will run the correct command.

So for example tar. We'd need to run the following command:

ln -s busybox tar

now we can just type tar instead of having to type busybox tar.

Now we can repeat this for any of the other missing commands, and once you're done remember to mount system back to read only with:

mount -o ro,remount -t yaffs2 /dev/block/mtdblock1 /system

Hope this helps some people out.

Remember to have fun.

~Ivy
 

ivyvisors

Senior Member
Dec 29, 2010
233
52
Ta,

It's just something I'm used to doing, and thought hey it needed a little writeup =)

~Ivy
 
Top