About Android RIL debugging

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.