0

I am trying to install busybox on android emulator (android 2.3.3).

I followed both methods given in the post pushing busybox into android emulator, but I am facing problem.

I used second solution from this post but I got "busybox: not found":

# su
su
# cd /data/busybox
cd /data/busybox
# chmod 775 busybox
chmod 775 busybox
# ./busybox --install
./busybox --install
# busybox
 busybox
 busybox: not found
# ./busybox
./busybox
BusyBox v1.8.1 (2007-11-14 10:11:37 EST) multi-call binary
Copyright (C) 1998-2006 Erik Andersen, Rob Landley, and others.
Licensed under GPLv2. See source distribution for full notice.

Usage: busybox [function] [arguments]...
   or: [function] [arguments]...

    BusyBox is a multi-call binary that combines many common Unix
    utilities into a single executable.  Most people will create a
    link to busybox for each function they wish to use and BusyBox
    will act like whatever it was invoked as!

Currently defined functions:
    [, [[, addgroup, adduser, adjtimex, ar, arp, arping, ash,
    awk, basename, bunzip2, bzcat, bzip2, cal, cat, catv,
    chattr, chgrp, chmod, chown, chpasswd, chpst, chroot,
    chrt, chvt, cksum, clear, cmp, comm, cp, cpio, crond,
    crontab, cryptpw, cut, date, dc, dd, deallocvt, delgroup,
    deluser, df, dhcprelay, diff, dirname, dmesg, dnsd, dos2unix,
    du, dumpkmap, dumpleases, echo, ed, egrep, eject, env,
    envdir, envuidgid, ether-wake, expand, expr, fakeidentd,
    false, fbset, fdflush, fdformat, fdisk, fgrep, find, fold,
    free, freeramdisk, fsck, fsck.minix, ftpget, ftpput, fuser,
    getopt, getty, grep, gunzip, gzip, halt, hdparm, head,
    hexdump, hostid, hostname, httpd, hwclock, id, ifconfig,
    ifdown, ifup, inetd, init, insmod, install, ip, ipaddr,
    ipcalc, ipcrm, ipcs, iplink, iproute, iprule, iptunnel,
    kbd_mode, kill, killall, killall5, klogd, last, length,
    less, linux32, linux64, linuxrc, ln, loadfont, loadkmap,
    logger, login, logname, logread, losetup, ls, lsattr,
    lsmod, lzmacat, makedevs, md5sum, mdev, mesg, microcom,
    mkdir, mkfifo, mkfs.minix, mknod, mkswap, mktemp, modprobe,
    more, mount, mountpoint, mt, mv, nameif, nc, netstat,
    nice, nmeter, nohup, nslookup, od, openvt, passwd, patch,
    pgrep, pidof, ping, ping6, pipe_progress, pivot_root,
    pkill, poweroff, printenv, printf, ps, pscan, pwd, raidautorun,
    rdate, readlink, readprofile, realpath, reboot, renice,
    reset, resize, rm, rmdir, rmmod, route, rpm, rpm2cpio,
    run-parts, runlevel, runsv, runsvdir, rx, sed, seq, setarch,
    setconsole, setkeycodes, setlogcons, setsid, setuidgid,
    sh, sha1sum, slattach, sleep, softlimit, sort, split,
    start-stop-daemon, stat, strings, stty, su, sulogin, sum,
    sv, svlogd, swapoff, swapon, switch_root, sync, sysctl,
    syslogd, tail, tar, taskset, tcpsvd, tee, telnet, telnetd,
    test, tftp, time, top, touch, tr, traceroute, true, tty,
    ttysize, udhcpc, udhcpd, udpsvd, umount, uname, uncompress,
    unexpand, uniq, unix2dos, unlzma, unzip, uptime, usleep,
    uudecode, uuencode, vconfig, vi, vlock, watch, watchdog,
    wc, wget, which, who, whoami, xargs, yes, zcat, zcip

# busybox
busybox
busybox: not found

Then, I used the first solution from this post but I got "./busybox: permission denied":

# ./busybox --install
./busybox --install
./busybox: permission denied
# ./busybox
./busybox
./busybox: permission denied
# export PATH=/data/busybox:$PATH
export PATH=/data/busybox:$PATH

Can any one please guide me...

Community
  • 1
  • 1
blackfyre
  • 2,549
  • 5
  • 39
  • 58

2 Answers2

2

Problem is solved, I followed procedure from the link http://allencch.wordpress.com/2012/02/29/learn-to-root-android-using-emulator/.

I think the mistake, was that I was not starting the avd with extra space, this above tutorial mentions "We will start the emulator with extra disk space for /system. By this, we can add extra files to /system later."

emulator -avd MyAndroid -partition-size 128 -no-snapshot-load

This tutorial also mentions that "we need to use “adb shell” to remount the /system so that we have write access to the /system."

adb shell mount -o rw,remount -t yaffs2 /dev/block/mtdblock0 /system

Then, we just need to do the following:

adb push su /system/xbin/
adb push busybox /system/xbin/

(After above step, if you get error message

failed to copy 'busybox' to '/system/xbin//busybox': Out of memory

Then restart your AVD with partition size greater than 128 e.g. I start it with 512. Then, repeat the above steps.)

adb shell chmod 06755 /system/xbin/su
adb shell chmod 06755 /system/xbin/busybox

I think that su was no necessary, since emulator already possess root access, but I followed the whole procedure.

On restarting the emulator, everything goes to default, which means no more 'su'. To solve this read, from above mentioned tutorial, the paragraph with title 'Solution'.

blackfyre
  • 2,549
  • 5
  • 39
  • 58
2

first copy the busy box chmod 777 busybox #from the folder where busy box is present

./busybox --install . #space and dot is requited

and i think u r missing only "."