Get Unique hardware ID in b4j
tested on windows only you can test on mac or linux
8 method to get Unique hardware id
updated v1.8
fixed error in none_ui apps
removed all unnecessary methods
two new method added
Get_HWID1
Get_HWID2
updated v2.0
Using java standard functions without modification
Changed Lib Name to juuid (jpadina deprecated)
added Get_MachineID2
added Email Validation
updated v2.1
added Get_HddId3
updated v2.2
added Get_HddID4(String Driveletter)
updated v2.3
added Get_LocalHardisk_Info
updated v2.4
Added :
Get_CPUID2
Get_CPUName
Get_TotalPhysicalMemory
Get_MotherBoardName
Get_AllMacIds
Get_GpuName
Get_GpuID
Get_RandomUuid
How Use :
Any function that has no result returns a null value
lib (jar and xml files) atteched.
tested on windows only you can test on mac or linux
8 method to get Unique hardware id
updated v1.8
fixed error in none_ui apps
removed all unnecessary methods
two new method added
Get_HWID1
Get_HWID2
updated v2.0
Using java standard functions without modification
Changed Lib Name to juuid (
added Get_MachineID2
added Email Validation
updated v2.1
added Get_HddId3
updated v2.2
added Get_HddID4(String Driveletter)
updated v2.3
added Get_LocalHardisk_Info
updated v2.4
Added :
Get_CPUID2
Get_CPUName
Get_TotalPhysicalMemory
Get_MotherBoardName
Get_AllMacIds
Get_GpuName
Get_GpuID
Get_RandomUuid
How Use :
B4X:
Dim pdd As jUUID
Log(pdd.Get_CPUID )
Log( pdd.Get_HddID1 )
Log( pdd.Get_HddID2 )
Log( pdd.Get_HddID3 )
Log( pdd.Get_HddID4("C") ) //Hard drive letter
Log ( pdd.Get_MachineID )
Log ( pdd.Get_MachineID2 )
Log ( pdd.Get_MacId )
Log ( pdd.Get_MotherboardSN )
Log( pdd.Get_HWID1 ) 'hardware + software > can change with changing windows or user
Log( pdd.Get_HWID2 ) 'hardware + software > can change with changing windows or user
Dim l As List = p.Get_LocalHardisk_Info
For i=1 To l.Size-1
Log(l.Get(i))
Next
B4X:
Sub GetUid As String
Dim pdd As jUUID
Dim sr As String=pdd.Get_MotherboardSN
If sr<>Null Then
sr=pdd.Get_MotherboardSN
Else If pdd.Get_CPUID<>Null Then
sr = pdd.Get_CPUID
Else If pdd.Get_MachineID<>Null Then
sr=pdd.Get_MachineID
Else If pdd.Get_MachineID2<>Null Then
sr=pdd.Get_MachineID2
Else If pdd.Get_HddID1<>Null Then
sr=pdd.Get_HddID1
Else If pdd.Get_HddID2<>Null Then
sr=pdd.Get_HddID2
Else If pdd.Get_MacId<>Null Then
sr=pdd.Get_MacId
End If
Return sr
End Sub
Any function that has no result returns a null value
lib (jar and xml files) atteched.
Attachments
Last edited: