Sample Header Ad - 728x90

Can't enable IPv4 forwarding via adb shell

0 votes
0 answers
299 views
I've got a rooted Android phone and am trying to enable IPv4 forwarding via adb shell. If I do
host$ adb shell
phone$ su -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
then it works just fine. However,
host$ adb shell su -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
produces
/system/bin/sh: can't create /proc/sys/net/ipv4/ip_forward: Permission denied
even though adb shell cat /proc/sys/net/ipv4/ip_forward shows that the file already exists.
Asked by August Vrubel (59 rep)
Feb 16, 2023, 04:43 PM
Last activity: Apr 12, 2025, 09:01 AM