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 development Windows API - Win32
Windows for business Windows Client for IT Pros User experience Other
Developer technologies C++
{count} vote

1 answer

Sort by: Most helpful
  1. Limitless Technology 44,746 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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.