How to get the UUID of a USB device on a Mac?

10,612

Solution 1

diskutil info -all

Lists the volume UUID and other information :)

If you need a specific disk's info, then:

diskutil info disk2s1

Solution 2

A reliable way to find UUIDs for volumes on many interfaces is to use the System Information application to generate a system report. Apple menu | About This Mac | More Info... | System Report... Now study the fine print under the interface in question.

This thread turns up in related searches, most of which get clogged by an astounding volume of misinformation and nonanswers. I've just been through a similar issue: I pulled both volumes out of an OWC hardware RAID1 array, and they were identical, including the UUIDs. I determined device ids using diskutil list then inspected each UUID using /System/Library/Filesystems/hfs.fs/hfs.util -k disk2s2 (substitute the correct disk id), then generated new, random UUIDs using sudo /System/Library/Filesystems/hfs.fs/hfs.util -s disk2s2 I unmounted and remounted the volumes, and they had new UUIDs. hfs.util has an online Apple man page found by searching.

hfs.util doesn't read UUIDs for volumes on my USB ports. I found this thread hoping for an answer, which I still don't have. This response is for future searchers who stumble onto this thread as I did, rather than for the OP. Given how search works and threads survive, it is astonishing that people still believe threads are about the OP.

Solution 3

Not sure if you have found an answer to your questions, but have you tried opening up USB Prober (utility application included with Xcode)? If so, attach your devices and then save the output to a file, and post it here, if that doesn't violate your development restrictions. There are descriptors and other device request replies that do or may include a UUID.

Solution 4

I did not get UUID for my USB Volumes from hfs.util, but did have read only access to it from Finder.

I'm on Mac OS X 10.6.8 and bought NTFS 4TB Seagate USB3.0 drive. Plugged in, Mac allowed me to read files from it, but not write to it. When I select 'Get Info' for the volume/disk, I see 'You can read only' under 'Sharing & Permissions'.
I copied a large file from Windows 10 to the USB Drive, worked fine. I then downloaded the file to Mac, worked fine, but won't allow me to write anything from Mac to the USB drive, or make any changes to it eg. delete or rename files on the USB drive. My reason for getting this USB drive formatted in NTFS was to copy files from Mac larger than 4GB to Windows for redundant backup, because of 4GB limit in FAT.

One solution I found online was to sudo echo UUID to /etc/fstab When I diskutil info, I don't get UUID. I also see the following extracts:

File System Personality: NTFS Type (Bundle): ntfs Name (User Visible): Windows NT File System (NTFS)

&

Read-Only Media: No Read-Only Volume: Yes Ejectable: Yes

My solution was to download Samsung NTFS for Mac Driver from: https://www.seagate.com/au/en/support/downloads/item/samsung-ntfs-driver-master-dl/

After installation & reboot, I noticed the following changes:

  1. When I select 'Get Info' for the volume/disk, I see 'You can read and write' under 'Sharing & Permissions'.

2. File System Personality: UFSD_NTFS Type (Bundle): ufsd_NTFS Name (User Visible): Windows NT Filesystem

3. Read-Only Media: No Read-Only Volume: No Ejectable: Yes

The readme file (pdf) that comes with the download says NTFS features also work in Mac for the USB drive. Now I can read/write to the disk, and is also visible in Finder. I've tested read & write speeds with a 2GB file, and don't see any difference in performance/speed between the NTFS & HFS+ Journaled volumes.

Finally after 2 days of reading about sudo, hfs.util & diskutil, I can now get back to backing up data from Mac 10.6 to USB NTFS drive.

Solution 5

Problem

  • USB UUIDs are information is not listed in either the System Profiler or $ system_profiler.

  • USB Prober.app no longer comes with XCode

  • $ instruments (which comes with XCode and requires a developer account) lists UUIDs but not for actively connected USB devices.

  • ideviceinstaller wasn't able to install via $ brew install ideviceinstaller

  • iOSUSBFamily has been deprecated since 10.9 (or possibly 10.14)

  • Most of these solutions require XCode (~10Gb!) and an Apple Developer account - overkill for scanning USB

Solution

I ended up installing Virtualbox then issuing the command:

$ VBoxManage list usbhost

This produced a super detailed list of USB devices and their properties:

... 

UUID:               b28dd789-a88b-4a21-9dbb-e9398a79c0f1
VendorId:           0x05ac (05AC)
ProductId:          0x027a (027A)
Revision:           9.19 (0919)
Port:               5
USB version/speed:  0/High
Manufacturer:       Apple Inc.
Product:            Apple Internal Keyboard / Trackpad
SerialNumber:       FM7852303J9HYMLAP+EDL
Address:            p=0x027a;v=0x05ac;s=0x0000161b9a5e0c32;l=0x80500000
Current State:      Unavailable

Installing a virtualizer is still overkill for this but VirtualBox is much smaller than XCode and doesn't require an Apple Developer account, plus it works on Linux and Windows.

Share:
10,612

Related videos on Youtube

radj
Author by

radj

Updated on June 04, 2022

Comments

  • radj
    radj almost 2 years

    I'm currently facing a problem where an OS application is not showing one of two devices because according to the console logs, these devices have the same UUID. The devices have different vendor IDs, different product IDs, vendor name and device name. Out of the billions of possible UUID combinations, they had to clash.

    How does the OS compute the UUID of a USB device? What USB info is it based on?

    Additional info: Their serial numbers are the same, which are both currently zero. Is UUID just based on the serial number?

  • Tony Barganski
    Tony Barganski over 5 years
    Just what I was looking for. FYI for anyone - This may help to narrow things down a little: diskutil info -all |grep -e "Device Node" -e "Proto" -e "UUID"