Android Question Change ethernet settings


Well-Known Member
Licensed User
Longtime User
We have 7" android HMI panels with ethernet.

I need to extend our app in order to change the network settings. Like set to StaticIP, DHCP and Ip adresses.
Since we have root access im able to change these settings with´adb
ifconfig eth0 netmask up
route add default gw dev eth0
setprop net.dns1
setprop net.dns2

This works perfectly.

but now i need to do it with my app. Since the app is signed with the system key it also have root access.
Im using the suShell lib from

    su.ExecuteWithEvent($"ifconfig eth0 netmask up"$, "su").WaitForCompletion
    su.ExecuteWithEvent($"route add default gw dev eth0"$, "su").WaitForCompletion

unfortunally this doesnt change anything here. I also get no error as return string i get the same response as with adb.
Any idea here?
Last edited:


Well-Known Member
Licensed User
Perhaps this can help you.
Upvote 0