U3-Enabled USB Storage Devices

From Jeremy Bryan Smith
Revision as of 16:29, 5 September 2025 by Jeremy (talk | contribs)
Jump to navigation Jump to search

U3 Devices: USB Storage thumb drives that can emulate CD-ROM devices

General

Tool: u3-tool <https://sourceforge.net/projects/u3-tool/>


u3-tool package info

jeremy@desktop ~ $ aptitude show u3-tool

Package: u3-tool                         
Version: 0.3-3
State: installed
Automatically installed: no
Priority: optional
Section: universe/utils
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Uncompressed Size: 54.3 k
Depends: libc6 (>= 2.4)
Description: tool for controlling the special features of a U3 USB flash disk
 Tool for controlling USB flash devices that conform to the U3 specifications. You can do the following with your U3 flash: 
 * Replace the CD image 
 * Change the size of the virtual CD or completely remove it 
 * Enable and disable security 
 * Unlock and change the password of secured U3 device 
 * Obtain various device information
Homepage: https://sourceforge.net/projects/u3-tool/


Getting device info (via SMART)

jeremy@desktop ~ $ sudo smartctl -d scsi  -i /dev/sdb

smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.0-193-generic] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               SanDisk
Product:              U3 Cruzer Micro
Revision:             8.02
User Capacity:        3,971,677,696 bytes [3.97 GB]
Logical block size:   512 bytes
>> Terminate command early due to bad response to IEC mode page
A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.

or:

jeremy@desktop ~ $ sudo smartctl -d sat,auto  -i /dev/sdb

smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.0-193-generic] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               SanDisk
Product:              U3 Cruzer Micro
Revision:             8.02
User Capacity:        3,971,677,696 bytes [3.97 GB]
Logical block size:   512 bytes
>> Terminate command early due to bad response to IEC mode page
A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.


u3-tool program

jeremy@desktop ~ $ u3-tool -h

u3-tool 0.3 - U3 USB stick manager

Usage: u3-tool [options] <device name>

Options:
        -c                Change password
        -d                Disable device security
        -D                Dump all raw info(for debug)
        -e                Enable device security
        -h                Print this help message
        -i                Display device info
        -l <cd image>     Load CD image into device
        -p <cd size>      Repartition device
        -R                Reset device security, destroying private data
        -u                Unlock device
        -v                Use verbose output
        -V                Print version information

For the device name use:
  '/dev/sda0', '/dev/sg3'

Getting u3 device info

Basic:

jeremy@desktop ~ $ sudo u3-tool -i /dev/sdb

Total device size:   3.77 GB (4051697664 bytes)
CD size:             76.31 MB (80019456 bytes)
Data partition size: 3.70 GB (3971678208 bytes)

Detailed:

jeremy@desktop $ u3-tool -D /dev/sdb

Partition info:
 - Partition count: 0x02
 - Data partition size: 3971678208 byte(0x00765d80)
 - Unknown1: 0x00000002
 - CD size: 80019456 byte(0x00026280)
 - Unknown2: 0x00000103

Data partition info:
 - Data partition size: 3971678208 byte(0x00765d80)
 - Secured zone size: 0 byte(0x00000000)
 - Unlocked: 0x00000000
 - Password try: 0x00000000

Chip info:
 - Manufacturer: SanDisk   
 - Revision: 80200010

Property page 0x03:
 - Device size: 4051697664 byte(0x0078c000)
 - Device serial: 0877630F3011E8CD
 - Full record length: 0x00000077
 - Unknown1: 0x0b
 - Unknown2: 0x54060781
 - Unknown3: 0x54060781

Property page 0x0C:
 - Max. pass. try: 5



Removing CD image - use all space for USB FLASH STORAGE

jeremy@desktop $ sudo u3-tool -p 0 /dev/sdb

WARNING: Loading a new cd image causes the whole device to be wiped. This INCLUDES
 the data partition.
I repeat: ANY EXISTING DATA WILL BE LOST!

Are you sure you want to continue? [yn] y


jeremy@desktop $ u3-tool -i /dev/sdb
Total device size:   3.77 GB (4051697664 bytes)
CD size:             0.00  B (0 bytes)
Data partition size: 3.77 GB (4051697664 bytes)


Adding a CD image

Get the ISO size:

jeremy@desktop $ stat ubcd539.iso

  File: ubcd539.iso
  Size: 842489856       Blocks: 1638402    IO Block: 131072 regular file
Device: 3bh/59d Inode: 1718238     Links: 1
Access: (0664/-rw-rw-r--)  Uid: ( 1000/  jeremy)   Gid: ( 1000/  jeremy)
Access: 2025-09-05 10:53:48.997794508 -0500
Modify: 2025-09-05 11:01:51.577078347 -0500
Change: 2025-09-05 11:01:52.333077223 -0500
 Birth: -

Set the U3 ISO size:

jeremy@desktop $ sudo u3-tool -p 842489856  /dev/sdb

WARNING: Loading a new cd image causes the whole device to be wiped. This INCLUDES
 the data partition.
I repeat: ANY EXISTING DATA WILL BE LOST!

Are you sure you want to continue? [yn] y

Get info:

jeremy@desktop $ u3-tool -i /dev/sdb

Total device size:   3.77 GB (4051697664 bytes)
CD size:             803.50 MB (842530816 bytes)
Data partition size: 2.99 GB (3209166848 bytes)

Load the ISO (takes a long time):

jeremy@desktop $ sudo u3-tool -l ubcd539.iso /dev/sdb

|*************                                     | 26%