简体   繁体   中英

How to execute AT commands in Android?

Is it possible to execute AT commands on my Android phone? I want to extract layer-3 signaling information about the serving GSM network (MTP-3, RRC, ARFCN, channel type, RxQual, RxLev, etc). I did a lot of Google search but couldn't find anything useful. Android telephony API seems very restrictive (only CGI, LAI, signal strength, etc) can be obtained. It is unreliable too, for example, getBitErrorRate() always returns -1, even in dedicated mode. I read somewhere that it is possible to snoop-out some low level system information from UART interface between application processor (hosting Android OS) and baseband processor (hosting basic telephony applications). But I'm really not sure how to do that! Sorry, if the question seems out of place, but I'm hoping to get a workaround. I'm willing to root my phone!

First of all try to find information about invoking AT commands through adb interface.

Then if you get satisfying results you can root your phone and try to get the same results using code like this:

Process process = Runtime.getRuntime().exec("su -c " + command);

Where command is exactly the same you invoked in adb interface.

Monitor both:

process.getInputStream();
process.getErrorStream();

for the result of the command.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM