Skip to content

android ril module for huawei 3g - new version - many changes by ejtagle

Notifications You must be signed in to change notification settings

wpc009/huaweigeneric-ril

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The modules has still a few problems:

* required modify init.rc add:
	on device-added-/dev/ttyUSB0
	chmod 0777 /dev/ttyUSB0
	on device-added-/dev/ttyUSB1
	chmod 0777 /dev/ttyUSB1
	on device-added-/dev/ttyUSB2
	chmod 0777 /dev/ttyUSB2
	on device-added-/dev/ttyUSB3
	chmod 0777 /dev/ttyUSB3
	on device-added-/dev/ttyUSB4
	chmod 0777 /dev/ttyUSB4
	on device-added-/dev/ttyUSB5
	chmod 0777 /dev/ttyUSB5


	on boot
	service ril-daemon /system/bin/rild
	socket rild stream 660 root radio
	socket rild-debug stream 660 radio system
	user root
	group radio cache inet misc audio


* Edit system/build.prop ,add:
	# for 3g
	rild.libpath=/system/lib/libhuaweigeneric-ril.so
	rild.libargs=-d /dev/ttyUSB2 -v /dev/ttyUSB1
	keyguard.no_require_sim=1


----

	pppd must be suid ROOT, and kernel must include ppp support compiled in
	/system/etc/ppp/ip-up and also /system/etc/ppp/ip-down must also be suid ROOT
	
----

	You also need the following files in /system/etc/ppp

----	
/system/etc/ppp/ip-up:

#!/system/bin/sh
case $1 in
    ppp1)
	/android/bin/iptables --flush;
	/android/bin/iptables --table nat --flush;
	/android/bin/iptables --delete-chain;
	/android/bin/iptables --table nat --append POSTROUTING --out-interface ppp0 -j MASQUERADE;
	/android/bin/iptables --append FORWARD --in-interface ppp1 -j ACCEPT;
	echo 0 > /proc/sys/net/ipv4/ip_forward;
	echo 1 > /proc/sys/net/ipv4/ip_forward;
	;;
    ppp0)
    /system/bin/setprop "net.interfaces.defaultroute" "$LINKNAME";
    ;;
esac

/system/bin/setprop "net.$LINKNAME.dns1" "$DNS1"
/system/bin/setprop "net.$LINKNAME.dns2" "$DNS2" 
/system/bin/setprop "net.$LINKNAME.local-ip" "$IPLOCAL" 
/system/bin/setprop "net.$LINKNAME.remote-ip" "$IPREMOTE" 
/system/bin/setprop "net.$LINKNAME.gw" "$IPREMOTE"
/system/bin/setprop "net.$LINKNAME.if" "$IFNAME"


----
/system/etc/ppp/ip-down:

#!/system/bin/sh
case $1 in
    ppp1)
	echo 0 > /proc/sys/net/ipv4/ip_forward;
	;;
esac

/system/bin/setprop "net.$LINKNAME.dns1" ""
/system/bin/setprop "net.$LINKNAME.dns2" "" 
/system/bin/setprop "net.$LINKNAME.local-ip" "" 
/system/bin/setprop "net.$LINKNAME.remote-ip" "" 
/system/bin/setprop "net.$LINKNAME.gw" ""
/system/bin/setprop "net.$LINKNAME.if" ""
 

About

android ril module for huawei 3g - new version - many changes by ejtagle

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 90.8%
  • C++ 7.1%
  • Objective-C 1.9%
  • Makefile 0.2%