Sending AT Commands Via ADB Android

Sani Yusuf picture Sani Yusuf · Oct 12, 2012 · Viewed 44.2k times · Source

I have a task at work to investigate if it is possible to send AT commands to an android device via ADB shell. So far,I have tried to echo out the AT commands but it passes them as normal strings. Any help please anyone.

Answer

Nippey picture Nippey · Oct 12, 2012

Please try this:

echo -e "AT+CFUN=?\r\n" > /dev/ttyUSB0

On your phone, the serial line must not necessarily be called ttyUSB0. If this is not working or not available, check out the other entries of the /dev/ directory.
So it could also be /dev/ttyGS0 or /dev/SMD0 (as found out by @Sani).

For further information, please check out this Guide


NOTE:

There might also be phones, that do not respond to AT commands on any of their serial (tty) devices.
I just tried my own procedure on a Samsung Galaxy S4 and did not have any success.