Did you ever heard about iPhone supervision? If Not, I'm gonna deep dive into this topic in advance and we will go through interesting things you might not heard it before.
Basically, iPhone Supervision is a method used to give developers (In some cases users) more advanced and detailed features in a MDM (Mobile Device Management) environment. Apple provide a set of commands and techniques in their MDM protocol to manage almost every feature of iPhone/iPad (they also support macOS and other devices, but we'll focus only on iPhone/iPad in this article).
Basically, iPhone Supervision is a method used to give developers (In some cases users) more advanced and detailed features in a MDM (Mobile Device Management) environment. Apple provide a set of commands and techniques in their MDM protocol to manage almost every feature of iPhone/iPad (they also support macOS and other devices, but we'll focus only on iPhone/iPad in this article).
If you search for Apple MDM commands, you will come up commands like Get Installed Applications (on device), Restart Device, Shutdown Device, etc. All things that Apple banned developers to use with their Swift API is available with this commands. Although some of the interesting commands and actions are restricted by Supervision Mode Required field in their meta data table provided by Apple.
That's enough about MDM and it's commands cause I assume you already know what's going on and let's dive into step by step gaining access to Supervision Mode WITHOUT Erasing Device data with Apple Configurator.
This technique is used in some Parental Control apps like Wondershare Famisafe application. But now, You will find out what's going on behind the scene!
Step 1:
First of all, we are gonna use amazing 3rd-party library called libimobiledevice (https://libimobiledevice.org). This library allows us to communicate to Apple devices via USB cable connection (or Network). We'll only utilize this library tools, not compiling and modifying them. just install they tools using homebrew and read below.
Step 2:
Enabling Supervision Mode is tricky as hell, just one mistake and you will lose all your device data and configuration. Trust me, I've been there, I've seen things you can't even imagine.
Now, Connect a iPhone or iPad to your macOS via USB cable.
Step 3:
Get a list of connected devices to your macOS by this command:
>>> idevice_id
you will see a UDID (Unique Device Identifier) and a connection type which is typically USB. Go ahead and copy desired device UDID and save it somewhere casue we will use this alot.
Step 4:
The main part of supervision mode is the supervised backup data. to achieve this, please comment your need on this blog and share your email and I will send you the ZIP files required to use. This is because supervision needs an Apple MDM server, you have to come across with your own server with MicroMDM.
After that, download and unzip the zip file and enter this command:
>>> idevicebackup2 restore --settings --skip-apps YOUR_EXTRACTED_BACKUP_FOLDER
This command restores a backup that is already supervised with a very small footprint on device config and settings to device. we passed skip apps argument to avoid reinstallation of pre-installed apps on device. After that your device will be rebooted in seconds and when device is up, it's almost done. Follow on-screen guide to finishing your iPhone/iPad supervision mode.
That's all! Soon there will be Part 2 with more details and guidance.
Comments
Post a Comment