B4J Code Snippet Retrieve the Apple device UDID from Windows

Finding the UDID of your iPhone or iPad can sometimes prove to be a challenge. Some software enters the certificates and allows you to see the UDID code, but sometimes they don't work if the certificates have expired and in other cases the App is suspended.
(Here are some addresses that allow or allow UDID retrieval: https://www.getudid.io/ or https://webapp.diawi.com)

So how do you go about it?
When you connect an Apple device to a Windows PC with the USB port, Windows creates a Registry Key with the device's UDID and can then be retrieved.
But to avoid reading the entire log, I created a small app that retrieves all the UDIDs present in the system registry.


Steps:
1. Plug Apple device into USB port
2. Unlock the device and have it recognized by Windows
3. After recognition, disconnect it
4. Start the B4J App and ... et voilà

1627075372930.png
 

Attachments

  • UDID.zip
    3.2 KB · Views: 68
Last edited:

Star-Dust

Expert
Licensed User
Then if you want to do it manually look for this registry key: 'HKEY_LOCAL_MACHINE SYSTEM CurrentControlSet Enum USB

Open the folders starting with VID and check the variable FiendlyName, if it contains the word iphone you have found the UDID code which is the name of the sub-folder

udid2.jpg
 
Last edited:

Star-Dust

Expert
Licensed User
Update source code
I added the ability to delete keys from the registry.
I fixed some BUGS
 

Xandoca

Active Member
Licensed User
Longtime User
Great job. I took over 1 hour to get the UDID because iPhone 12 doesn't show the UDID using websites (at least mine), only using a Mac.
 

Star-Dust

Expert
Licensed User
Great job. I took over 1 hour to get the UDID because iPhone 12 doesn't show the UDID using websites (at least mine), only using a Mac.
I use an old iPhone6 because it only has the purpose of testing App (I use Android for me) and even on iPhone6 the websites no longer show the UDID
 

Sabotto

Active Member
Licensed User
I just tried the code. Just launched, without connecting any iphone, I get 3 codes, I think of devices connected in the past. With the contestaule menu I deleted them one by one. Then I clicked on the button again and the program went into error. I relaunched the program, but the 3 codes I had deleted were present again.
 

Star-Dust

Expert
Licensed User
I just tried the code. Just launched, without connecting any iphone, I get 3 codes, I think of devices connected in the past. With the contestaule menu I deleted them one by one. Then I clicked on the button again and the program went into error. I relaunched the program, but the 3 codes I had deleted were present again.
I fixed the bug that caused the App to crash after the cancellation and I updated the attached App.

In any case it seems that this key cannot be deleted, I also tried to do it by opening REGEDIT and trying to delete manually, but it doesn't seem to get results
 

Sabotto

Active Member
Licensed User
Yes, now it doesn't crash but the delete as you said doesn't work.
I plugged in an iphone and it gave me two codes one of 40 characters and one shorter
the UDID is the one from 40 right?
If so, maybe it would be better if the other did not appear or the right one was highlighted
 

Star-Dust

Expert
Licensed User
Ok. I added the length check
 

mcqueccu

Well-Known Member
Licensed User
Ok. I added the length check

Sorry to bump this thread. Kindly review this length check to support the new development.

iPhone Xs uses 24 digits instead of 40 digits using this format with a dash xxxxxxxx-xxxxxxxxxxxxxxxx (8 digits first, followed by hyphen then 16 digits)
 

Star-Dust

Expert
Licensed User
Updated
 
Top