【问题标题】:adb shell command for playing audio on Genymotion用于在 Genymotion 上播放音频的 adb shell 命令
【发布时间】:2017-03-06 21:15:00
【问题描述】:

我想使用 adb 命令自动运行应用程序。我知道如何发送swiptouch 等命令。如何播放音频文件以模拟语音?

我有测试跟随,但它们都不起作用。

>adb shell tinyplay bird.wav
Unable to open file 'bird.wav'

>adb shell stagefright -a -o bird.wav 
Unable to create data source.

我使用Genymotion 作为安卓设备。

【问题讨论】:

    标签: android audio adb genymotion


    【解决方案1】:

    您可以使用提供的文件位置启动活动。

    试试这个-

    adb shell am start -a android.intent.action.VIEW -d file:///storage/sdcard0/sample.mp3 -t audio/mp3

    【讨论】:

    • 您提供的命令,创建一个意图。但我想播放声音作为设备的输入,就像你在设备上说话时一样。
    • 澄清一下——您的最终目标是在模拟器中播放声音,而音频文件位于模拟器中。对吗?
    • 我想在whatsapp之类的应用程序中模拟用户操作现在我想模拟谈话动作,首先我使用adb命令单击一个按钮 adb shell input tap 200 300 然后我想从麦克风给它一个音频文件。音频文件可以位于模拟器或运行模拟器的主机中(首选主机)。
    猜你喜欢
    • 2014-12-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-12-01
    • 2010-12-06
    • 1970-01-01
    • 1970-01-01
    • 2015-02-01
    相关资源
    最近更新 更多