Get correct Android device serial number from Windows and WPD

Guillaume Doucet 25 Reputation points
2023-03-02T18:41:06.3133333+00:00

Hi,

I have two Android devices connected via USB to my computer and I am trying to get their individual serial numbers.

I am using the Windows Portable Device API and I am using the WPD_DEVICE_SERIAL_NUMBER property to query the serial numbers. The returned values match the ones I get from the device properties panel (Right clicking on the devices in Windows Explorer \ This PC) but they do not match the actual devices serial numbers.

The values seem to be a CLSID but I cannot find a way to either query the actual device serial number directly or convert the CLSID value to the real one. Is this possible?

Thank you

Guillaume D.

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,072 questions
Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,499 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,613 questions
{count} vote

1 answer

Sort by: Most helpful
  1. Limitless Technology 44,091 Reputation points
    2023-03-03T16:30:48.08+00:00

    Hi. Thank you for your question and reaching out. I’d be more than happy to help you with your query.

    You can actually see it in the device manager. Click the start Windows > Device Manager > Portable Devices > Android device > Properties button. Another Windows will open and you will have to switch from Details tab from Properties Windows and then select "Device Instance Path" by dropping the "Property". Then you will see your seral number there.

    If the reply was helpful, please don’t forget to upvote or accept as answer, thank you.