How to Connect to rild Socket
On the java end of the rild socket is an instance of com.android.internal.telephony.RIL.java, which is owned by com.android.phone.PhoneApp.java. PhoneApp is a persistent app which, not surprisingly, provides the phone functionality. Disabling PhoneApp should kill any java-side use of the rild socket.
You also might want to try connecting to "rild-debug", which is unused (but may be ignored by the ril-daemon).
BTW - You can see the comms between the RIL layers by doing logcat -b radio.
Please post back if you come up with a workaround.
In recent versions of Android (and, likely, in the earlier versions), rild-debug
is not meant to accept a full range of commands; only predefined commands are accepted.
Check out ril.cpp here;
static void debugCallback (int fd, short flags, void *param)... case 0: LOGI ("Connection on debug port: issuing reset."); issueLocalRequest(RIL_REQUEST_RESET_RADIO, NULL, 0); break; case 1: LOGI ("Connection on debug port: issuing radio power off."); data = 0; issueLocalRequest(RIL_REQUEST_RADIO_POWER, &data, sizeof(int)); // Close the socket close(s_fdCommand); s_fdCommand = -1; break;
UPD: also, RIL requests are incrementally numbered and it's very easy to effectively break the ril/phoneapp pairing by issuing an out-of-the-series event.