Sending RIL command on galaxy / nexus

1.8k views Asked by At

I wonder how can I send commands to rild - not rild-debug. I have root and the program may be in c / java.

I tried radiooptions ( https://github.com/mozilla-b2g/android-hardware-ril/blob/master/rild/radiooptions.c ).

but radiooptions uses rild-debug and not rild. I tried to change to SOCKET_NAME_RIL_DEBUG to SOCKET_NAME_RIL but the program didn't do nothing..

There is any way I can send raw RIL commands ? (Maybe directly from adb ?)

Thanks in advance.

2

There are 2 answers

0
AK87 On BEST ANSWER

Well, I found a way to do it with xposed:

we can find the class:

com.android.internal.telephony.RIL

find methods in it, and invoke them.

0
yummy On

Package:

com.android.internal.telephony

File:

com/android/internal/telephony/RIL.java

Method:

public void invokeOemRilRequestRaw(byte[] data, Message response) 

To call the method, using code:

 import com.android.internal.telephony.ITelephony;

 ITelephony it = ITelephony.Stub.asInterface(ServiceManager.getService(Context.TELEPHONY_SERVICE));
 it.invokeOemRilRequestRaw(oemReq, oemResp);

or using code(if possible):

import com.android.internal.telephony.PhoneFactory;

((PhoneBase)PhoneFactory.getDefaultPhone()).mCi.invokeOemRilRequestRaw(oemReq, oemResp);