Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to install busybox in android using adb

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.

like image 808
Santhosh Avatar asked Feb 20 '14 07:02

Santhosh


1 Answers

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.

like image 54
hayder Jawad Avatar answered Sep 28 '22 16:09

hayder Jawad