Magisk-Modules-Alt-Repo / chroot-distro

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

Unable to download most distros #9

Closed crypto-the-great closed 3 months ago

crypto-the-great commented 3 months ago

alpine, cent os, parrot os, fedora, all Debian versions, and most likely more as i have not tested them all are some of the ones affected. Below is the output of trying to download fedora but all of them give basically the same error

:/ # chroot-distro download fedora Connecting to github.com (140.82.112.4:443) wget: note: TLS certificate validation not implemented wget: TLS error from peer (alert code 80): 80 wget: error getting response: Connection reset by peer Failed to download the Fedora Rootfs. rm: /data/local/chroot-distro/.rootfs/fedora.tar.xz: No such file or directory 1|:/ #

EDIT1: after some further testing, the only operating systems that will work on my device are ubuntu, kali, and arch, i have only seen one other person on the issues page with this same problem and neither of us know how to fix it

jjkola commented 3 months ago

I'm able to download alpine (although the link is wrong, had to correct it myself). I just tried downloading fedora, and the script downloaded it without problems. What is your device / environment where you are using chroot-distro? Based on quick google round, the wget may be too old.

jjkola commented 3 months ago

3 bug report seems to be of same issue but for some reason the original reporter has closed the issue. I have tried to reach OP to see if he was able to fix it.

crypto-the-great commented 3 months ago

I'm able to download alpine (although the link is wrong, had to correct it myself). I just tried downloading fedora, and the script downloaded it without problems. What is your device / environment where you are using chroot-distro? Based on quick google round, the wget may be too old.

hi, sorry for the late reply but I am using a moto G stylus 2021 running android 11 and magisk 27.0 and termux w/ root privileges edit: you said that wget might be out of date? how might I update it? I tried searching around how to update packages but couldn't do it, most likely because every time I use pm my brain melts

jjkola commented 3 months ago

Let's first check what version and from where you use wget. Please run which wget in termux as a root to see where it is (you may need to run pkg install which as a normal user to be able to use the command). And also wget or wget -V (if it is not busybox wget) to see what version you are using.

crypto-the-great commented 3 months ago

Let's first check what version and from where you use wget. Please run which wget in termux as a root to see where it is (you may need to run pkg install which as a normal user to be able to use the command). And also wget or wget -V (if it is not busybox wget) to see what version you are using.

which wget returns "/system/xbin/wget" and wget returns "BusyBox v1.32.1-Magisk"

jjkola commented 3 months ago

That version is from 2021 and is thus quite old. I have the latest version v1.36.1. I tried going through the busybox change logs but I can't say for sure in which version your problem has been corrected. There has been tls and/or wget fixes in nearly every version along the way. My suggestion is to use latest busybox-ndk magisk module version.

crypto-the-great commented 3 months ago

thanks, i will try updating my busybox and re-trying

crypto-the-great commented 3 months ago

well that got me somewhere. I tried installing fedora and chroot-distro download and install worked but it thrown out an error as soon as i tried to login to it.

minsk:/ # chroot-distro login fedora mount: '/dev'->'/data/local/chroot-distro/fedora/dev': No such file or directory mount: '/sys'->'/data/local/chroot-distro/fedora/sys': No such file or directory mount: '/proc'->'/data/local/chroot-distro/fedora/proc': No such file or directory mount: '/dev/pts'->'/data/local/chroot-distro/fedora/dev/pts': No such file or directory chroot: exec /bin/su: No such file or directory 127|minsk:/ #

jjkola commented 3 months ago

Can you run ls -la / and ls -la /system and include the directory list here? Also, if you have a chance, can you try install and login fedora with PR #13 codes? Before uninstalling the previous installation of fedora rootfs I would recommend either rebooting the device, or installing the fixed version of chroot-distro before trying to uninstall (Note: you have to reboot the device before the changes take effect). There is more error checking in that version, so hopefully we can get a better view on the problem. Based on error messages I suspect that your device is missing /dev and the other ones, but they most likely reside in /system folder. If that is case, then we will have to add check for that. I'm little confused why install would succeed but login would not as they both do a login at the end.

P.S. You can use this command to create the plugin (at the root folder of the sources): zip chroot-distro.zip config.sh module.prop META-INF/com/google/android/* system/bin/chroot-distro so that you can manually install it.

crypto-the-great commented 3 months ago

I'm little confused why install would succeed but login would not as they both do a login at the end.

yeah i think i forgot to mention as i was tired when i first made this post, but the part where it would login at the end of installing fedora would also fail with the same error and as for the fork of chroot-distro that has the fix, i could not seem to get it installed, i tired running your command but running it with root and just regular android shell came up with this both times

minsk:/storage/self/primary/Download $ zip chroot-distro.zip config.sh module.prop META-INF/com/google/android/* system/bin/chroot-distro /system/bin/sh: zip: inaccessible or not found 127|minsk:/storage/self/primary/Download $

as for the two commands that you asked me to run:

minsk:/ $ clear minsk:/ $ su minsk:/ # clear minsk:/ # ls -la / total 84 drwxr-xr-x 23 root root 4096 2008-12-31 19:00 . drwxr-xr-x 23 root root 4096 2008-12-31 19:00 .. dr-xr-xr-x 223 system system 0 2024-07-11 06:09 acct drwxr-xr-x 46 root root 920 1971-04-16 16:30 apex lrw-r--r-- 1 root root 11 2008-12-31 19:00 bin -> /system/bin lrw-r--r-- 1 root root 50 2008-12-31 19:00 bugreports -> /data/user_de/0/com.android.shell/files/bugreports lrw-r--r-- 1 root root 11 2008-12-31 19:00 cache -> /data/cache drwxr-xr-x 4 root root 0 1969-12-31 19:00 config lrw-r--r-- 1 root root 17 2008-12-31 19:00 d -> /sys/kernel/debug drwxrwx--x 51 system system 4096 2024-07-10 19:53 data drwx------ 5 root system 100 1971-04-16 16:30 data_mirror drwx--x--x 4 root root 280 2024-07-10 19:53 debug_ramdisk lrw------- 1 root root 23 2008-12-31 19:00 default.prop -> system/etc/prop.default drwxr-xr-x 23 root root 5800 2024-07-10 19:54 dev lrw-r--r-- 1 root root 11 2008-12-31 19:00 etc -> /system/etc lrwxr-x--- 1 root shell 16 2008-12-31 19:00 init -> /system/bin/init -rwxr-x--- 1 root shell 2831 2008-12-31 19:00 init.environ.rc -rwxr-x--- 1 root shell 4303 2008-12-31 19:00 init.recovery.qcom.rc drwxr-xr-x 12 root root 260 1971-04-16 16:30 linkerconfig drwx------ 2 root root 16384 2008-12-31 19:00 lost+found drwxr-xr-x 13 root root 4096 2024-07-10 19:53 metadata drwxr-xr-x 15 root system 320 1971-04-16 16:30 mnt -rw-r--r-- 1 root root 41 2008-12-31 19:00 module_hashes drwxr-xr-x 2 root root 4096 2008-12-31 19:00 odm drwxr-xr-x 2 root root 4096 2008-12-31 19:00 oem drwxr-xr-x 2 root root 4096 2008-12-31 19:00 postinstall dr-xr-xr-x 835 root root 0 1969-12-31 19:00 proc drwxr-xr-x 13 root root 4096 2008-12-31 19:00 product drwxr-xr-x 3 root root 4096 2008-12-31 19:00 res lrw-r--r-- 1 root root 21 2008-12-31 19:00 sdcard -> /storage/self/primary drwx--x--- 4 shell everybody 80 1971-04-16 16:30 storage dr-xr-xr-x 14 root root 0 1971-04-16 16:30 sys drwxr-xr-x 15 root root 4096 2008-12-31 19:00 system lrw-r--r-- 1 root root 18 2008-12-31 19:00 system_ext -> /system/system_ext drwxr-xr-x 18 root shell 4096 2008-12-31 19:00 vendor minsk:/ # ls -la /system total 92 drwxr-xr-x 15 root root 4096 2008-12-31 19:00 . drwxr-xr-x 23 root root 4096 2008-12-31 19:00 .. drwxr-xr-x 2 root root 4096 2008-12-31 19:00 apex drwxr-xr-x 26 root root 4096 2008-12-31 19:00 app drwxr-x--x 4 root shell 8120 1971-04-16 16:30 bin -rw------- 1 root root 6508 2008-12-31 19:00 build.prop drwxr-xr-x 17 root root 4096 2008-12-31 19:00 etc drwxr-xr-x 2 root root 12288 2008-12-31 19:00 fonts drwxr-xr-x 5 root root 4096 2008-12-31 19:00 framework drwxr-xr-x 5 root root 16384 2008-12-31 19:00 lib drwxr-xr-x 5 root root 16384 2008-12-31 19:00 lib64 drwxr-xr-x 3 root root 4096 2008-12-31 19:00 media drwxr-xr-x 41 root root 4096 2008-12-31 19:00 priv-app lrw-r--r-- 1 root root 8 2008-12-31 19:00 product -> /product drwxr-xr-x 9 root root 4096 2008-12-31 19:00 system_ext drwxr-xr-x 7 root root 4096 2008-12-31 19:00 usr lrw-r--r-- 1 root root 7 2008-12-31 19:00 vendor -> /vendor drwxr-x--x 2 root shell 7320 1971-04-16 16:30 xbin minsk:/ #

jjkola commented 3 months ago

Sorry, I wasn't clear enough with that. I meant that you download the source codes of the chroot-distro to a computer and then unzip the downloaded source code to somewhere (or if you used git to download sources then there is nothing to do at this step), and afterwards you go into that folder and issue the zip command in that folder. After that you can copy the created zip file to the device and install it in magisk.

Ok, so my hunch was not right. There is dev, sys and proc at the root. That's good. Something must have gone wrong during install. Hmm, could it be the original problem which I fixed with PR #7. It starts to sound like that.

crypto-the-great commented 3 months ago

Sorry, I wasn't clear enough with that

nah its not your fault, it was like 3am when i tried it and my smooth brain forgot that PCs exist 😅. i ran the command after downloading the forked repo and it spat out a working zip file :)))

crypto-the-great commented 3 months ago

alright i got an update. after uninstalling chroot-distro and installing the patched version, i found that i had forgot to uninstall fedora, i ran chroot-distro uninstall fedora and it kept spiting out a bunch of permission denied errors, after a while and thousands of pages of errors, i ctrl + c'ed it and that turned out to be a mistake, after opening termux up again i got a file not found error and the only option was press enter to exit. i re-installed termux and that seemed to fix it but i needed to reinstall busybox and the chroot-distro fork for them to work. so i guess dont to what i did for anyone else experiencing this lol

crypto-the-great commented 3 months ago

well i cant login to fedora which sucks as the only reason i need this is because of fedora (an old package that i have only gotten to work on fedora)

it through out this error when i run chroot-distro login fedora

chroot: exec /bin/su: no such file or directory

jjkola commented 3 months ago

Can you create a new bug report for that?

crypto-the-great commented 3 months ago

sure, the no such file or the fact that trying to uninstall fedora nuked my termux?

jjkola commented 3 months ago

Hmm, let's create for both as there is #6 but it has delved in different direction.

crypto-the-great commented 3 months ago

sorry for the long delay, some stuff came up and a had to put this on the back burner for a bit, the new issue is #17