First, you need to know how RIL is started. Take G1 as an example.
Init. RC:
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
/System/build. Prop:
Ro. RIL. hsxpa = 1
Ro. RIL. GPRS sclass = 10
Rild. libpath =/system/lib/libhtc_ril.so
Read/hardware/RIL/rild. C.
If/system/bin/rild starts with a parameter, the parameter is parsed; otherwise, the system variable rild. libpath is found.
You can also finish writing in one breath without following the G1:
Init. RC:
/System/bin/rild-L/system/lib/libreference-ril.so-D/dev/ttys0
There is a comment in/hardware/RIL/rild. C: "Special override when in the emulator", followed by # If 1... # EndifCodeBlock.
It reads/proc/cmdline,
# Cat/proc/cmdline, the value on the simulator
Qemu = 1 Console = ttys0 Android. checkjni = 1 Android. qemud = ttys1 Android. NDNS = 2
If the matching string "android. qemud" is found, it indicates that the system runs on the simulator and overwrites the RIL system settings. The connection is the/dev/socket/qemud prepared for the simulator.
Therefore, in the development and production version, you need to change # If 1 to # If 0, or remove the generated/proc/cmdline configuration from Android. qemud in the compiling kernel.
The best way to debug RIL is to open the log of Radio:
$ ADB logcat-B radio
It is best to add the log syntax brightness tool coloredlogcat. py
Some common log tags should be clear:
RIL:/hardware/RIL/reference-RIL/refereince-ril.c
At:/hardware/RIL/reference-RIL/atchannel. c
Rild:/hardware/RIL/rild. c
Rilc:/hardware/RIL/libril/RIL. cpp
Rilb frameworks/base/telephony/Java/COM/Android/Internal/telephony/basecommands. Java
Rilj:/frameworks/base/telephony/Java/COM/Android/Internal/telephony/GSM/RIL. Java
GSM:/frameworks/base/telephony/Java/COM/Android/Internal/telephony/GSM/gsmphone. Java
How to connect a GSM Modem to the simulator?
See http://i-miss-erin.blogspot.com/2009/09/android-emulator-external-gsm-modem.html