Adding a route with android’s route

Adding a route with android’s route

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.

First of all the code is in /system/core/toolbox/route.c
and it supports three types of argument..
  • route add default dev DEVICE
  • route add default gw IP dev DEVICE
  • route add -net IP netmask NETMASK gw IP
Comments are closed.