You are on page 1of 1

Version 1:

mount -o remount,rw /system /system


cat > /system/bin/fix.sh << END
#!/bin/sh
sleep 60
iptables -F
ebtables -F
iptables -t nat -A POSTROUTING -o br0 -j MASQUERADE
iptables -I INPUT -i br0 -j ACCEPT
ebtables -t nat -D PREROUTING -p IPv4 --logical-in br0 --mark 0x0/0xff000000 -j
mark --mark-or 0x10000000 --mark-target ACCEPT
atc AT+CFUN=0 > /dev/null 2>&1
atc AT+CFUN=1 > /dev/null 2>&1
END
chmod 775 /system/bin/fix.sh
echo /system/bin/fix.sh >> /system/etc/autorun.sh

Version 2
mount -o remount,rw /system /system
echo "#!/bin/sh" > /system/bin/fix
echo "sleep 30" >> /system/bin/fix
echo "iptables -F" >> /system/bin/fix
echo "ebtables -F" >> /system/bin/fix
echo "iptables -P INPUT ACCEPT" >> /system/bin/fix
echo "iptables -P FORWARD ACCEPT" >> /system/bin/fix
echo "iptables -t nat -A POSTROUTING -s 192.168.0.0/16 -o eth0 -j MASQUERADE" >>
/system/bin/fix
echo "iptables -t nat -A POSTROUTING -o br0 -j MASQUERADE" >> /system/bin/fix
echo "iptables -I INPUT -i br0 -j ACCEPT" >> /system/bin/fix
echo "ebtables -t nat -D PREROUTING -p IPv4 --logical-in br0 --mark 0x0/0xff000000
-j mark --mark-or 0x10000000 --mark-target ACCEPT" >> /system/bin/fix
echo "atc AT+CFUN=0 > /dev/null 2>&1" >> /system/bin/fix
echo "atc AT+CFUN=1 > /dev/null 2>&1" >> /system/bin/fix
chmod 755 /system/bin/fix
echo /system/bin/fix >> /system/etc/autorun.sh
atc AT^RESET > /dev/null 2>&1

For fixing who disconnect in few minutes.

You might also like