0

Is there any way to set a static IP address to Android device if the device is connected to a network via ethernet cable using ethernet to USB adapter?

I tried connecting to device via ADB and then changing IP address using $ ifconfig eth0 x.x.x.x command, but I got ifconfig:ioctl 8916: Permission denied as an answer.

1 Answer 1

1

Nope, there is no way to set it on common devices. You need rooted device, which allows you to run ifconfig eth0, thats the only way (valid up to Android 13). By default eth0 will obtain IP using DHCP, if there is no DHCP available - it just won't work. In "your" network you may assign some particular IP for particular MAC (also ensure that MAC address of ethernet isn't randomized like for Wi-Fi starting Android 10, but it shouldn't be on Linux level)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.