bash 如何以root用户身份在Android终端中运行AT命令?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18183641/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 06:12:38  来源:igfitidea点击:

How to run AT commands in Android terminal as root user?

androidbashshellmodemat-command

提问by Pranit Kothari

I have root my Android mobile (Spice MI 270). I want to run AT commands. But whenever I try to run any AT command form shell, it is giving messages as 'AT not found'. My whole purpose of routing is to give AT commands to modem.

我有我的 Android 手机(Spice MI 270)。我想运行 AT 命令。但是每当我尝试运行任何 AT 命令形式的 shell 时,它都会给出“AT not found”的消息。我路由的全部目的是向调制解调器发出 AT 命令。

How should I proceed?

我应该如何进行?

Thanks.

谢谢。

回答by hlovdal

You can use the program atinoutwhich will allow you to easily send AT commands from the commands line. Example to hang up a call:

您可以使用程序atinout,它可以让您轻松地从命令行发送 AT 命令。挂断电话示例:

$ echo ATH | atinout - /dev/ttyACM0 -
ATH
OK
$

You need to find the name of the serial device for android (on desktop linux it is typically /dev/ttyACM0 but Android use something different as far as I remember).

您需要为 android 找到串行设备的名称(在桌面 linux 上,它通常是 /dev/ttyACM0 但据我所知,Android 使用不同的名称)。