Magisk-Modules-Alt-Repo / chroot-distro

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

No internet in any distro #46

Open gitmanbloggus opened 3 days ago

gitmanbloggus commented 3 days ago

As soon as I enter into the distro, I don't have internet How would I fix this

jjkola commented 3 days ago

Before anything else, can you run chroot-distro env and attach the output as an attachment? Also, what distribution are you running, and be as specific as possible? Did you do some setups within the jail?

I'm asking this because chroot doesn't touch or hide anything device related. It is just a way to confine the running program within the file system part specified during chroot invocation.

gitmanbloggus commented 2 days ago

Before anything else, can you run chroot-distro env and attach the output as an attachment? Also, what distribution are you running, and be as specific as possible? Did you do some setups within the jail?

I'm asking this because chroot doesn't touch or hide anything device related. It is just a way to confine the running program within the file system part specified during chroot invocation.

  1. Arch linux
  2. Fresh install
    Script: /system/bin/chroot-distro
    Version: 1.2.1
    Versioncode: 9
    md5 hash: 50755dd4fa0c5a182d051c7ce6af12a5
    Toybox version: toybox 0.8.10-android
    busybox => '/system/bin/busybox'
    Busybox version: BusyBox v1.36.1-osm0sis (2023-09-02 19:01:41 ADT) multi-call binary.
    chroot => '/system/bin/chroot'
    /system/bin/chroot-distro[231]: /data/adb/magisk/magisk64: inaccessible or not found
    Magisk installed ()
    Busybox for Android NDK Magisk module installed
    Linux 4.14.352-openela-g9072f8dd0764 #1 SMP PREEMPT Thu Oct 1008:45:34 UTC 2024 aarch64 Android
    PATH=/product/bin:/apex/com.android.runtime/bin:/apex/com.android.art/bin:/system_ext/bin:/system/bin:/system/xbin:/odm/bin:/vendor/bin:/vendor/xbin
gitmanbloggus commented 2 days ago

If it helps you: Lineage os 21 on pixel 4a

jjkola commented 2 days ago

Do you have Magisk installed? Because you have /data/adb/magisk/ folder but not magisk64 binary.

If not, then what root solution do you have?

But, back to issue at hand. What is the environment you are using? ADB shell? Termux? Or something else?

Also, if you run ifconfig before chroot-distro login archlinux, what does it output? What about if you run it inside the jail?

gitmanbloggus commented 1 day ago

Do you have Magisk installed? Because you have /data/adb/magisk/ folder but not magisk64 binary.

If not, then what root solution do you have?

But, back to issue at hand. What is the environment you are using? ADB shell? Termux? Or something else?

Also, if you run ifconfig before chroot-distro login archlinux, what does it output? What about if you run it inside the jail?

Magisk is installed... It's how I got root

jjkola commented 1 day ago

Regarding, Magisk, can you run ls -lA /data/adb/magisk and include the output here? (This is just so that I can add better check for your environment).

To help with your issue, can you tell which command line provider do you use? ADB shell (Android terminal shell), Termux, TWRP, MT Manager? Or, something else?

Also, I'm still waiting for your output from ifconfig from the host side as well as from inside the chroot.

gitmanbloggus commented 1 day ago

Regarding, Magisk, can you run ls -lA /data/adb/magisk and include the output here? (This is just so that I can add better check for your environment).

To help with your issue, can you tell which command line provider do you use? ADB shell (Android terminal shell), Termux, TWRP, MT Manager? Or, something else?

Also, I'm still waiting for your output from ifconfig from the host side as well as from inside the chroot.

Oh darn I'm using term1+ For ls -lA /data/adb/magisk: it returns magisk's files total 3531 -rwxr-xr-x 1 root root 4034 2024-10-12 17:32 addon.d.sh -rwxr-xr-x 1 root root 6943 2024-10-12 17:32 boot_patch.sh -rwxr-xr-x 1 root root 1710600 2024-10-12 17:32 busybox drwxr-xr-x 2 root root 3452 2024-10-12 17:32 chromeos -rwxr-xr-x 1 root root 5040 2024-10-12 17:32 init-ld -rwxr-xr-x 1 root root 310232 2024-10-12 17:32 magisk -rwxr-xr-x 1 root root 200940 2024-10-12 17:32 magisk32 -rwxr-xr-x 1 root root 770688 2024-10-12 17:32 magiskboot -rwxr-xr-x 1 root root 188584 2024-10-12 17:32 magiskinit -rwxr-xr-x 1 root root 340008 2024-10-12 17:32 magiskpolicy -rwxr-xr-x 1 root root 29053 2024-10-12 17:32 stub.apk -rwxr-xr-x 1 root root 19889 2024-10-12 17:32 util_function

gitmanbloggus commented 1 day ago

Regarding, Magisk, can you run ls -lA /data/adb/magisk and include the output here? (This is just so that I can add better check for your environment).

To help with your issue, can you tell which command line provider do you use? ADB shell (Android terminal shell), Termux, TWRP, MT Manager? Or, something else?

Also, I'm still waiting for your output from ifconfig from the host side as well as from inside the chroot.

Ifconfig: Screenshot_20241015-160927_Terminal Emulator

jjkola commented 1 day ago

Does ifconfig have same output from inside the chroot? I mean after running chroot-distro login archlinux.

gitmanbloggus commented 1 day ago

Does ifconfig have same output from inside the chroot? I mean after running chroot-distro login archlinux.

Screenshot_20241015-162010_Terminal Emulator

jjkola commented 1 day ago

It would have been easier to compare those if the ouput was in text format, but based on those images, it seems that when within archlinux the wlan0 seems to have an address but not in the outside. If the packet routing is wrong because of that then that would explain why there is no internet.

I think the next step would be to check routing before going to the chroot, and then within chroot. If they differ then you will most likely have found the culprit, and only need to find out why this happens. If the routing is the same then the issue is more hairy, and unfortunately most likely I will not be able to help you.

And, just for completeness, after exiting the chroot, does the internet connection start working again?

gitmanbloggus commented 22 hours ago

It would have been easier to compare those if the ouput was in text format, but based on those images, it seems that when within archlinux the wlan0 seems to have an address but not in the outside. If the packet routing is wrong because of that then that would explain why there is no internet.

I think the next step would be to check routing before going to the chroot, and then within chroot. If they differ then you will most likely have found the culprit, and only need to find out why this happens. If the routing is the same then the issue is more hairy, and unfortunately most likely I will not be able to help you.

And, just for completeness, after exiting the chroot, does the internet connection start working again?

Internet in android works fine inside and outside the chroot Seems to be a problem with address assigning

jjkola commented 18 hours ago

Since the issue is no more related to chroot-distro I will close this issue as soon as the fix for the Magisk version detection (#47) lands.