Android route 설정
출처 : http://zecke.blogspot.kr/2010/06/adding-route-with-androids-route.html
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
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
'Android' 카테고리의 다른 글
Android 4.2 Stagefright (0) | 2015.01.09 |
---|---|
Android EGL (0) | 2014.11.28 |
Android 4.2 Audio Sub System (0) | 2014.11.28 |