前面讲到了如何让修改kernel驱动和ril层代码,接下来还需要增加ppp拨号以及设备文件和服务属性。
1.修改init.gprs-pppd属性
对应文件:system/core/include/private/android_filesystem_config.h
在static struct fs_path_config android_files[]中增加:
+ { 00777, AID_ROOT, AID_SHELL, "system/etc/init.gprs-pppd" },
2.修改ttyUSB设备属性
对应文件:system/core/init/devices.c
在static struct perms_ devperms[]中增加:
+ { "/dev/ttyUSB0", 0777, AID_RADIO, AID_RADIO, 0 },
+ { "/dev/ttyUSB1", 0777, AID_RADIO, AID_RADIO, 0 },
+ { "/dev/ttyUSB2", 0777, AID_RADIO, AID_RADIO, 0 },
+ { "/dev/ttyUSB3", 0777, AID_RADIO, AID_RADIO, 0 },
+ { "/dev/ttyUSB4", 0777, AID_RADIO, AID_RADIO, 0 },
+ { "/dev/ttyUSB5", 0777, AID_RADIO, AID_RADIO, 0 },
3.修改pppd_gprs服务属性
对应文件:system/core/init/property_service.c
在property_perms[]中增加:
+ { "net.ppp0.", AID_RADIO, 0 },
在control_perms[]中增加:
+ { "pppd_gprs",AID_RADIO, AID_LOG },
4.修改init.rc文件
service ril-daemon /system/bin/rild -l libreference-ril.so -- -d /dev/ttyUSB2
socket rild stream 660 root radio
socket rild-debug stream 660 radio system
user root
group radio cache inet misc
service pppd_gprs /etc/ppp/init.gprs-pppd /dev/ttyUSB0
user root
group radio cache inet misc
disabled
现在3G模块上电后就可以注册上网络,并能实现电话功能,接下来还要实现gprs拨号上网功能。
阅读(4704) | 评论(0) | 转发(0) |