Today I needed to add a route on the android shell but was greated with "Invalid Argument" failures, there is no "-h", no man page. So we will have to use the sourcecode.
Hello, thanks for the useful post. i would like to know if it is possible to print all the routes like "route print", and to delete the routes or it loses the routes after device resets? And it is possible to add a permanent route?
by the way, it is possible to add route with unrooted phones? i have terminal emulator, and route SOMETHING works, but i do not want to end with a fixed route..
For some reason, route.c does not allow routes to be deleted. So routes can only be added. ip route ... allows routes to be added, deleted, and has a nice show:
e.g., to add (must run as root): ip route add 10.10.10.0/24 via 192.168.1.1 dev eth0
e.g., to delete (must run as root) ip route del 10.10.10.0/24 via 192.168.1.1 dev eth0
6 comments:
Hello, thanks for the useful post. i would like to know if it is possible to print all the routes like "route print", and to delete the routes or it loses the routes after device resets? And it is possible to add a permanent route?
by the way, it is possible to add route with unrooted phones? i have terminal emulator, and route SOMETHING works, but i do not want to end with a fixed route..
thanks..
Thanks! It saved me a lot of time! I have to learn to look into code.
For some reason, route.c does not allow routes to be deleted. So routes can only be added. ip route ... allows routes to be added, deleted, and has a nice show:
e.g., to add (must run as root):
ip route add 10.10.10.0/24 via 192.168.1.1 dev eth0
e.g., to delete (must run as root)
ip route del 10.10.10.0/24 via 192.168.1.1 dev eth0
e.g., to show
ip route show
Any idea of how to make this persistent? route add -net and busybox ip route add work until I move out of my office or cycle my wifi.
Try "route add -host". This works for Linux
Try "route add -host". This works for persistent routes in linux releases.
Post a Comment