usb storage - USB Storage
Interact with USB Mass Storage Devices
usb storage mount - Mount USB Mass Storage Device
Mount a USB Mass Storage Device’s filesystem.
PLT locates the device (by id, by path, or by the default DUT USB-C port), reads
its USB serial number, finds the corresponding block device, and mounts its first
partition read-write on the PLT host under an internal mount point associated with
handle. Subsequent usb storage commands, such as write and unmount below,
refer to the device by handle rather than by id/path.
Usage:
- command: usb storage mount <handle>
[id: <usbDeviceID>]
[path: <usbDevicePath>]
[retry: <retryCount>]
Argument |
Description |
|---|---|
handle |
Name used to refer to this mounted device in subsequent
|
usbDeviceID |
Optional: USB device identifiers: |
usbDevicePath |
Optional: USB device path: |
retryCount |
Optional: Number of times to retry the test step. |
Note
If neither usbDeviceID nor usbDevicePath is set, path: “1” (The DUT USB-C Port) is used.
usb storage unmount - Unmount USB Mass Storage Device
Unmount a previously mounted USB Mass Storage filesystem.
PLT attempts a normal (lazy) unmount first; if that fails, it retries with a forced unmount. Once unmounted, handle is no longer valid and must be mounted again (with usb storage mount) before further use.
Usage:
- command: usb storage unmount <handle>
[retry: <retryCount>]
Argument |
Description |
|---|---|
handle |
Handle of a previously mounted USB Mass Storage device. |
retryCount |
Optional: Number of times to retry the test step. |
usb storage write - Write to a USB Mass Storage Device
Write a file to a previously mounted USB Mass Storage Device.
fileName is read from the PLT host’s local filesystem (not the DUT’s) and copied onto
the mounted device, overwriting any existing file at the destination. fileName must be
a bare filename (no /) — this prevents using this command to copy arbitrary files off
the PLT by path traversal.
Usage:
- command: usb storage write <handle> <fileName> [<filePath>] [decompress]
[retry: <retryCount>]
Argument |
Description |
|---|---|
handle |
Handle of a previously mounted USB Mass Storage device. |
fileName |
Bare name (no path separators) of the file to write, resolved on the PLT host. |
filePath |
Optional: Destination path on the mounted device’s filesystem.
Default is |
decompress |
Optional literal flag: |
retryCount |
Optional: Number of times to retry the test step. |
Examples