I can't seem to use netcfg
on Nougat. If I use ifconfig ip
is not updating.
If there is another method to change IP on command line or adb shell
, I am all ears.
2 Answers
You can try using ip
command.
Edit: To set up an IP address you can use:
ip address add 192.168.0.77 dev eth0
or the long form
ip addr add 192.168.0.77/24 broadcast 192.168.0.255 dev eth0
look up current config using
ip addr show
In you terminal, run these commands:
adb root
adb shell
$ ifconfig eth0 192.168.138.2 # to fix your address
$ netcfg # show address