3

Is it possible to use a Pi zero as a USB stick while spoofing a VID & PID & sn through a service or a custom driver?

Thanks!

JSA83
  • 31
  • 2

1 Answers1

2

For USB stick and USB VID/PID see this paper related to linux gadget. (recent raspbian is require for libcomposite kernel module)

Each gadget needs to have its vendor id <VID> and product id <PID> specified::

    $ echo <VID> > idVendor
    $ echo <PID> > idProduct

A gadget also needs its serial number, manufacturer and product strings.
In order to have a place to store them, a strings subdirectory must be created
for each language, e.g.::

    $ mkdir strings/0x409

Then the strings can be specified::

    $ echo <serial number> > strings/0x409/serialnumber
    $ echo <manufacturer> > strings/0x409/manufacturer
    $ echo <product> > strings/0x409/product

You can also check isticktoit.net for libcomposite examples : Serial Adapter, Ethernet Adapter, Keyboard / Mouse / Joystick (HID) and for you probably Mass storage example.

Ephemeral
  • 2,157
  • 1
  • 6
  • 19