OnionUI / Onion

OS overhaul for Miyoo Mini and Mini+
https://onionui.github.io
GNU General Public License v3.0
3.28k stars 204 forks source link

(MMP) DNS - resolution name problem #681

Closed schmurtzm closed 1 year ago

schmurtzm commented 1 year ago

The name resolution is not working on the MMP (Miyoo Mini+)

ping retroachievements.org
ping: bad address 'retroachievements.org'
----------------
nslookup retroachievements.org
Server:    192.168.0.1
Address 1: 192.168.0.1
nslookup: can't resolve 'retroachievements.org'
----------------
nslookup retroachievements.org 1.1.1.1
Server:    1.1.1.1
Address 1: 1.1.1.1
nslookup: can't resolve 'retroachievements.org'
----------------
cat /etc/resolv.conf
search local
nameserver 192.168.0.1 
schmurtzm commented 1 year ago

There is a big problem with DNS resolution in the current firmware. Strange fact it seems that it works in China, probably because DNS are not working in the same way behind the great firewall ? This DNS is a problem : to download stuffs easily , to join retroachivements servers and to declare a netplay session on internet. In other words it's a big problem 😄

So I've worked on this DNS problem and here my findings : it seems related to busybox. libnss_dns.so.2 and libnss_files.so.2 are 2 libraries required for Domain Name Resolution. It seems that these libraries were missing from the initial firmware and without these libraries, the parameters from nsswitch.conf are not loaded.

Last firmwares from Miyoo will include these libraries and nsswitch.conf so it will be solved for everyone.

A workaround if you have an old firmware is to use Parasyte :

midir="/mnt/SDCARD/App/parasyte/rootfs"
export LD_LIBRARY_PATH=$midir/lib:$midir/usr/lib:$LD_LIBRARY_PATH
ping  retroachievements.org

Funny fact it seems that login as root make the DNS works too (but for now I didn't look why).

DarkSil3ncer commented 1 year ago

@schmurtzm I've run into the same issue... Did you just update the firmware from the Miyoo site? If so what firmware version are you running?

schmurtzm commented 1 year ago

It is solved since version 20230326. Which FW version do you have and what type of testing do you do?

DarkSil3ncer commented 1 year ago

That makes sense. The firmware version on my device is 202303021817.

From a testing perspective I tried to ping www.google.com via the cmd line.

schmurtzm commented 1 year ago

So yes you can update the firmware ;)

DarkSil3ncer commented 1 year ago

I can confirm that it works. Thanks man. :)

schmurtzm commented 1 year ago

A good occasion to close this old issue !