Open arminhere opened 2 years ago
is the ping command work?
In case resolve.conf is empty or not found
execute this command
echo "nameserver 1.1.1.1" >> /etc/resolv.conf
ping command is not working either.
resolve.conf already exists and cat /etc/resolve.conf
returns
nameserver 1.1.1.1
nameserver 1.0.0.1
I have also noticed that after exiting linux and killlinux command, resolve.conf gets reset every time.
ping command is not working either. resolve.conf already exists and
cat /etc/resolve.conf
returns nameserver 1.1.1.1 nameserver 1.0.0.1I have also noticed that after exiting linux and killlinux command, resolve.conf gets reset every time.
Have you tried other distro? Arch Linux ARM is untested apparently, because the tarball size is so big.
ping command is not working either. resolve.conf already exists and
cat /etc/resolve.conf
returns nameserver 1.1.1.1 nameserver 1.0.0.1 I have also noticed that after exiting linux and killlinux command, resolve.conf gets reset every time.Have you tried other distro? Arch Linux ARM is untested apparently, because the tarball size is so big.
I have also tried Manjaro and it has the same issue.
this or this might help? My issue personally was with apt, and telling it to run as root, not as the _apt user, however the posts have some information on how/why certain users are unable to access the internet in chroot on Android.
Edit: debugging apt was made harder by the fact that the debian image doesn't include ping or curl. Also it would be nice to have a way to include extra mounts without having to bind-mount it myself (I included my magisk modules, since they have several native binaries like nano)
to fix apt, at least in ubuntu and debian, try this inside your chroot:
root@linux:-# echo "nameserver 1.1.1.1" | tee /etc/resolv.conf
root@linux:-# addgroup --gid 3003 android_inet
root@linux:-# usermod -g android_inet _apt
also worth noting that the ubuntu ports repository (for armhf) doesn't seem to be signed, or the wrong keys are in the tarball or something... quick fix for that. albeit VERY UNSAFE:
root@linux:-# echo 'Acquire::AllowInsecureRepositories "true";' | tee /etc/apt/apt.conf.d/01allowinsecure
i didn't investigate what was wrong, just bypassed security. this procedure is NOT recommended!
ping can be used through busybox (which seems to be built in on the tarball I received):
root@linux:-# busybox ping -c4 google.com
or you can install the applets: root@linux:-# busybox --install -s /sbin
root@linux:-# addgroup --gid 3003 android_inet root@linux:-# usermod -g android_inet _apt
thank you this solution solve my problem for apt-get that return temporary failure resolving
change your user id to 4000 or more, just works,
login as root
usermod -u 4000 username
Distro= ArchLinux ARM Android 12
basically cant download files or clone repos with wget and git with users other than root. downloading works fine with root user tho.
Error= could not resolve host: aur.archlinux.org
I do remember finding a fix for this a few years ago but can't find it today. i think it had something to do with /etc/resolve.conf