Adb: How to setup dns servers?

2.2k Views Asked by At

I need to configure network on an android automotive though the usb0 interface in static ip so I configured the network like that:

ifconfig usb0 192.168.1.137
ifconfig usb0 down
iptables --flush
iptables -A OUTPUT -o usb0 -p all -j ACCEPT
iptables -A INPUT -o usb0 -p all -j ACCEPT
ifconfig usb0 up
ip route add default via 192.168.1.1

and with that I can ping my devices in LAN and also 8.8.8.8 who respond in ping but I cannot for example ping google.com because of an DNS issue (I think). I found setprop net.dns1 8.8.8.8 on internet but that does not work. Also I don't have a /system/etc/resolv.conf. So if you have any idea tell me. Thanks.

0

There are 0 best solutions below