What is the interface to RIL daemon? I know the Android HAL defines an interface for Radio Interface Layer (RIL) manufacturers to abide by, which is the one used by ril daemon to talk to vendor-specific ril shared libraries. But what I couldn't find is the interface to talk to the ril daemon itself.

How does the phone service speak to rild through /dev/socket/rild unix socket? and where is the source files of the phone service?
For anyone who's been in my situation , you'll find the sources of the phone service that are related to RIL under frameworks/opt/telephony/src/java/com/android/internal/telephony/RIL.java.