Kali Nethunter 上的 aplay

Kali Nethunter 上的 aplay

知道如何从 Kali NetHunter 上的命令行播放音频文件吗?

我在 Python 脚本中使用 aplay...它在 Kali VM 上运行良好,但在 Nethunter 上返回此错误:

“aplay:main:788:音频打开错误:参数无效”

它也不一定非要是 aplay(这正是我一直想让它工作的原因)...实际上,从命令行或通过 Nethunter 上的某种 python 脚本播放 5 秒 .wav 文件的任何方法都可以。我猜这与 aplay 与 Nexus 上的声卡接口有关。我尝试指定设备(-D hw:0,0),但它仍然返回相同的错误。

顺便说一下,在 Nexus 5 上运行这个……

谢谢!

***编辑:

所以我首先尝试了一下aplay -D front,但aplay -D plughw:0,0无济于事。它们都返回了相同的错误。

接下来,我尝试安装 pulseaudio。我通过 VNC 连接到手机上的本地 kali 桌面,这样我就可以安装/打开 VLC 播放器并将音频输出更改为脉冲。我试了aplay -D pulse又试paplay -D pulse……但都没有成功。

下面是我用 paplay 运行它时的输出:

shared memfd open() failed: Function not implemented
Connection failure: Connection refused
pa_context_connect() failed: Connection refused

这是我运行它的时候用的aplay -D pulse

shared memfd open() failed: Function not implemented
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM pulse
aplay: main:788: audio open error: No such file or directory

以下是输出aplay -L

shared memfd open() failed: Function not implemented
shared memfd open() failed: Function not implemented
null
    Discard all samples (playback) or generate zero samples (capture)
default:CARD=msm8974taikomtp
    msm8974-taiko-mtp-snd-card, 
    Default Audio Device
sysdefault:CARD=msm8974taikomtp
    msm8974-taiko-mtp-snd-card, 
    Default Audio Device
dmix:CARD=msm8974taikomtp,DEV=0
    msm8974-taiko-mtp-snd-card, 
    Direct sample mixing device
dmix:CARD=msm8974taikomtp,DEV=1
    msm8974-taiko-mtp-snd-card, 
    Direct sample mixing device
dmix:CARD=msm8974taikomtp,DEV=2
    msm8974-taiko-mtp-snd-card, 
    Direct sample mixing device
dmix:CARD=msm8974taikomtp,DEV=3
    msm8974-taiko-mtp-snd-card, 
    Direct sample mixing device
dmix:CARD=msm8974taikomtp,DEV=4
    msm8974-taiko-mtp-snd-card, 
    Direct sample mixing device
dmix:CARD=msm8974taikomtp,DEV=5
    msm8974-taiko-mtp-snd-card, 
    Direct sample mixing device
dmix:CARD=msm8974taikomtp,DEV=6
    msm8974-taiko-mtp-snd-card, 
    Direct sample mixing device
dmix:CARD=msm8974taikomtp,DEV=7
    msm8974-taiko-mtp-snd-card, 
    Direct sample mixing device
dmix:CARD=msm8974taikomtp,DEV=9
    msm8974-taiko-mtp-snd-card, 
    Direct sample mixing device
dmix:CARD=msm8974taikomtp,DEV=10
    msm8974-taiko-mtp-snd-card, 
    Direct sample mixing device
dmix:CARD=msm8974taikomtp,DEV=11
    msm8974-taiko-mtp-snd-card, 
    Direct sample mixing device
dmix:CARD=msm8974taikomtp,DEV=12
    msm8974-taiko-mtp-snd-card, 
    Direct sample mixing device
dmix:CARD=msm8974taikomtp,DEV=13
    msm8974-taiko-mtp-snd-card, 
    Direct sample mixing device
dmix:CARD=msm8974taikomtp,DEV=14
    msm8974-taiko-mtp-snd-card, 
    Direct sample mixing device
dmix:CARD=msm8974taikomtp,DEV=15
    msm8974-taiko-mtp-snd-card, 
    Direct sample mixing device
dmix:CARD=msm8974taikomtp,DEV=17
    msm8974-taiko-mtp-snd-card, 
    Direct sample mixing device
dmix:CARD=msm8974taikomtp,DEV=18
    msm8974-taiko-mtp-snd-card, 
    Direct sample mixing device
dmix:CARD=msm8974taikomtp,DEV=19
    msm8974-taiko-mtp-snd-card, 
    Direct sample mixing device
dmix:CARD=msm8974taikomtp,DEV=20
    msm8974-taiko-mtp-snd-card, 
    Direct sample mixing device
dmix:CARD=msm8974taikomtp,DEV=22
    msm8974-taiko-mtp-snd-card, 
    Direct sample mixing device
dmix:CARD=msm8974taikomtp,DEV=24
    msm8974-taiko-mtp-snd-card, 
    Direct sample mixing device
dmix:CARD=msm8974taikomtp,DEV=26
    msm8974-taiko-mtp-snd-card, 
    Direct sample mixing device
dmix:CARD=msm8974taikomtp,DEV=28
    msm8974-taiko-mtp-snd-card, 
    Direct sample mixing device
dmix:CARD=msm8974taikomtp,DEV=30
    msm8974-taiko-mtp-snd-card, 
    Direct sample mixing device
dmix:CARD=msm8974taikomtp,DEV=31
    msm8974-taiko-mtp-snd-card, 
    Direct sample mixing device
dmix:CARD=msm8974taikomtp,DEV=32
    msm8974-taiko-mtp-snd-card, 
    Direct sample mixing device
dmix:CARD=msm8974taikomtp,DEV=33
    msm8974-taiko-mtp-snd-card, 
    Direct sample mixing device
dmix:CARD=msm8974taikomtp,DEV=34
    msm8974-taiko-mtp-snd-card, 
    Direct sample mixing device
dmix:CARD=msm8974taikomtp,DEV=36
    msm8974-taiko-mtp-snd-card, 
    Direct sample mixing device
dmix:CARD=msm8974taikomtp,DEV=38
    msm8974-taiko-mtp-snd-card, 
    Direct sample mixing device
dmix:CARD=msm8974taikomtp,DEV=40
    msm8974-taiko-mtp-snd-card, 
    Direct sample mixing device
dmix:CARD=msm8974taikomtp,DEV=44
    msm8974-taiko-mtp-snd-card, 
    Direct sample mixing device
dmix:CARD=msm8974taikomtp,DEV=45
    msm8974-taiko-mtp-snd-card, 
    Direct sample mixing device
dsnoop:CARD=msm8974taikomtp,DEV=0
    msm8974-taiko-mtp-snd-card, 
    Direct sample snooping device
dsnoop:CARD=msm8974taikomtp,DEV=1
    msm8974-taiko-mtp-snd-card, 
    Direct sample snooping device
dsnoop:CARD=msm8974taikomtp,DEV=2
    msm8974-taiko-mtp-snd-card, 
    Direct sample snooping device
dsnoop:CARD=msm8974taikomtp,DEV=3
    msm8974-taiko-mtp-snd-card, 
    Direct sample snooping device
dsnoop:CARD=msm8974taikomtp,DEV=4
    msm8974-taiko-mtp-snd-card, 
    Direct sample snooping device
dsnoop:CARD=msm8974taikomtp,DEV=5
    msm8974-taiko-mtp-snd-card, 
    Direct sample snooping device
dsnoop:CARD=msm8974taikomtp,DEV=6
    msm8974-taiko-mtp-snd-card, 
    Direct sample snooping device
dsnoop:CARD=msm8974taikomtp,DEV=7
    msm8974-taiko-mtp-snd-card, 
    Direct sample snooping device
dsnoop:CARD=msm8974taikomtp,DEV=9
    msm8974-taiko-mtp-snd-card, 
    Direct sample snooping device
dsnoop:CARD=msm8974taikomtp,DEV=10

谢谢你们的帮助。我只需要让它从命令行播放。我可以更改脚本,让它使用任何可以运行的程序/实用程序。它不必是 aplay/pulse(只是想重申这一点)。

再次感谢!

编辑:

这是请求的输出: Linux version 3.4.0-gb7558f2 (root@kali) (gcc version 4.7 (GCC) ) #2 SMP PREEMPT Wed Oct 7 02:16:12 UTC 2015是 /proc/version 的输出。

我当然可以安装旧版本的 ALSA。我只是没有意识到这是问题所在。让我清除这个新版本并尝试旧版本,看看我能得到什么。

相关内容