Android 如何模拟来电?

Android 如何模拟来电?,android,automated-tests,adb,telnet,Android,Automated Tests,Adb,Telnet,我发现可以在模拟器设备上实现: # connects to device telnet localhost 5554 # set the power level power status full power status charging # make a call to the device gsm call 012041293123 # send a sms to the device sms send 12345 Will be home soon # set the geo locat

我发现可以在模拟器设备上实现:

# connects to device
telnet localhost 5554
# set the power level
power status full
power status charging
# make a call to the device
gsm call 012041293123
# send a sms to the device
sms send 12345 Will be home soon
# set the geo location
geo fix 48 51
从, 但当我插入:

telnet localhost 5554
我得到以下信息:

Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused

也许这对我没什么帮助,因为我需要把cal伪装成连接到计算机上的真实设备。我需要一些adb shell命令。

您可以直接从emulator设置gui执行此操作,单击三个点,然后单击“电话”:


你在运行哪个操作系统?我在使用ubuntu 16.10我发现我可以从真实设备调用:adb shell am start-a android.intent.action.call电话:111222333,但我更愿意不使用真实设备,而只是从命令行假装来电我在测试真实设备,就我所知,我无法从avd调用真正的设备。@mordi-True。我认为不可能在真实设备上模拟通话。远程登录到本地主机的方法也只适用于模拟器。