如何在 Android 设备上从 Raspberry Pi 发起呼叫

How to Initiate Call from Raspberry Pi on Android Device

所以假设我在本地网络上通过 SSH 连接到 Raspberry Pi。 现在我想从通过 USB 连接到 Raspberry Pi 的 Android 设备发起呼叫,使用终端中的命令行或镜像 Androids 屏幕并拨打号码 "by hand"。 LayOut

有人知道我怎么能意识到这一点吗?

我找到了很多关于如何使用 Android phone 控制 Raspberry Pi 的信息,但遗憾的是不是其他方法。

p.s.: 我不需要听到或与其他人说话phone。我只想用wireshark获取网络数据。

首先,您必须找到一种通过 USB 与 Android 设备通信的方法。

  1. SSH (http://sumoudou.org/How%20to%20ssh%20into%20an%20Android%20phone%20over%20USB.html)
  2. USB 串口。

然后要通过通话进行 'data' 通信,您必须想办法通过语音通道 encode/decode 数据。(即 DTMF 等)或者您始终可以选择通过 IP 进行通信.

最后,无论您的 android 设备中的什么中介 app/daemon 运行 都会将数据中继到 USB(SSH、USB 串行等)。

您可以使用 ssh 在 android ( https://android.stackexchange.com/questions/118738/how-to-ssh-into-an-unrooted-android-device-using-sshdroid-from-a-linux-computer )

上获得 shell

呼叫由 android 在 android 上管理,phone service 是 android 系统服务 ( https://anatomyofandroid.com/2013/10/03/system-services/, https://developer.android.com/guide/components/services.html )

如果您有 shell(并且如果您有 root),您可以调用

# service call phone 2 s16 "+1234567890"
service call phone 2 s16 "+1234567890"
Result: Parcel(NULL)

来源:https://davanum.wordpress.com/2007/12/12/android-calldial-from-the-adb-shell-command-line/

要镜像 android 屏幕,您可以在 android 上使用 VNC 服务器,在 Rpi

上使用 VNC 客户端