On Linux I can type something like echo 202 my_table >> /etc/iproute2/rt_tables and voila, I can use my_table in commands like ip route add dev eth0 table my_table.

But my rooted Android phone doesn't have /etc/iproute2. And even if I create this directory (mkdir -p /etc/iproute2/), then echo 202 my_table >> /etc/iproute2/rt_tables and run ip route add dev eth0 table my_table I get :

Error: argument "my_table" is wrong: "table" value is invalid

How to create and delete route tables on Android?

  • It's /data/misc/net/rt_tables on Android. But Android's limited ip command doesn't read rt_tables at all. You need to build iproute2 package. Be noted that routing on Android is far complex than normal Linux distros. – Irfan Latif Sep 29 '20 at 2:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.