哪个大神有中兴B860av2.1双线自动切换脚本!先谢过了
#!/system/bin/shappid="8"
time_count=0
while [ 1 ]
do
time_count=`expr $time_count + 0.5`
check_app=$( dumpsys window w | grep -E com.zte.browser | grep / | busybox wc -l )
if [ "$check_app" -ge $appid ] ; then
ifconfig eth0:1 down
ifconfig eth0 up
fi
if [ "$check_app" -lt $appid ] ; then
ifconfig eth0:1 up
ifconfig eth0 down
fi
sleep 0.5
if [ $time_count -gt 181 ] ; then
exit 0
fi
done #!/system/bin/sh
routeip="192.168.1.11"
routegw="192.168.1.1"
routenet="192.168.1.0"
routemask="255.255.255.0"
tvgw="10.230.0.1"
appid="7"
time_count=0
while [ 1 ]
do
time_count=`expr $time_count + 0.5`
check_app=$( dumpsys window w | grep -E com.zte.browser | grep / | busybox wc -l )
if [ "$check_app" -ge $appid ] ; then
ifconfig eth0:1 $routeip netmask $routemask down
route del -net $routenet netmask $routemask
route del default gw $routegw
route add default gw $tvgw
fi
if [ "$check_app" -lt $appid ] ; then
ifconfig eth0:1 $routeip netmask $routemask up
route add -net $routenet netmask $routemask gw $routegw
route add default gw $routegw
route del default gw $tvgw
fi
sleep 0.5
if [ $time_count -gt 181 ] ; then
exit 0
fi
done 用这个脚本连接网不能改变IP 一米阳光大神看到给个脚本。谢谢了。等级太低不能给你打招呼 https://www.znds.com/tv-566144-1-1.html可以参考一下这个 https://www.znds.com/tv-579100-1-1.html 看看这个有没有用 都不行 #!/system/bin/shrouteip="192.168.1.2" routegw="192.168.1.1" routenet="192.168.1.0" routemask="255.255.255.0" tvgw="10.1.1.1" appid="8"time_count=0 while [ 1 ] do time_count=`expr $time_count + 0.5` check_app=$( dumpsys window w | grep -E com.zte.browser | grep / | busybox wc -l ) if [ "$check_app" -ge $appid ] ; then ifconfig eth0:1 $routeip netmask $routemask down route del -net $routenet netmask $routemask route del default gw $routegw route add default gw $tvgw fi if [ "$check_app" -lt $appid ] ; then ifconfig eth0:1 $routeip netmask $routemask up route add -net $routenet netmask $routemask gw $routegw route add default gw $routegw route del default gw $tvgw fi sleep 0.5 if [ $time_count -gt 181 ] ; then exit 0 fi done
页:
[1]