hwid icon indicating copy to clipboard operation
hwid copied to clipboard

Request more information about hwid.

Open MountainAndMorning opened this issue 1 year ago • 1 comments

Can you provide more information about hwid? Where the id comes from? Is it influenced by the version of operation system. Thanks

MountainAndMorning avatar Aug 29 '23 04:08 MountainAndMorning

On Windows, the package reads the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography\MachineGuid from the registry. This is a cryptographic identifier automatically generated by Windows on installation. It is reasonably unique, but there are cases where it would be possible for it to be duplicated (e.g. sysprepped machines).

On Linux, the code reads the contents of /etc/machine-id. According to the Debian wiki,

The /etc/machine-id file contains the unique machine ID of the local system that is set during installation or boot. The machine ID is a single newline-terminated, hexadecimal, 32-character, lowercase ID. When decoded from hexadecimal, this corresponds to a 16-byte/128-bit value. This ID may not be all zeros. The identifier is reasonably unique, but can be both manually overridden by boot flags, and is reset after a reinstall of the OS.

On MacOS, the code reads IOPlatformUUID from the UEFI. From what I can ascertain, this is a unique identifier for each Mac placed in the UEFI BIOS by Apple, which survives across reinstalls, updates, or dual-boot scenarios.

jackmawer avatar Jan 07 '24 15:01 jackmawer