0

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

我遵循了将busybox推入android模拟器的帖子中给出的两种方法,但我遇到了问题。

我使用了这篇文章中的第二个解决方案,但我得到了“busybox:未找到”:

# 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

有谁能指导我...

4

2 回答 2

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”。为了解决这个问题,请从上述教程中阅读标题为“解决方案”的段落。

于 2012-10-25T07:32:24.720 回答
2

首先从busy box所在的文件夹复制busy box chmod 777 busybox #from

./busybox --install 。#空格和点是必需的

我认为你只缺少“。”

于 2013-01-04T05:53:28.493 回答