qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-discuss] Setting USB mass storage device (-usbdevice disk) VID, PI


From: Wicher
Subject: [Qemu-discuss] Setting USB mass storage device (-usbdevice disk) VID, PID serial etc.
Date: Fri, 31 Jul 2015 11:17:59 +0200

Hi,

Recently I needed to sandbox some software, running it inside Qemu off
of a disk image of the USB stick it came on.
However, Qemu's USB mass storage device emulation (-usbdevice disk)
shows up as a "QEMU USB HARDDRIVE" with VID:PID of 46f4:0001.
The sandboxed software didn't like that at all, and refused to run. So
I patched Qemu to take VID, PID, serial etc. from the command line
arguments,
for example: "-usbdevice
disk:format=raw:vid=0a6b:pid=0001:manufacturer=Whoever:product=Whatever:serial=324324:/path/to/stick.img"
.

I'm posting the patch here for other people to find, should they
develop the same VID-faking needs.
Yes, I've read http://wiki.qemu.org/Contribute/SubmitAPatch.
I'm not posting the patch to -dev as it's a one-off single-purpose
hack, not a proper solution. For instance, it crumbles if you add more
than one '-usbdevice disk' device.

Cheers, Wicher

Attachment: qemu-2.3.0-usbmass.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]