diff options
author | 2022-12-10 02:22:52 +0100 | |
---|---|---|
committer | 2022-12-10 02:22:52 +0100 | |
commit | f7819059510a7b11a63ce5a93f2c335268b82787 (patch) | |
tree | 71a73c40276f508ee10a5750787138f010f24acb | |
parent | a6775bc588db13838bebec42b139748d337e7189 (diff) | |
download | libimobiledevice-f7819059510a7b11a63ce5a93f2c335268b82787.tar.gz libimobiledevice-f7819059510a7b11a63ce5a93f2c335268b82787.tar.bz2 |
tools/ideviceimagemounter: Notify user of missing Developer Mode on iOS 16+
-rw-r--r-- | tools/ideviceimagemounter.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/ideviceimagemounter.c b/tools/ideviceimagemounter.c index b854d5d..4ea38a9 100644 --- a/tools/ideviceimagemounter.c +++ b/tools/ideviceimagemounter.c | |||
@@ -224,6 +224,20 @@ int main(int argc, char **argv) | |||
224 | } | 224 | } |
225 | } | 225 | } |
226 | 226 | ||
227 | if (product_version_major == 16) { | ||
228 | uint8_t dev_mode_status = 0; | ||
229 | plist_t val = NULL; | ||
230 | ldret = lockdownd_get_value(lckd, "com.apple.security.mac.amfi", "DeveloperModeStatus", &val); | ||
231 | if (ldret == LOCKDOWN_E_SUCCESS) { | ||
232 | plist_get_bool_val(val, &dev_mode_status); | ||
233 | plist_free(val); | ||
234 | } | ||
235 | if (!dev_mode_status) { | ||
236 | printf("ERROR: You have to enable Developer Mode on the given device in order to allowing mounting a developer disk image.\n"); | ||
237 | goto leave; | ||
238 | } | ||
239 | } | ||
240 | |||
227 | lockdownd_start_service(lckd, "com.apple.mobile.mobile_image_mounter", &service); | 241 | lockdownd_start_service(lckd, "com.apple.mobile.mobile_image_mounter", &service); |
228 | 242 | ||
229 | if (!service || service->port == 0) { | 243 | if (!service || service->port == 0) { |