Saturday, March 4, 2023

iPhone DFU mode recovery error 4010 - removing supervision

 Recently I had some phones that had been supervised using Apple Configurator putting them into a business manager account.  The business was closing doors and the devices needed removed from Apple Business Manager and the supervision removed.

Removing from Apple Business Manager is easy enough.  Login and remove them, but this didn't actually remove the supervision from the device.

Backstory - these devices were older used devices that they wanted supervised.  I came up with a method for building a virtual Mac OS machine in VMWare workstation and using Apple Configurator to then add the iOS device into the Apple business manager, thus supervising the device.  Worked great and I had accomplished this a dozen times.

When the MDM product was removed it didn't remove the profile unfortunately.  Being that the MDM was closed down and not recoverable (business closed... and account had been cancelled) the best option was to factory reset the devices, BUT the profile removed the option for factory reset!  No problem, just connect in recovery mode to iTunes and restore/update.  This process would error with "This device is supervised and cannot be connected to this computer".  Yep, MDM profile that was still applied.

Time to move to DFU restore.  During this process I would repeatedly get error 4010.  I found several different items that can cause this error!

1. My newest laptop doesn't have USB ports, only USB-C.  So I couldn't directly connect the lightning cable, instead I was using an adapter which it clearly didn't like.

2. I had another laptop with USB ports.  Connecting to this laptop I found that I still got the error 4010 IF my business VPN was connected.  I disconnected and for good measure also stopped the VPN client (Fortigate).  

After moving to USB 3.0 port and ensuring the VPN was not running it worked like a charm.  DFU Mode Restore/Update completed, and I was left with a device that no longer had MDM profiles, or supervision and no 4010 errors.