Magisk-Modules-Alt-Repo / chroot-distro

install linux distributions on android
GNU General Public License v3.0
132 stars 9 forks source link

getopt: inaccessible or not found #34

Closed defectly closed 3 weeks ago

defectly commented 2 months ago

:/ # chroot-distro /system/bin/chroot-distro[21]: getopt: inaccessible or not found I'm sorry, getopt --test failed in this environment. 1|:/ #

defectly commented 2 months ago

oh ok busybox fixes this

jjkola commented 1 month ago

Thanks for the report. I reopened the issue as I would like to get a clarification.

What do you mean by busybox fixed this? You didn't have busybox installed? If not, then it should have complained about missing busybox.

Or, did you have busybox installed outside of busybox magisk module? Or did you update the busybox? If yes, then from which version to which version?

It would help us to improve the checks if you could provide at least some answers.

defectly commented 1 month ago

Thanks for the report. I reopened the issue as I would like to get a clarification.

What do you mean by busybox fixed this? You didn't have busybox installed? If not, then it should have complained about missing busybox.

Or, did you have busybox installed outside of busybox magisk module? Or did you update the busybox? If yes, then from which version to which version?

It would help us to improve the checks if you could provide at least some answers.

I didn't have any busybox installed, so this error happen. Then i installed Busybox for Android NDK in KernelSU, and errors disappeared

jjkola commented 1 month ago

Just to be clear: you are using chroot-distro with KernelSU? Also, if you run command -V busybox as root, what does it output?

defectly commented 1 month ago

Just to be clear: you are using chroot-distro with KernelSU? Also, if you run command -V busybox as root, what does it output?

Yes, I use it with KernelSU. command -V busybox returns "busybox is /system/bin/busybox" with Busybox for Android NDK module, and "busybox is /data/adb/ksu/bin/busybox" without this module.

jjkola commented 1 month ago

Thanks for taking the time to test it thoroughly. The situation is now clear to me, and we'll have to add a better check to detect this.

jjkola commented 1 month ago

@defectly Can you try running the code from https://github.com/jjkola/chroot-distro/tree/fix/better_busybox_check? You can create a development version of chroot-distro with the help of hacking guide in the README. If you can run this version both with and without Busybox for Android module so that I can ensure that it works as intended. I would have liked to test this myself but unfortunately I don't own a device which supports KernelSU.

defectly commented 1 month ago

@defectly Can you try running the code from https://github.com/jjkola/chroot-distro/tree/fix/better_busybox_check? You can create a development version of chroot-distro with the help of hacking guide in the README. If you can run this version both with and without Busybox for Android module so that I can ensure that it works as intended. I would have liked to test this myself but unfortunately I don't own a device which supports KernelSU.

Screenshot_20240915-213707_Termux

all is ok when i enable busybox

jjkola commented 1 month ago

Thanks for the help. I will try to merge the change as soon as possible, but most likely, it will be next weekend as I have been really busy lately.

defectly commented 1 month ago

just installed arrow os with magisk, chroot-distro and busybox for ndk on redmi note 8 pro. chroot-distro says that busybox is not installed......

defectly commented 1 month ago

just installed arrow os with magisk, chroot-distro and busybox for ndk on redmi note 8 pro. chroot-distro says that busybox is not installed......

dunno if its rom problem but on another rom with kernelsu all works

jjkola commented 1 month ago

Can you run command -v busybox with arrow os rom? Also, to clarify, did you use the fix branch from my own repository? Or did you use a release?

defectly commented 1 month ago

Can you run command -v busybox with arrow os rom? Also, to clarify, did you use the fix branch from my own repository? Or did you use a release?

i use release, and i guess its busybox problem because busybox command was unrecognized

jjkola commented 1 month ago

Fix released.

hopez13 commented 1 month ago

using chroot-distro by sudo from termux shell instead of root shell is easy workaround without requiring to install any extra busy box module

sudo chroot-distro login check #42

jjkola commented 1 month ago

Yes, but chroot-distro needs to work even with ADB shell, thus requiring Busybox ndk.

hopez13 commented 1 month ago

:/ # chroot-distro /system/bin/chroot-distro[21]: getopt: inaccessible or not found I'm sorry, getopt --test failed in this environment. 1|:/ #

prefixing it's invocation with busybox like busybox getopt fixes the issue check #42

jjkola commented 3 weeks ago

just installed arrow os with magisk, chroot-distro and busybox for ndk on redmi note 8 pro. chroot-distro says that busybox is not installed......

With the latest PR this might have been fixed.