Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't downlaod any file in Archlinux #5

Open
arminhere opened this issue Jun 3, 2022 · 8 comments
Open

Can't downlaod any file in Archlinux #5

arminhere opened this issue Jun 3, 2022 · 8 comments

Comments

@arminhere
Copy link

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

@FerryAr
Copy link
Owner

FerryAr commented Jun 5, 2022

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

@arminhere
Copy link
Author

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.

@FerryAr
Copy link
Owner

FerryAr commented Jun 12, 2022

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.

@arminhere
Copy link
Author

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.

@Efreak
Copy link

Efreak commented Jul 23, 2022

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)

@jake5253
Copy link

jake5253 commented Jul 25, 2022

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

@khukuh123
Copy link

khukuh123 commented Jun 10, 2023

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

@sdykae
Copy link

sdykae commented Sep 18, 2023

change your user id to 4000 or more, just works,
login as root
usermod -u 4000 username

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants