@mcesystems/apple-kit 1.0.23 → 1.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/README.md +284 -250
  2. package/dist/index.js +304 -174
  3. package/dist/index.js.map +4 -4
  4. package/dist/index.mjs +303 -173
  5. package/dist/index.mjs.map +4 -4
  6. package/dist/resources/bin/darwin/idevice_id +0 -0
  7. package/dist/resources/bin/darwin/idevicedebug +0 -0
  8. package/dist/resources/bin/darwin/idevicediagnostics +0 -0
  9. package/dist/resources/bin/darwin/ideviceinfo +0 -0
  10. package/dist/resources/bin/darwin/ideviceinstaller +0 -0
  11. package/dist/resources/bin/darwin/idevicename +0 -0
  12. package/dist/resources/bin/darwin/idevicepair +0 -0
  13. package/dist/resources/bin/darwin/idevicescreenshot +0 -0
  14. package/dist/resources/bin/darwin/idevicesyslog +0 -0
  15. package/dist/resources/bin/darwin/iproxy +0 -0
  16. package/dist/resources/bin/darwin/libcrypto.3.dylib +0 -0
  17. package/dist/resources/bin/darwin/libimobiledevice-1.0.6.dylib +0 -0
  18. package/dist/resources/bin/darwin/libimobiledevice-glue-1.0.0.dylib +0 -0
  19. package/dist/resources/bin/darwin/liblzma.5.dylib +0 -0
  20. package/dist/resources/bin/darwin/libplist-2.0.4.dylib +0 -0
  21. package/dist/resources/bin/darwin/libssl.3.dylib +0 -0
  22. package/dist/resources/bin/darwin/libusbmuxd-2.0.7.dylib +0 -0
  23. package/dist/resources/bin/darwin/libzip.5.dylib +0 -0
  24. package/dist/resources/bin/darwin/libzstd.1.dylib +0 -0
  25. package/{resources → dist/resources}/licenses/LGPL-2.1.txt +33 -33
  26. package/dist/types/index.d.ts +0 -2
  27. package/dist/types/index.d.ts.map +1 -1
  28. package/dist/types/logic/actions/device.d.ts.map +1 -1
  29. package/dist/types/logic/actions/proxy.d.ts.map +1 -1
  30. package/dist/types/logic/appleDeviceKit.d.ts +2 -7
  31. package/dist/types/logic/appleDeviceKit.d.ts.map +1 -1
  32. package/package.json +7 -4
  33. package/scripts/README.md +209 -0
  34. package/scripts/build-windows.sh.template +134 -0
  35. package/scripts/export-resources.ts +444 -0
  36. package/dist/types/utils/portManager.d.ts +0 -68
  37. package/dist/types/utils/portManager.d.ts.map +0 -1
  38. package/resources/bin/windows/bz2.dll +0 -0
  39. package/resources/bin/windows/getopt.dll +0 -0
  40. package/resources/bin/windows/iconv-2.dll +0 -0
  41. package/resources/bin/windows/idevice_id.exe +0 -0
  42. package/resources/bin/windows/ideviceactivation.exe +0 -0
  43. package/resources/bin/windows/idevicedebug.exe +0 -0
  44. package/resources/bin/windows/ideviceinfo.exe +0 -0
  45. package/resources/bin/windows/ideviceinstaller.exe +0 -0
  46. package/resources/bin/windows/idevicepair.exe +0 -0
  47. package/resources/bin/windows/imobiledevice.dll +0 -0
  48. package/resources/bin/windows/iproxy.exe +0 -0
  49. package/resources/bin/windows/libcrypto-1_1-x64.dll +0 -0
  50. package/resources/bin/windows/libcurl.dll +0 -0
  51. package/resources/bin/windows/libideviceactivation-1.0.dll +0 -0
  52. package/resources/bin/windows/libimobiledevice-1.0.dll +0 -0
  53. package/resources/bin/windows/libimobiledevice-glue-1.0.dll +0 -0
  54. package/resources/bin/windows/libplist-2.0.dll +0 -0
  55. package/resources/bin/windows/libssl-1_1-x64.dll +0 -0
  56. package/resources/bin/windows/libusb-1.0.dll +0 -0
  57. package/resources/bin/windows/libusb0.dll +0 -0
  58. package/resources/bin/windows/libusbmuxd-2.0.dll +0 -0
  59. package/resources/bin/windows/libxml2.dll +0 -0
  60. package/resources/bin/windows/lzma.dll +0 -0
  61. package/resources/bin/windows/pcre.dll +0 -0
  62. package/resources/bin/windows/pcreposix.dll +0 -0
  63. package/resources/bin/windows/plist.dll +0 -0
  64. package/resources/bin/windows/pthreadVC3.dll +0 -0
  65. package/resources/bin/windows/readline.dll +0 -0
  66. package/resources/bin/windows/usbmuxd.dll +0 -0
  67. package/resources/bin/windows/usbmuxd.exe +0 -0
  68. package/resources/bin/windows/vcruntime140.dll +0 -0
  69. package/resources/bin/windows/zip.dll +0 -0
  70. package/resources/bin/windows/zlib1.dll +0 -0
  71. package/resources/lib/include/libimobiledevice/afc.h +0 -413
  72. package/resources/lib/include/libimobiledevice/bt_packet_logger.h +0 -156
  73. package/resources/lib/include/libimobiledevice/companion_proxy.h +0 -212
  74. package/resources/lib/include/libimobiledevice/debugserver.h +0 -272
  75. package/resources/lib/include/libimobiledevice/diagnostics_relay.h +0 -228
  76. package/resources/lib/include/libimobiledevice/file_relay.h +0 -166
  77. package/resources/lib/include/libimobiledevice/heartbeat.h +0 -137
  78. package/resources/lib/include/libimobiledevice/house_arrest.h +0 -180
  79. package/resources/lib/include/libimobiledevice/installation_proxy.h +0 -505
  80. package/resources/lib/include/libimobiledevice/libimobiledevice.h +0 -444
  81. package/resources/lib/include/libimobiledevice/lockdown.h +0 -577
  82. package/resources/lib/include/libimobiledevice/misagent.h +0 -168
  83. package/resources/lib/include/libimobiledevice/mobile_image_mounter.h +0 -275
  84. package/resources/lib/include/libimobiledevice/mobileactivation.h +0 -192
  85. package/resources/lib/include/libimobiledevice/mobilebackup.h +0 -246
  86. package/resources/lib/include/libimobiledevice/mobilebackup2.h +0 -214
  87. package/resources/lib/include/libimobiledevice/mobilesync.h +0 -359
  88. package/resources/lib/include/libimobiledevice/notification_proxy.h +0 -202
  89. package/resources/lib/include/libimobiledevice/ostrace.h +0 -198
  90. package/resources/lib/include/libimobiledevice/preboard.h +0 -187
  91. package/resources/lib/include/libimobiledevice/property_list_service.h +0 -184
  92. package/resources/lib/include/libimobiledevice/restore.h +0 -179
  93. package/resources/lib/include/libimobiledevice/reverse_proxy.h +0 -213
  94. package/resources/lib/include/libimobiledevice/sbservices.h +0 -175
  95. package/resources/lib/include/libimobiledevice/screenshotr.h +0 -118
  96. package/resources/lib/include/libimobiledevice/service.h +0 -202
  97. package/resources/lib/include/libimobiledevice/syslog_relay.h +0 -184
  98. package/resources/lib/include/libimobiledevice/webinspector.h +0 -137
  99. package/resources/lib/include/plist/Array.h +0 -80
  100. package/resources/lib/include/plist/Boolean.h +0 -48
  101. package/resources/lib/include/plist/Data.h +0 -50
  102. package/resources/lib/include/plist/Date.h +0 -54
  103. package/resources/lib/include/plist/Dictionary.h +0 -73
  104. package/resources/lib/include/plist/Integer.h +0 -54
  105. package/resources/lib/include/plist/Key.h +0 -49
  106. package/resources/lib/include/plist/Node.h +0 -57
  107. package/resources/lib/include/plist/Real.h +0 -48
  108. package/resources/lib/include/plist/String.h +0 -52
  109. package/resources/lib/include/plist/Structure.h +0 -62
  110. package/resources/lib/include/plist/Uid.h +0 -48
  111. package/resources/lib/include/plist/plist++.h +0 -39
  112. package/resources/lib/include/plist/plist.h +0 -1448
  113. package/resources/lib/libimobiledevice-1.0.dll +0 -0
  114. package/resources/lib/libimobiledevice-1.0.dll.a +0 -0
  115. package/resources/lib/libplist-2.0.dll +0 -0
  116. package/resources/lib/libplist-2.0.dll.a +0 -0
@@ -1,168 +0,0 @@
1
- /**
2
- * @file libimobiledevice/misagent.h
3
- * @brief Manage provisioning profiles.
4
- * \internal
5
- *
6
- * Copyright (c) 2013-2014 Martin Szulecki All Rights Reserved.
7
- * Copyright (c) 2012 Nikias Bassen All Rights Reserved.
8
- *
9
- * This library is free software; you can redistribute it and/or
10
- * modify it under the terms of the GNU Lesser General Public
11
- * License as published by the Free Software Foundation; either
12
- * version 2.1 of the License, or (at your option) any later version.
13
- *
14
- * This library is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
- * Lesser General Public License for more details.
18
- *
19
- * You should have received a copy of the GNU Lesser General Public
20
- * License along with this library; if not, write to the Free Software
21
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22
- */
23
-
24
- #ifndef IMISAGENT_H
25
- #define IMISAGENT_H
26
-
27
- #ifdef __cplusplus
28
- extern "C" {
29
- #endif
30
-
31
- #include <libimobiledevice/libimobiledevice.h>
32
- #include <libimobiledevice/lockdown.h>
33
-
34
- /** Service identifier passed to lockdownd_start_service() to start the misagent service */
35
- #define MISAGENT_SERVICE_NAME "com.apple.misagent"
36
-
37
- /** Error Codes */
38
- typedef enum {
39
- MISAGENT_E_SUCCESS = 0,
40
- MISAGENT_E_INVALID_ARG = -1,
41
- MISAGENT_E_PLIST_ERROR = -2,
42
- MISAGENT_E_CONN_FAILED = -3,
43
- MISAGENT_E_REQUEST_FAILED = -4,
44
- MISAGENT_E_UNKNOWN_ERROR = -256
45
- } misagent_error_t;
46
-
47
- typedef struct misagent_client_private misagent_client_private; /**< \private */
48
- typedef misagent_client_private *misagent_client_t; /**< The client handle. */
49
-
50
- /* Interface */
51
-
52
- /**
53
- * Connects to the misagent service on the specified device.
54
- *
55
- * @param device The device to connect to.
56
- * @param service The service descriptor returned by lockdownd_start_service.
57
- * @param client Pointer that will point to a newly allocated
58
- * misagent_client_t upon successful return.
59
- *
60
- * @return MISAGENT_E_SUCCESS on success, MISAGENT_E_INVALID_ARG when
61
- * client is NULL, or an MISAGENT_E_* error code otherwise.
62
- */
63
- LIBIMOBILEDEVICE_API misagent_error_t misagent_client_new(idevice_t device, lockdownd_service_descriptor_t service, misagent_client_t *client);
64
-
65
- /**
66
- * Starts a new misagent service on the specified device and connects to it.
67
- *
68
- * @param device The device to connect to.
69
- * @param client Pointer that will point to a newly allocated
70
- * misagent_client_t upon successful return. Must be freed using
71
- * misagent_client_free() after use.
72
- * @param label The label to use for communication. Usually the program name.
73
- * Pass NULL to disable sending the label in requests to lockdownd.
74
- *
75
- * @return MISAGENT_E_SUCCESS on success, or an MISAGENT_E_* error
76
- * code otherwise.
77
- */
78
- LIBIMOBILEDEVICE_API misagent_error_t misagent_client_start_service(idevice_t device, misagent_client_t* client, const char* label);
79
-
80
- /**
81
- * Disconnects an misagent client from the device and frees up the
82
- * misagent client data.
83
- *
84
- * @param client The misagent client to disconnect and free.
85
- *
86
- * @return MISAGENT_E_SUCCESS on success, MISAGENT_E_INVALID_ARG when
87
- * client is NULL, or an MISAGENT_E_* error code otherwise.
88
- */
89
- LIBIMOBILEDEVICE_API misagent_error_t misagent_client_free(misagent_client_t client);
90
-
91
-
92
- /**
93
- * Installs the given provisioning profile. Only works with valid profiles.
94
- *
95
- * @param client The connected misagent to use for installation
96
- * @param profile The valid provisioning profile to install. This has to be
97
- * passed as a PLIST_DATA, otherwise the function will fail.
98
- *
99
- * @return MISAGENT_E_SUCCESS on success, MISAGENT_E_INVALID_ARG when
100
- * client is invalid, or an MISAGENT_E_* error code otherwise.
101
- */
102
- LIBIMOBILEDEVICE_API misagent_error_t misagent_install(misagent_client_t client, plist_t profile);
103
-
104
- /**
105
- * Retrieves all installed provisioning profiles (iOS 9.2.1 or below).
106
- *
107
- * @param client The connected misagent to use.
108
- * @param profiles Pointer to a plist_t that will be set to a PLIST_ARRAY
109
- * if the function is successful.
110
- *
111
- * @return MISAGENT_E_SUCCESS on success, MISAGENT_E_INVALID_ARG when
112
- * client is invalid, or an MISAGENT_E_* error code otherwise.
113
- *
114
- * @note This API call only works with iOS 9.2.1 or below.
115
- * For newer iOS versions use misagent_copy_all() instead.
116
- *
117
- * @note If no provisioning profiles are installed on the device, this function
118
- * still returns MISAGENT_E_SUCCESS and profiles will just point to an
119
- * empty array.
120
- */
121
- LIBIMOBILEDEVICE_API misagent_error_t misagent_copy(misagent_client_t client, plist_t* profiles);
122
-
123
- /**
124
- * Retrieves all installed provisioning profiles (iOS 9.3 or higher).
125
- *
126
- * @param client The connected misagent to use.
127
- * @param profiles Pointer to a plist_t that will be set to a PLIST_ARRAY
128
- * if the function is successful.
129
- *
130
- * @return MISAGENT_E_SUCCESS on success, MISAGENT_E_INVALID_ARG when
131
- * client is invalid, or an MISAGENT_E_* error code otherwise.
132
- *
133
- * @note This API call only works with iOS 9.3 or higher.
134
- * For older iOS versions use misagent_copy() instead.
135
- *
136
- * @note If no provisioning profiles are installed on the device, this function
137
- * still returns MISAGENT_E_SUCCESS and profiles will just point to an
138
- * empty array.
139
- */
140
- LIBIMOBILEDEVICE_API misagent_error_t misagent_copy_all(misagent_client_t client, plist_t* profiles);
141
-
142
- /**
143
- * Removes a given provisioning profile.
144
- *
145
- * @param client The connected misagent to use.
146
- * @param profileID Identifier of the provisioning profile to remove.
147
- * This is a UUID that can be obtained from the provisioning profile data.
148
- * @see misagent_copy
149
- *
150
- * @return MISAGENT_E_SUCCESS on success, MISAGENT_E_INVALID_ARG when
151
- * client is invalid, or an MISAGENT_E_* error code otherwise.
152
- */
153
- LIBIMOBILEDEVICE_API misagent_error_t misagent_remove(misagent_client_t client, const char* profileID);
154
-
155
- /**
156
- * Retrieves the status code from the last operation.
157
- *
158
- * @param client The misagent to use.
159
- *
160
- * @return -1 if client is invalid, or the status code from the last operation
161
- */
162
- LIBIMOBILEDEVICE_API int misagent_get_status_code(misagent_client_t client);
163
-
164
- #ifdef __cplusplus
165
- }
166
- #endif
167
-
168
- #endif
@@ -1,275 +0,0 @@
1
- /**
2
- * @file libimobiledevice/mobile_image_mounter.h
3
- * @brief Mount developer/debug disk images on the device.
4
- * \internal
5
- *
6
- * Copyright (c) 2010-2014 Martin Szulecki All Rights Reserved.
7
- * Copyright (c) 2010-2014 Nikias Bassen All Rights Reserved.
8
- *
9
- * This library is free software; you can redistribute it and/or
10
- * modify it under the terms of the GNU Lesser General Public
11
- * License as published by the Free Software Foundation; either
12
- * version 2.1 of the License, or (at your option) any later version.
13
- *
14
- * This library is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
- * Lesser General Public License for more details.
18
- *
19
- * You should have received a copy of the GNU Lesser General Public
20
- * License along with this library; if not, write to the Free Software
21
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22
- */
23
-
24
- #ifndef IMOBILE_IMAGE_MOUNTER_H
25
- #define IMOBILE_IMAGE_MOUNTER_H
26
-
27
- #ifdef __cplusplus
28
- extern "C" {
29
- #endif
30
-
31
- #include <libimobiledevice/libimobiledevice.h>
32
- #include <libimobiledevice/lockdown.h>
33
-
34
- /** Service identifier passed to lockdownd_start_service() to start the mobile image mounter service */
35
- #define MOBILE_IMAGE_MOUNTER_SERVICE_NAME "com.apple.mobile.mobile_image_mounter"
36
-
37
- /** Error Codes */
38
- typedef enum {
39
- MOBILE_IMAGE_MOUNTER_E_SUCCESS = 0,
40
- MOBILE_IMAGE_MOUNTER_E_INVALID_ARG = -1,
41
- MOBILE_IMAGE_MOUNTER_E_PLIST_ERROR = -2,
42
- MOBILE_IMAGE_MOUNTER_E_CONN_FAILED = -3,
43
- MOBILE_IMAGE_MOUNTER_E_COMMAND_FAILED = -4,
44
- MOBILE_IMAGE_MOUNTER_E_DEVICE_LOCKED = -5,
45
- MOBILE_IMAGE_MOUNTER_E_NOT_SUPPORTED = -6,
46
- MOBILE_IMAGE_MOUNTER_E_UNKNOWN_ERROR = -256
47
- } mobile_image_mounter_error_t;
48
-
49
- typedef struct mobile_image_mounter_client_private mobile_image_mounter_client_private; /**< \private */
50
- typedef mobile_image_mounter_client_private *mobile_image_mounter_client_t; /**< The client handle. */
51
-
52
- /** callback for image upload */
53
- typedef ssize_t (*mobile_image_mounter_upload_cb_t) (void* buffer, size_t length, void *user_data);
54
-
55
- /* Interface */
56
-
57
- /**
58
- * Connects to the mobile_image_mounter service on the specified device.
59
- *
60
- * @param device The device to connect to.
61
- * @param service The service descriptor returned by lockdownd_start_service.
62
- * @param client Pointer that will be set to a newly allocated
63
- * mobile_image_mounter_client_t upon successful return.
64
- *
65
- * @return MOBILE_IMAGE_MOUNTER_E_SUCCESS on success,
66
- * MOBILE_IMAGE_MOUNTER_E_INVALID_ARG if device is NULL,
67
- * or MOBILE_IMAGE_MOUNTER_E_CONN_FAILED if the connection to the
68
- * device could not be established.
69
- */
70
- LIBIMOBILEDEVICE_API mobile_image_mounter_error_t mobile_image_mounter_new(idevice_t device, lockdownd_service_descriptor_t service, mobile_image_mounter_client_t *client);
71
-
72
- /**
73
- * Starts a new mobile_image_mounter service on the specified device and connects to it.
74
- *
75
- * @param device The device to connect to.
76
- * @param client Pointer that will point to a newly allocated
77
- * mobile_image_mounter_t upon successful return. Must be freed using
78
- * mobile_image_mounter_free() after use.
79
- * @param label The label to use for communication. Usually the program name.
80
- * Pass NULL to disable sending the label in requests to lockdownd.
81
- *
82
- * @return MOBILE_IMAGE_MOUNTER_E_SUCCESS on success, or an MOBILE_IMAGE_MOUNTER_E_* error
83
- * code otherwise.
84
- */
85
- LIBIMOBILEDEVICE_API mobile_image_mounter_error_t mobile_image_mounter_start_service(idevice_t device, mobile_image_mounter_client_t* client, const char* label);
86
-
87
- /**
88
- * Disconnects a mobile_image_mounter client from the device and frees up the
89
- * mobile_image_mounter client data.
90
- *
91
- * @param client The mobile_image_mounter client to disconnect and free.
92
- *
93
- * @return MOBILE_IMAGE_MOUNTER_E_SUCCESS on success,
94
- * or MOBILE_IMAGE_MOUNTER_E_INVALID_ARG if client is NULL.
95
- */
96
- LIBIMOBILEDEVICE_API mobile_image_mounter_error_t mobile_image_mounter_free(mobile_image_mounter_client_t client);
97
-
98
-
99
- /**
100
- * Tells if the image of ImageType is already mounted.
101
- *
102
- * @param client The client use
103
- * @param image_type The type of the image to look up
104
- * @param result Pointer to a plist that will receive the result of the
105
- * operation.
106
- *
107
- * @note This function may return MOBILE_IMAGE_MOUNTER_E_SUCCESS even if the
108
- * operation has failed. Check the resulting plist for further information.
109
- *
110
- * @return MOBILE_IMAGE_MOUNTER_E_SUCCESS on success, or an error code on error
111
- */
112
- LIBIMOBILEDEVICE_API mobile_image_mounter_error_t mobile_image_mounter_lookup_image(mobile_image_mounter_client_t client, const char *image_type, plist_t *result);
113
-
114
- /**
115
- * Uploads an image with an optional signature to the device.
116
- *
117
- * @param client The connected mobile_image_mounter client.
118
- * @param image_type Type of image that is being uploaded.
119
- * @param image_size Total size of the image.
120
- * @param signature Buffer with a signature of the image being uploaded. If
121
- * NULL, no signature will be used.
122
- * @param signature_size Total size of the image signature buffer. If 0, no
123
- * signature will be used.
124
- * @param upload_cb Callback function that gets the data chunks for uploading
125
- * the image.
126
- * @param userdata User defined data for the upload callback function.
127
- *
128
- * @return MOBILE_IMAGE_MOUNTER_E_SUCCESS on succes, or a
129
- * MOBILE_IMAGE_MOUNTER_E_* error code otherwise.
130
- */
131
- LIBIMOBILEDEVICE_API mobile_image_mounter_error_t mobile_image_mounter_upload_image(mobile_image_mounter_client_t client, const char *image_type, size_t image_size, const unsigned char *signature, unsigned int signature_size, mobile_image_mounter_upload_cb_t upload_cb, void* userdata);
132
-
133
- /**
134
- * Mounts an image on the device.
135
- *
136
- * @param client The connected mobile_image_mounter client.
137
- * @param image_path The absolute path of the image to mount. The image must
138
- * be present before calling this function.
139
- * @param signature Pointer to a buffer holding the images' signature
140
- * @param signature_size Length of the signature image_signature points to
141
- * @param image_type Type of image to mount
142
- * @param options A dictionary containing additional key/value pairs to add
143
- * @param result Pointer to a plist that will receive the result of the
144
- * operation.
145
- *
146
- * @note This function may return MOBILE_IMAGE_MOUNTER_E_SUCCESS even if the
147
- * operation has failed. Check the resulting plist for further information.
148
- *
149
- * @return MOBILE_IMAGE_MOUNTER_E_SUCCESS on success,
150
- * MOBILE_IMAGE_MOUNTER_E_INVALID_ARG if on ore more parameters are
151
- * invalid, or another error code otherwise.
152
- */
153
- LIBIMOBILEDEVICE_API mobile_image_mounter_error_t mobile_image_mounter_mount_image_with_options(mobile_image_mounter_client_t client, const char *image_path, const unsigned char *signature, unsigned int signature_size, const char *image_type, plist_t options, plist_t *result);
154
-
155
- /**
156
- * Mounts an image on the device.
157
- *
158
- * @param client The connected mobile_image_mounter client.
159
- * @param image_path The absolute path of the image to mount. The image must
160
- * be present before calling this function.
161
- * @param signature Pointer to a buffer holding the images' signature
162
- * @param signature_size Length of the signature image_signature points to
163
- * @param image_type Type of image to mount
164
- * @param result Pointer to a plist that will receive the result of the
165
- * operation.
166
- *
167
- * @note This function may return MOBILE_IMAGE_MOUNTER_E_SUCCESS even if the
168
- * operation has failed. Check the resulting plist for further information.
169
- *
170
- * @return MOBILE_IMAGE_MOUNTER_E_SUCCESS on success,
171
- * MOBILE_IMAGE_MOUNTER_E_INVALID_ARG if on ore more parameters are
172
- * invalid, or another error code otherwise.
173
- */
174
- LIBIMOBILEDEVICE_API mobile_image_mounter_error_t mobile_image_mounter_mount_image(mobile_image_mounter_client_t client, const char *image_path, const unsigned char *signature, unsigned int signature_size, const char *image_type, plist_t *result);
175
-
176
- /**
177
- * Unmount a mounted image at given path on the device.
178
- *
179
- * @param client The connected mobile_image_mounter client.
180
- * @param mount_path The mount path of the mounted image on the device.
181
- *
182
- * @return MOBILE_IMAGE_MOUNTER_E_SUCCESS on success,
183
- * or a MOBILE_IMAGE_MOUNTER_E_* error code on error.
184
- */
185
- LIBIMOBILEDEVICE_API mobile_image_mounter_error_t mobile_image_mounter_unmount_image(mobile_image_mounter_client_t client, const char *mount_path);
186
-
187
- /**
188
- * Hangs up the connection to the mobile_image_mounter service.
189
- * This functions has to be called before freeing up a mobile_image_mounter
190
- * instance. If not, errors appear in the device's syslog.
191
- *
192
- * @param client The client to hang up
193
- *
194
- * @return MOBILE_IMAGE_MOUNTER_E_SUCCESS on success,
195
- * MOBILE_IMAGE_MOUNTER_E_INVALID_ARG if client is invalid,
196
- * or another error code otherwise.
197
- */
198
- LIBIMOBILEDEVICE_API mobile_image_mounter_error_t mobile_image_mounter_hangup(mobile_image_mounter_client_t client);
199
-
200
- /**
201
- * Query the developer mode status of the given device.
202
- *
203
- * @param client The connected mobile_image_mounter client.
204
- * @param result A pointer to a plist_t that will be set to the resulting developer mode status dictionary.
205
- *
206
- * @return MOBILE_IMAGE_MOUNTER_E_SUCCESS on success,
207
- * or a MOBILE_IMAGE_MOUNTER_E_* error code on error.
208
- */
209
- LIBIMOBILEDEVICE_API mobile_image_mounter_error_t mobile_image_mounter_query_developer_mode_status(mobile_image_mounter_client_t client, plist_t *result);
210
-
211
- /**
212
- * Query a personalization nonce for the given image type, used for personalized disk images (iOS 17+).
213
- * This nonce is supposed to be added to the TSS request for the corresponding image.
214
- *
215
- * @param client The connected mobile_image_mounter client.
216
- * @param image_type The image_type to get the personalization nonce for, usually `DeveloperDiskImage`.
217
- * @param nonce Pointer that will be set to an allocated buffer with the nonce value.
218
- * @param nonce_size Pointer to an unsigned int that will receive the size of the nonce value.
219
- *
220
- * @return MOBILE_IMAGE_MOUNTER_E_SUCCESS on success,
221
- * or a MOBILE_IMAGE_MOUNTER_E_* error code on error.
222
- */
223
- LIBIMOBILEDEVICE_API mobile_image_mounter_error_t mobile_image_mounter_query_nonce(mobile_image_mounter_client_t client, const char* image_type, unsigned char** nonce, unsigned int* nonce_size);
224
-
225
- /**
226
- * Query personalization identitifers for the given image_type.
227
- *
228
- * @param client The connected mobile_image_mounter client.
229
- * @param image_type The image_type to get the personalization identifiers for. Can be NULL.
230
- * @param result A pointer to a plist_t that will be set to the resulting identifier dictionary.
231
- *
232
- * @return MOBILE_IMAGE_MOUNTER_E_SUCCESS on success,
233
- * or a MOBILE_IMAGE_MOUNTER_E_* error code on error.
234
- */
235
- LIBIMOBILEDEVICE_API mobile_image_mounter_error_t mobile_image_mounter_query_personalization_identifiers(mobile_image_mounter_client_t client, const char* image_type, plist_t *result);
236
-
237
- /**
238
- *
239
- * @param client The connected mobile_image_mounter client.
240
- * @param image_type The image_type to get the personalization identifiers for. Can be NULL.
241
- * @param signature The signature of the corresponding personalized image.
242
- * @param signature_size The size of signature.
243
- * @param manifest Pointer that will be set to an allocated buffer with the manifest data.
244
- * @param manifest_size Pointer to an unsigned int that will be set to the size of the manifest data.
245
- *
246
- * @return MOBILE_IMAGE_MOUNTER_E_SUCCESS on success,
247
- * or a MOBILE_IMAGE_MOUNTER_E_* error code on error.
248
- */
249
- LIBIMOBILEDEVICE_API mobile_image_mounter_error_t mobile_image_mounter_query_personalization_manifest(mobile_image_mounter_client_t client, const char* image_type, const unsigned char* signature, unsigned int signature_size, unsigned char** manifest, unsigned int* manifest_size);
250
-
251
- /**
252
- * Roll the personalization nonce.
253
- *
254
- * @param client The connected mobile_image_mounter client.
255
- *
256
- * @return MOBILE_IMAGE_MOUNTER_E_SUCCESS on success,
257
- * or a MOBILE_IMAGE_MOUNTER_E_* error code on error.
258
- */
259
- LIBIMOBILEDEVICE_API mobile_image_mounter_error_t mobile_image_mounter_roll_personalization_nonce(mobile_image_mounter_client_t client);
260
-
261
- /**
262
- * Roll the Cryptex nonce.
263
- *
264
- * @param client The connected mobile_image_mounter client.
265
- *
266
- * @return MOBILE_IMAGE_MOUNTER_E_SUCCESS on success,
267
- * or a MOBILE_IMAGE_MOUNTER_E_* error code on error.
268
- */
269
- LIBIMOBILEDEVICE_API mobile_image_mounter_error_t mobile_image_mounter_roll_cryptex_nonce(mobile_image_mounter_client_t client);
270
-
271
- #ifdef __cplusplus
272
- }
273
- #endif
274
-
275
- #endif
@@ -1,192 +0,0 @@
1
- /**
2
- * @file libimobiledevice/mobileactivation.h
3
- * @brief Handle device activation and deactivation.
4
- * \internal
5
- *
6
- * Copyright (c) 2016-2017 Nikias Bassen, All Rights Reserved.
7
- *
8
- * This library is free software; you can redistribute it and/or
9
- * modify it under the terms of the GNU Lesser General Public
10
- * License as published by the Free Software Foundation; either
11
- * version 2.1 of the License, or (at your option) any later version.
12
- *
13
- * This library is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
- * Lesser General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU Lesser General Public
19
- * License along with this library; if not, write to the Free Software
20
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
- */
22
-
23
- #ifndef IMOBILEACTIVATION_H
24
- #define IMOBILEACTIVATION_H
25
-
26
- #ifdef __cplusplus
27
- extern "C" {
28
- #endif
29
-
30
- #include <libimobiledevice/libimobiledevice.h>
31
- #include <libimobiledevice/lockdown.h>
32
-
33
- /** Service identifier passed to lockdownd_start_service() to start the mobile activation service */
34
- #define MOBILEACTIVATION_SERVICE_NAME "com.apple.mobileactivationd"
35
-
36
- /** Error Codes */
37
- typedef enum {
38
- MOBILEACTIVATION_E_SUCCESS = 0,
39
- MOBILEACTIVATION_E_INVALID_ARG = -1,
40
- MOBILEACTIVATION_E_PLIST_ERROR = -2,
41
- MOBILEACTIVATION_E_MUX_ERROR = -3,
42
- MOBILEACTIVATION_E_UNKNOWN_REQUEST = -4,
43
- MOBILEACTIVATION_E_REQUEST_FAILED = -5,
44
- MOBILEACTIVATION_E_UNKNOWN_ERROR = -256
45
- } mobileactivation_error_t;
46
-
47
- typedef struct mobileactivation_client_private mobileactivation_client_private; /**< \private */
48
- typedef mobileactivation_client_private *mobileactivation_client_t; /**< The client handle. */
49
-
50
- /**
51
- * Connects to the mobileactivation service on the specified device.
52
- *
53
- * @param device The device to connect to.
54
- * @param service The service descriptor returned by lockdownd_start_service.
55
- * @param client Reference that will point to a newly allocated
56
- * mobileactivation_client_t upon successful return.
57
- *
58
- * @return MOBILEACTIVATION_E_SUCCESS on success,
59
- * MOBILEACTIVATION_E_INVALID_ARG when one of the parameters is invalid,
60
- * or MOBILEACTIVATION_E_MUX_ERROR when the connection failed.
61
- */
62
- LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_client_new(idevice_t device, lockdownd_service_descriptor_t service, mobileactivation_client_t *client);
63
-
64
- /**
65
- * Starts a new mobileactivation service on the specified device and connects to it.
66
- *
67
- * @param device The device to connect to.
68
- * @param client Pointer that will point to a newly allocated
69
- * mobileactivation_client_t upon successful return. Must be freed using
70
- * mobileactivation_client_free() after use.
71
- * @param label The label to use for communication. Usually the program name.
72
- * Pass NULL to disable sending the label in requests to lockdownd.
73
- *
74
- * @return MOBILEACTIVATION_E_SUCCESS on success, or an MOBILEACTIVATION_E_*
75
- * error code otherwise.
76
- */
77
- LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_client_start_service(idevice_t device, mobileactivation_client_t* client, const char* label);
78
-
79
- /**
80
- * Disconnects a mobileactivation client from the device and frees up the
81
- * mobileactivation client data.
82
- *
83
- * @param client The mobileactivation client to disconnect and free.
84
- *
85
- * @return MOBILEACTIVATION_E_SUCCESS on success,
86
- * MOBILEACTIVATION_E_INVALID_ARG when one of client or client->parent
87
- * is invalid, or MOBILEACTIVATION_E_UNKNOWN_ERROR when the was an
88
- * error freeing the parent property_list_service client.
89
- */
90
- LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_client_free(mobileactivation_client_t client);
91
-
92
-
93
- /**
94
- * Retrieves the device's activation state.
95
- *
96
- * @param client The mobileactivation client.
97
- * @param state Pointer to a plist_t variable that will be set to the
98
- * activation state reported by the mobileactivation service. The
99
- * consumer is responsible for freeing the returned object using
100
- * plist_free().
101
- *
102
- * @return MOBILEACTIVATION_E_SUCCESS on success, or an MOBILEACTIVATION_E_*
103
- * error code otherwise.
104
- */
105
- LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_get_activation_state(mobileactivation_client_t client, plist_t *state);
106
-
107
- /**
108
- * Retrieves a session blob required for 'drmHandshake' via albert.apple.com.
109
- *
110
- * @param client The mobileactivation client
111
- * @param blob Pointer to a plist_t variable that will be set to the
112
- * session blob created by the mobielactivation service. The
113
- * consumer is responsible for freeing the returned object using
114
- * plist_free().
115
- *
116
- * @return MOBILEACTIVATION_E_SUCCESS on success, or an MOBILEACTIVATION_E_*
117
- * error code otherwise.
118
- */
119
- LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_create_activation_session_info(mobileactivation_client_t client, plist_t *blob);
120
-
121
- /**
122
- * Retrieves the activation info required for device activation.
123
- *
124
- * @param client The mobileactivation client
125
- * @param info Pointer to a plist_t variable that will be set to the
126
- * activation info created by the mobileactivation service. The
127
- * consumer is responsible for freeing the returned object using
128
- * plist_free().
129
- *
130
- * @return MOBILEACTIVATION_E_SUCCESS on success, or an MOBILEACTIVATION_E_*
131
- * error code otherwise.
132
- */
133
- LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_create_activation_info(mobileactivation_client_t client, plist_t *info);
134
-
135
- /**
136
- * Retrieves the activation info required for device activation in 'session'
137
- * mode. This function expects a handshake result retrieved from
138
- * https://albert.apple.com/deviceservies/drmHandshake with a blob
139
- * provided by mobileactivation_create_activation_session_info().
140
- *
141
- * @param client The mobileactivation client
142
- * @param handshake_response The handshake response returned from drmHandshake
143
- * @param info Pointer to a plist_t variable that will be set to the
144
- * activation info created by the mobileactivation service. The
145
- * consumer is responsible for freeing the returned object using
146
- * plist_free().
147
- *
148
- * @return MOBILEACTIVATION_E_SUCCESS on success, or an MOBILEACTIVATION_E_*
149
- * error code otherwise.
150
- */
151
- LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_create_activation_info_with_session(mobileactivation_client_t client, plist_t handshake_response, plist_t *info);
152
-
153
- /**
154
- * Activates the device with the given activation record.
155
- * The activation record plist dictionary must be obtained using the
156
- * activation protocol requesting from Apple's https webservice.
157
- *
158
- * @param client The mobileactivation client
159
- * @param activation_record The activation record plist dictionary
160
- *
161
- * @return MOBILEACTIVATION_E_SUCCESS on success, or an MOBILEACTIVATION_E_*
162
- * error code otherwise.
163
- */
164
- LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_activate(mobileactivation_client_t client, plist_t activation_record);
165
-
166
- /**
167
- * Activates the device with the given activation record in 'session' mode.
168
- * The activation record plist must be obtained using the
169
- * activation protocol requesting from Apple's https webservice.
170
- *
171
- * @param client The mobileactivation client
172
- * @param activation_record The activation record in plist format
173
- * @param headers A plist dictionary with the activation response headers
174
- * as returned from Apple's https webservice with the activation record
175
- *
176
- * @return MOBILEACTIVATION_E_SUCCESS on success, or an MOBILEACTIVATION_E_*
177
- * error code otherwise.
178
- */
179
- LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_activate_with_session(mobileactivation_client_t client, plist_t activation_record, plist_t headers);
180
-
181
- /**
182
- * Deactivates the device.
183
- *
184
- * @param client The mobileactivation client
185
- */
186
- LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_deactivate(mobileactivation_client_t client);
187
-
188
- #ifdef __cplusplus
189
- }
190
- #endif
191
-
192
- #endif