FerryAr / lhroot

Linux Chroot Installer & Bootscript Magisk Module.
GNU General Public License v3.0
190 stars 20 forks source link

busybox not found #3

Closed diehard88 closed 1 year ago

diehard88 commented 2 years ago

but it's there.

note: running android 11 without /sbin

root@android:/system/bin # file bo
bootanimation           bootlinux               bootlinux_init          bootstat                boringssl_self_test32
bootchecker             bootlinux_env           bootlinux_log           bootstrap/              boringssl_self_test64
================================
Linux Chroot Installer v2.1.0(1)
by FerryAr
================================
BusyBox not found!

================================

Testing internet connection [/] - OK
================================
Chroot Installer ===============
================================
Choose Option ==================
================================
1. Install Chroot
2. Remove Chroot
q. quit
--> q

root@android:/system/bin # busybox
BusyBox v1.34.1-osm0sis (2021-10-02 04:33:49 ADT) multi-call binary.
BusyBox is copyrighted by many authors between 1998-2015.
Licensed under GPLv2. See source distribution for detailed
copyright notices.

Usage: busybox [function [arguments]...]
   or: busybox --list[-full]
   or: busybox --show SCRIPT
   or: busybox --install [-s] [DIR]
   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:
        [, [[, acpid, adjtimex, ar, arch, arp, arping, ascii, ash, awk, base32, base64, basename, bbconfig, beep, blkdiscard, blkid, blockdev,
        brctl, bunzip2, bzcat, bzip2, cal, cat, chat, chattr, chcon, chgrp, chmod, chown, chroot, chrt, chvt, cksum, clear, cmp, comm, conspy,
        cp, cpio, crc32, crond, crontab, cttyhack, cut, date, dc, dd, deallocvt, depmod, devmem, df, dhcprelay, diff, dirname, dmesg, dnsd,
        dnsdomainname, dos2unix, du, dumpkmap, dumpleases, echo, ed, egrep, eject, env, ether-wake, expand, expr, factor, fakeidentd, false,
        fatattr, fbset, fbsplash, fdflush, fdformat, fdisk, fgconsole, fgrep, find, findfs, flash_eraseall, flash_lock, flash_unlock, flock,
        fold, free, freeramdisk, fsck, fsck.minix, fsfreeze, fstrim, fsync, ftpd, ftpget, ftpput, fuser, getenforce, getopt, grep, groups,
        gunzip, gzip, hd, hdparm, head, hexdump, hexedit, hostname, httpd, hush, hwclock, id, ifconfig, ifdown, ifenslave, ifplugd, ifup,               inetd, inotifyd, insmod, install, ionice, iostat, ip, ipaddr, ipcalc, ipcrm, ipcs, iplink, ipneigh, iproute, iprule, iptunnel,                  kbd_mode, kill, killall, killall5, klogd, less, link, ln, loadfont, loadkmap, logread, losetup, ls, lsattr, lsmod, lsof, lspci, lsscsi,         lsusb, lzcat, lzma, lzop, lzopcat, makedevs, makemime, man, md5sum, mesg, microcom, mim, mkdir, mkdosfs, mke2fs, mkfifo, mkfs.ext2,             mkfs.minix, mkfs.reiser, mkfs.vfat, mknod, mkswap, mktemp, modinfo, modprobe, more, mount, mountpoint, mpstat, mv, nameif, nanddump,            nandwrite, nbd-client, nc, netstat, nice, nl, nmeter, nohup, nologin, nslookup, nuke, od, openvt, partprobe, paste, patch, pgrep,               pidof, ping, ping6, pipe_progress, pivot_root, pkill, pmap, popmaildir, poweroff, powertop, printenv, printf, ps, pscan, pstree, pwd,           pwdx, raidautorun, rdate, rdev, readlink, readprofile, realpath, reboot, reformime, renice, reset, resize, resume, rev, rfkill, rm,             rmdir, rmmod, route, rtcwake, run-init, run-parts, runcon, rx, script, scriptreplay, sed, selinuxenabled, sendmail, seq, sestatus,
        setconsole, setenforce, setfattr, setfont, setkeycodes, setlogcons, setpriv, setserial, setsid, setuidgid, sh, sha1sum, sha256sum,              sha3sum, sha512sum, showkey, shred, shuf, slattach, sleep, smemcap, sort, split, ssl_client, start-stop-daemon, stat, strings, stty,            sum, svc, svok, swapoff, swapon, switch_root, sync, sysctl, syslogd, tac, tail, tar, tc, tcpsvd, tee, telnet, telnetd, test, tftp,              tftpd, time, timeout, top, touch, tr, traceroute, traceroute6, true, truncate, ts, tty, ttysize, tunctl, tune2fs, ubiattach, ubidetach,
        ubimkvol, ubirename, ubirmvol, ubirsvol, ubiupdatevol, udhcpc, udhcpc6, udhcpd, udpsvd, uevent, umount, uname, uncompress, unexpand,
        uniq, unix2dos, unlink, unlzma, unlzop, unshare, unxz, unzip, uptime, usleep, uudecode, uuencode, vconfig, vi, volname, watch,
        watchdog, wc, wget, which, whoami, whois, xargs, xxd, xz, xzcat, yes, zcat, zcip
FerryAr commented 2 years ago

Have you tried to install chroot? If it success, just ignore. May be a bug from mod-util though. If it fails, I'll look into it.

diehard88 commented 2 years ago

@FerryAr I'm afraid I don't understand.

chroot is available under /sytem/bin, /system/xbin and /vendor/bin.

FerryAr commented 2 years ago

@FerryAr I'm afraid I don't understand.

chroot is available under /sytem/bin, /system/xbin and /vendor/bin.

In lhroot script, you will see 2 menus,

  1. Install chroot
  2. Remove chroot

enter 1 to install chroot, have you tried it yet?

diehard88 commented 2 years ago

@FerryAr Yes, chroot installed after running lhroot for the first time.

diehard88 commented 2 years ago

this is from a rooted device running android 10

================================
Install which distro? ==========
================================
0. Back
1. Arch Linux ARM
2. Arch Linux x64
3. Alpine Linux
4. Debian
5. Fedora
6. Kali Linux
7. Manjaro
8. Ubuntu
9. Void Linux
--> 6

Downloading Rootfs, please wait...
wget: Unknown option 'qO' (see "wget --help")
 [\]Decompressing Rootfs...
Removing rootfs tarball for some space
rm: /data/local/tmp/kali.tar.xz: No such file or directory
You can now launch Kali with bootlinux script
================================
Install which distro? ==========
================================
0. Back
1. Arch Linux ARM
2. Arch Linux x64
3. Alpine Linux
4. Debian
5. Fedora
6. Kali Linux
7. Manjaro
8. Ubuntu
9. Void Linux
--> 9

Downloading Rootfs, please wait...
wget: Unknown option 'qO' (see "wget --help")
 [\]Decompressing Rootfs...
Removing rootfs tarball for some space
rm: /data/local/tmp/void.tar.xz: No such file or directory
You can now launch Void with bootlinux script
================================
Install which distro? ==========
================================
0. Back
1. Arch Linux ARM
2. Arch Linux x64
3. Alpine Linux
4. Debian
5. Fedora
6. Kali Linux
7. Manjaro
8. Ubuntu
9. Void Linux
-->
diehard88 commented 2 years ago

and this is from another device running android 11. note: there was always full connectivity.

================================
Install which distro? ==========
================================
0. Back
1. Arch Linux ARM
2. Arch Linux x64
3. Alpine Linux
4. Debian
5. Fedora
6. Kali Linux
7. Manjaro
8. Ubuntu
9. Void Linux
--> 6

Downloading Rootfs, please wait...
 [-]wget: error getting response: Connection reset by peer
 [\]Decompressing Rootfs...
Removing rootfs tarball for some space
rm: /data/local/tmp/kali.tar.xz: No such file or directory
You can now launch Kali with bootlinux script
================================
Install which distro? ==========
================================
0. Back
1. Arch Linux ARM
2. Arch Linux x64
3. Alpine Linux
4. Debian
5. Fedora
6. Kali Linux
7. Manjaro
8. Ubuntu
9. Void Linux
-->
diehard88 commented 2 years ago

Here's lhroot-verbose.log....

diehard88 commented 2 years ago

your script does find my busybox.

# find /dev -mindepth 2 -maxdepth 2 -type d -name ".magisk"

/dev/Iyxwm/.magisk

why this unconditional message?

• echo '\e[01;37mBusyBox not found!\e[0m'
FerryAr commented 2 years ago

your script does find my busybox.

# find /dev -mindepth 2 -maxdepth 2 -type d -name ".magisk"

/dev/Iyxwm/.magisk

why this unconditional message?

• echo '\e[01;37mBusyBox not found!\e[0m'

The busybox search mechanism is within the mod-util library https://github.com/veez21/mod-util

Maybe it's upstream bugs, but in my side which is in Android 12.1, the installer work fine although the "Busybox not found" message is there

diehard88 commented 2 years ago

@FerryAr

you're getting the same message, right?

diehard88 commented 2 years ago

@FerryAr just to clarify, when you run Ihroot succesfully, you also get the same message?

there are two different versions of mod-util.sh:

2.6.1, used by Ihroot 2.6.2, used by ccbins

attached screenshots show their differences.

diehard88 commented 2 years ago

tooandrew commented 1 year ago

Also have this problem. Install worked but chroot environment didnt have basic functionality like ping, couldnt update

FerryAr commented 1 year ago

Also have this problem. Install worked but chroot environment didnt have basic functionality like ping, couldnt update

what distro? for debian (apt) families check #8 , if still doesn't work, please make new issue with detail

DvaMishkiLapa commented 1 year ago

I can't install any distribution in Chroot. Same problem as above:

================================
Linux Chroot Installer v2.1.0(1)
by FerryAr
================================
BusyBox not found!

================================

Testing internet connection [-] - OK
================================
Chroot Installer ===============
================================
Choose Option ==================
================================
1. Install Chroot
2. Remove Chroot
q. quit
--> 1
================================
Install which distro? ==========
================================
0. Back
1. Arch Linux ARM
2. Arch Linux x64
3. Alpine Linux
4. Debian
5. Fedora
6. Kali Linux
7. Manjaro
8. Ubuntu
9. Void Linux
--> 8

Downloading Rootfs, please wait...
wget: Unknown option 'qO' (see "wget --help")
 [\]Decompressing Rootfs...
Removing rootfs tarball for some space
rm: /data/local/tmp/ubuntu.tar.xz: No such file or directory
You can now launch Ubuntu with the bootlinux script

OnePlus 7 Android 13 Magisk 25.2 busybox-ndk 1.34.1 (magisk module)

The output of my BusyBox:

:/data/data/com.termux/files/home # busybox
BusyBox v1.34.1-osm0sis (2021-10-02 04:33:49 ADT) multi-call binary.
BusyBox is copyrighted by many authors between 1998-2015.
Licensed under GPLv2. See source distribution for detailed
copyright notices.

Usage: busybox [function [arguments]...]
   or: busybox --list[-full]
   or: busybox --show SCRIPT
   or: busybox --install [-s] [DIR]
   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:
        [, [[, acpid, adjtimex, ar, arch, arp, arping, ascii,
        ash, awk, base32, base64, basename, bbconfig, beep,
        blkdiscard, blkid, blockdev, brctl, bunzip2, bzcat,
        bzip2, cal, cat, chat, chattr, chcon, chgrp, chmod,
        chown, chroot, chrt, chvt, cksum, clear, cmp, comm,
        conspy, cp, cpio, crc32, crond, crontab, cttyhack, cut,
        date, dc, dd, deallocvt, depmod, devmem, df, dhcprelay,
        diff, dirname, dmesg, dnsd, dnsdomainname, dos2unix, du,
        dumpkmap, dumpleases, echo, ed, egrep, eject, env,
        ether-wake, expand, expr, factor, fakeidentd, false,
        fatattr, fbset, fbsplash, fdflush, fdformat, fdisk,
        fgconsole, fgrep, find, findfs, flash_eraseall,
        flash_lock, flash_unlock, flock, fold, free, freeramdisk,
        fsck, fsck.minix, fsfreeze, fstrim, fsync, ftpd, ftpget,
        ftpput, fuser, getenforce, getopt, grep, groups, gunzip,
        gzip, hd, hdparm, head, hexdump, hexedit, hostname,
        httpd, hush, hwclock, id, ifconfig, ifdown, ifenslave,
        ifplugd, ifup, inetd, inotifyd, insmod, install, ionice,
        iostat, ip, ipaddr, ipcalc, ipcrm, ipcs, iplink, ipneigh,
        iproute, iprule, iptunnel, kbd_mode, kill, killall,
        killall5, klogd, less, link, ln, loadfont, loadkmap,
        logread, losetup, ls, lsattr, lsmod, lsof, lspci, lsscsi,
        lsusb, lzcat, lzma, lzop, lzopcat, makedevs, makemime,
        man, md5sum, mesg, microcom, mim, mkdir, mkdosfs, mke2fs,
        mkfifo, mkfs.ext2, mkfs.minix, mkfs.reiser, mkfs.vfat,
        mknod, mkswap, mktemp, modinfo, modprobe, more, mount,
        mountpoint, mpstat, mv, nameif, nanddump, nandwrite,
        nbd-client, nc, netstat, nice, nl, nmeter, nohup,
        nologin, nslookup, nuke, od, openvt, partprobe, paste,
        patch, pgrep, pidof, ping, ping6, pipe_progress,
        pivot_root, pkill, pmap, popmaildir, poweroff, powertop,
        printenv, printf, ps, pscan, pstree, pwd, pwdx,
        raidautorun, rdate, rdev, readlink, readprofile,
        realpath, reboot, reformime, renice, reset, resize,
        resume, rev, rfkill, rm, rmdir, rmmod, route, rtcwake,
        run-init, run-parts, runcon, rx, script, scriptreplay,
        sed, selinuxenabled, sendmail, seq, sestatus, setconsole,
        setenforce, setfattr, setfont, setkeycodes, setlogcons,
        setpriv, setserial, setsid, setuidgid, sh, sha1sum,
        sha256sum, sha3sum, sha512sum, showkey, shred, shuf,
        slattach, sleep, smemcap, sort, split, ssl_client,
        start-stop-daemon, stat, strings, stty, sum, svc, svok,
        swapoff, swapon, switch_root, sync, sysctl, syslogd, tac,
        tail, tar, tc, tcpsvd, tee, telnet, telnetd, test, tftp,
        tftpd, time, timeout, top, touch, tr, traceroute,
        traceroute6, true, truncate, ts, tty, ttysize, tunctl,
        tune2fs, ubiattach, ubidetach, ubimkvol, ubirename,
        ubirmvol, ubirsvol, ubiupdatevol, udhcpc, udhcpc6,
        udhcpd, udpsvd, uevent, umount, uname, uncompress,
        unexpand, uniq, unix2dos, unlink, unlzma, unlzop,
        unshare, unxz, unzip, uptime, usleep, uudecode, uuencode,
        vconfig, vi, volname, watch, watchdog, wc, wget, which,
        whoami, whois, xargs, xxd, xz, xzcat, yes, zcat, zcip

Earlier on the same firmware I successfully installed Ubuntu, but I needed to reflash. Now the installation doesn't go.

I tried deleting everything via lhroot first, that doesn't help.

DvaMishkiLapa commented 1 year ago

Interestingly, I did get lhroot to work.

  1. I manually downloaded ubuntu-rootfs-arm64.tar.xz, put it in /data/local/tmp and renamed the file to ubuntu.tar.xz.
  2. After that I checked that there was no /data/ubuntu folder. It existed (empty), I deleted it.
  3. Started lhroot, chose to install Ubuntu, it was able to unpack Rootfs.
  4. bootlinux ran chroot Ubuntu. I was able to put the packages I needed, everything looks to be working.

It looks like a problem with wget.

ubuntu

diehard88 commented 1 year ago

:put_litter_in_its_place: