1

I tried the code:

alias netstat='/system/xbin/busybox netstat'
alias grep='/system/xbin/busybox grep'
alias awk='/system/xbin/busybox awk'
alias route='/system/xbin/busybox route'

gateway=`netstat -rn | grep ^0\.0\.0\.0 | awk '{print $2}'`

route add -net 1.0.1.0 netmask 255.255.255.0 gw $gateway

It doesn't run and print out the manual for route command...

Does busybox support route add -net $des netmask $mask gw $gateway? If so what did I do wrong?

Update: I tried to update to magisk 12.0, and now it just shows applet not found instead...

So I did try /data/magisk/busybox route This gives me applet not found again. Then I tried /dev/busybox/route It prints '/dev/busybox/route not found'. I checked and the file '/dev/busybox/route' exists (as a shortcut), so I am not sure what is going on anymore. BTW, I did run su before I tried to run these commands.

Also if I run these commands line by line, I will get different error message than "not found" when I put them in a .sh file and run sh script.sh

1

Magisk:

/dev/busybox/route add -net 1.0.1.0 netmask 255.255.255.0 gw $(getprop net.dns1)

Busybox:

/system/xbin/busybox route add -net 1.0.1.0 netmask 255.255.255.0 gw $(getprop net.dns1)

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.