如何在android模拟器上安装busybox(android 2.3.3)?

时间:2012-10-25 06:49:42

标签: android-emulator busybox

我正在尝试在android模拟器上安装busybox(android 2.3.3)。

我遵循帖子pushing busybox into android emulator中给出的两种方法,但我遇到了问题。

我使用了这篇文章中的第二个解决方案,但我得到了“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

然后,我使用了这篇文章的第一个解决方案,但我得到了“./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

任何人都可以指导我......

2 个答案:

答案 0 :(得分:2)

问题解决了,我按照http://allencch.wordpress.com/2012/02/29/learn-to-root-android-using-emulator/链接的程序进行了操作。

我认为错误是因为我没有启动额外空间的avd,上面的教程提到“我们将为/ system启动带有额外磁盘空间的模拟器。这样,我们可以在以后添加额外的文件到/ system 。“

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

本教程还提到“我们需要使用”adb shell“来重新安装/ system,以便我们对/ system有写入权限。”

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

然后,我们只需要执行以下操作:

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

(上述步骤后,如果收到错误消息

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

然后重新启动分区大小超过128的AVD,例如我用512开始。然后,重复上面的步骤。)

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

我认为su是没有必要的,因为模拟器已经拥有root访问权限,但我遵循了整个过程。

在重新启动模拟器时,一切都变为默认值,这意味着不再需要“su”。要解决这个问题,请阅读上面提到的教程,标题为“解决方案”的段落。

答案 1 :(得分:2)

首先复制忙箱 chmod 777 busybox #from busy box存在的文件夹

./ busybox --install。 #space和dot被请求

我认为你只缺少“。”