A101 tether start usb.sh

Материал из YourcmcWiki
Это снимок страницы. Он включает старые, но не удалённые версии шаблонов и изображений.
Перейти к: навигация, поиск
<div style="height: 100px; overflow: scroll; padding: 2px; border: 1px solid gray; background-color: white">
<source lang="bash">
#!/bin/sh
 
# $1 is the user (not a mandatory argument)
# $2 is the password (not a mandatory argument)
 
echo "tether_start" >> /sdcard/LOG
insmod /lib/modules/musb_hdrc.ko mode_default=1
insmod /lib/modules/cdc-acm.ko
insmod /lib/modules/usbserial.ko
insmod /sdcard/option.ko
 
if [ -c /dev/ttyACM0 ]; then
    DEV=/dev/ttyACM0
else
    DEV=/dev/ttyUSB0
    cp -a /dev/ttyUSB0 /dev/ttyACM0
fi
 
if [$# -eq 0 ]
then
    /system/bin/pppd $DEV 921600 call tether
else
    /system/bin/pppd $DEV 921600 name $1 password $2 call tether
fi
</source>
</div>