在已扎根的Xperia Z Android设备上发送AT命令

在已扎根的Xperia Z Android设备上发送AT命令,第1张

概述我有一个扎根的xperiaZ手机.我想发送USSD命令并捕获答案.我的第一个想法是通过adbshell接口通过良好的接口发送AT命令.我列出了所有接口:/devty/devty50system:/devty/dev/console/dev/console51system:consol

我有一个扎根的xperia Z手机.
我想发送USSD命令并捕获答案.

我的第一个想法是通过adb shell接口通过良好的接口发送AT命令.

我列出了所有接口:

/dev/tty             /dev/tty        5       0   system:/dev/tty/dev/console         /dev/console    5       1   system:console/dev/ptmx            /dev/ptmx       5       2   system/dev/vc/0            /dev/vc/0       4       0   system:vtmasterrfcomm               /dev/rfcomm   216 0-255     serialusbserial            /dev/ttyUSB   188 0-253     serialmsm_serial_hsl       /dev/ttyHSL   244 0-3       serialmsm_serial_hs        /dev/ttyHS    245 0-255     serialpty_slave            /dev/pts      136 0-1048575 pty:slavepty_master           /dev/ptm      128 0-1048575 pty:mastersmd_tty_driver       /dev/smd      251 0-36      serialunkNown              /dev/tty        4 1-63      console

我找不到好的界面.
我尝试使用以下命令集:

root@androID:/tmp/tst # tail -f /dev/ttyHSL1 &root@androID:/tmp/tst # echo -e "AT\r" > /dev/ttyHSL1

但是我没有答案.

任何想法如何找到好的港口?

编辑1:
根据Alex P的要求.

root@androID:/ # getprop | grep -i ril[gsm.version.ril-impl]: [Qualcomm RIL 1.0][init.svc.ril-daemon]: [running][init.svc.ril-qmi]: [stopped][persist.rild.nitz_long_ons_0]: [][persist.rild.nitz_long_ons_1]: [][persist.rild.nitz_long_ons_2]: [][persist.rild.nitz_long_ons_3]: [][persist.rild.nitz_plmn]: [][persist.rild.nitz_short_ons_0]: [][persist.rild.nitz_short_ons_1]: [][persist.rild.nitz_short_ons_2]: [][persist.rild.nitz_short_ons_3]: [][persist.ro.ril.sms_sync_sending]: [1][ril.cat.first.start]: [false][ril.eccList]: [911,112][ril.icctype]: [2][ril.subscription.types]: [NV,RUIM][rild.libargs]: [-d /dev/smd0][rild.libpath]: [/system/lib/libril-qc-qmi-1.so][ro.ril.svdo]: [false][ro.ril.svlte1x]: [false][ro.ril.transmitpower]: [true]goot@androID:/ # grep -i ril /init*rc /init*sh/init.qcom.rc:    onrestart /system/bin/log -t RIL-ATFWD -p w "ATFWD daemon restarted"/init.qcom.rc:service ril-daemon1 /system/bin/rild -c 1/init.qcom.rc:    socket rild1 stream 660 root radio/init.qcom.rc:    socket rild-deBUG1 stream 660 radio system/init.rc:service ril-daemon /system/bin/rild/init.rc:    socket rild stream 660 root radio/init.rc:    socket rild-deBUG stream 660 radio system/init.target.rc:service ril-qmi /system/bin/sh /init.qcom.ril.sh/init.qcom.class_main.sh:# start ril-daemon only for targets on which radio is present/init.qcom.class_main.sh:multirild=`getprop ro.multi.rild`/init.qcom.class_main.sh:    setprop ro.radio.noril yes/init.qcom.class_main.sh:    stop ril-daemon/init.qcom.class_main.sh:          setprop ro.multi.rild true/init.qcom.class_main.sh:          stop ril-daemon/init.qcom.class_main.sh:          start ril-daemon/init.qcom.class_main.sh:          start ril-daemon1/init.qcom.class_main.sh:    case "$multirild" in/init.qcom.class_main.sh:             start ril-daemon1/init.qcom.ril.sh:# start two rild when dsds property enabled/init.qcom.ril.sh:    setprop ro.multi.rild true/init.qcom.ril.sh:    stop ril-daemon/init.qcom.ril.sh:    start ril-daemon/init.qcom.ril.sh:    start ril-daemon1root@androID:/ # busyBox netstat -lpnx | grep -i rilunix  2      [ ACC ]     STREAM     ListENING       7312 277/rild            /dev/socket/rild-deBUGunix  2      [ ACC ]     STREAM     ListENING       7314 277/rild            /dev/socket/rild

编辑2:

正如我看到的/ dev / smd0一样,我列出了所有的smd接口:

root@androID:/ # ls -l /dev/smd*ls -l /dev/smd*crw------- root     root     251,   1 2013-10-01 21:53 smd1crw------- root     root     251,  11 1970-05-31 18:07 smd11crw-rw---- bluetooth bluetooth 251,   2 1970-05-31 18:07 smd2crw------- root     root     251,  21 1970-05-31 18:07 smd21crw------- root     root     250,   8 1970-05-31 18:07 smd22crw------- root     root     251,  27 1970-05-31 18:07 smd27crw-rw---- bluetooth bluetooth 251,   3 2013-10-01 17:45 smd3crw------- root     root     251,  36 1970-05-31 18:07 smd36crw-rw---- system   system   251,   4 1970-05-31 18:07 smd4crw------- root     root     251,   5 1970-05-31 18:07 smd5crw------- root     root     251,   6 1970-05-31 18:07 smd6crw-rw---- bluetooth bluetooth 251,   7 1970-05-31 18:07 smd7crw-r----- radio    radio    250,  22 1970-05-31 18:07 smd_cxm_qmicrw------- root     root     250,  23 1970-05-31 18:07 smd_pkt_loopbackcrw------- root     root     250,  21 1970-05-31 18:07 smd_sns_adspcrw------- root     root     250,  18 1970-05-31 18:07 smd_sns_dspscrw------- root     root     250,   9 1970-05-31 18:07 smdcnt_rev0crw------- root     root     250,  10 1970-05-31 18:07 smdcnt_rev1crw------- root     root     250,  11 1970-05-31 18:07 smdcnt_rev2crw------- root     root     250,  12 1970-05-31 18:07 smdcnt_rev3crw------- root     root     250,  13 1970-05-31 18:07 smdcnt_rev4crw------- root     root     250,  14 1970-05-31 18:07 smdcnt_rev5crw------- root     root     250,  15 1970-05-31 18:07 smdcnt_rev6crw------- root     root     250,  16 1970-05-31 18:07 smdcnt_rev7crw------- root     root     250,  17 1970-05-31 18:07 smdcnt_rev8crw-r----- radio    radio    250,   0 1970-05-31 18:07 smdcntl0crw-r----- radio    radio    250,   1 1970-05-31 18:07 smdcntl1crw-r----- radio    radio    250,   2 1970-05-31 18:07 smdcntl2crw-r----- radio    radio    250,   3 1970-05-31 18:07 smdcntl3crw-r----- radio    radio    250,   4 1970-05-31 18:07 smdcntl4crw-r----- radio    radio    250,   5 1970-05-31 18:07 smdcntl5crw-r----- radio    radio    250,   6 1970-05-31 18:07 smdcntl6crw-r----- radio    radio    250,   7 1970-05-31 18:07 smdcntl7crw------- root     root     250,  20 1970-05-31 18:07 smdcntl8

我没有安装/ dev / smd0接口

编辑3:

我尝试了套接字解决方案:

new-host:platform-tools julio$./adb forward tcp:8080 localfilesystem:/dev/socket/rild-deBUG* daemon not running. starting it Now on port 5037 ** daemon started successfully *new-host:platform-tools julio$>>> MaSocket = socket.socket(socket.AF_INET,socket.soCK_STREAM)>>> MaSocket.connect(('127.0.0.1',8080))>>> MaSocket.send('AT\r\n')4>>> print MaSocket.recv(1)Traceback (most recent call last):  file "<stdin>", line 1, in <module>socket.error: [Errno 54] Connection reset by peer>>> print MaSocket.recv(1)>>> 

解决方法:

我遇到过同样的问题:
您可以使用/ dev / smd7,/ dev / sdm8,/ dev / smd11
例如:

echo "AT\r" | busyBox microcom -t 500 /dev/smd11
总结

以上是内存溢出为你收集整理的在已扎根的Xperia Z Android设备上发送AT命令全部内容,希望文章能够帮你解决在已扎根的Xperia Z Android设备上发送AT命令所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1075878.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-26
下一篇 2022-05-26

发表评论

登录后才能评论

评论列表(0条)

保存