[英]Sending RIL command on galaxy / nexus
I wonder how can I send commands to rild - not rild-debug. 我想知道如何将命令发送到rild-而不是rild-debug。 I have root and the program may be in c / java.
我有root用户,程序可能在c / java中。
I tried radiooptions ( https://github.com/mozilla-b2g/android-hardware-ril/blob/master/rild/radiooptions.c ). 我尝试了radiooptions( https://github.com/mozilla-b2g/android-hardware-ril/blob/master/rild/radiooptions.c )。
but radiooptions uses rild-debug and not rild. 但是radiooptions使用rild-debug而不是rild。 I tried to change to SOCKET_NAME_RIL_DEBUG to SOCKET_NAME_RIL but the program didn't do nothing..
我试图将SOCKET_NAME_RIL_DEBUG更改为SOCKET_NAME_RIL,但是该程序没有执行任何操作。
There is any way I can send raw RIL commands ? 有什么方法可以发送原始的RIL命令? (Maybe directly from adb ?)
(也许直接来自adb?)
Thanks in advance. 提前致谢。
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);
Well, I found a way to do it with xposed: 好吧,我找到了一种使用xposed的方法:
we can find the class: 我们可以找到该类:
com.android.internal.telephony.RIL
find methods in it, and invoke them. 在其中找到方法并调用它们。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.