how to install busybox in android using adb

Santhosh picture Santhosh · Feb 20, 2014 · Viewed 29k times · Source

I am trying to install busybox on an android emulator.

I downloaded and compiled busybox and have the busybox binary on my pc.

i then did adb push busybox /data/local/tmp

then did adb shell, then #cd /data/local/tmp , then #chmod 777 busybox, then tried #./busybox --install it says busybox command not found.

I also copied the file to /system/busybox. but ./busybox --install says busybox command not found.

Answer

hayder Jawad picture hayder Jawad · Oct 15, 2014

First do adb push busybox /data/local/busybox to copy the busybox into the android phone system then go to the android shell by doing adb shell. Get the superuser by typing su from you android phone grant superuser request then back to the shell and type

cd /data/local
chmod 755 busybox
./busybox
mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
mkdir /system/xbin
cp /data/local/busybox /system/xbin
cd /system/xbin
busybox --install .
mount -o ro,remount -t yaffs2 /dev/block/mtdblock4 /system
sync
reboot

Note: /dev/block/mtdblock4 may not be the /system partition on every device or emulator. It's best to execute the 'mount' command without parameters first in the shell, and look which device or partition is mounted as /system.