diff --git a/Netimobiledevice/Backup/DeviceBackup.cs b/Netimobiledevice/Backup/DeviceBackup.cs index 01ac1c0..6edd6dc 100644 --- a/Netimobiledevice/Backup/DeviceBackup.cs +++ b/Netimobiledevice/Backup/DeviceBackup.cs @@ -451,6 +451,13 @@ private bool IsPasscodeRequiredBeforeBackup() return true; } } + else if (queryResponse.TryGetValue("Status", out PropertyNode? statusNode)) { + if (statusNode.AsStringNode().Value == "MobileGestaltDeprecated") { + // Assume that the passcode is set for now + // TODO Try and find a new way to tell if the devices passcode is set + return true; + } + } } } return false; diff --git a/Netimobiledevice/Diagnostics/DiagnosticsService.cs b/Netimobiledevice/Diagnostics/DiagnosticsService.cs index 758522d..bec5b29 100644 --- a/Netimobiledevice/Diagnostics/DiagnosticsService.cs +++ b/Netimobiledevice/Diagnostics/DiagnosticsService.cs @@ -46,7 +46,7 @@ public sealed class DiagnosticsService : BaseService "DeviceClass", "DeviceColor", "DiagData", - "DiskUsage", + "DiskUsage", "encrypted-data-partition", "EthernetMacAddress", "FirmwareVersion", @@ -200,11 +200,11 @@ public DictionaryNode MobileGestalt(List keys) } if (response.ContainsKey("Diagnostics")) { PropertyNode status = response["Diagnostics"].AsDictionaryNode()["MobileGestalt"].AsDictionaryNode()["Status"]; - if (status.AsStringNode().Value != "Success") { + if (status.AsStringNode().Value != "Success" && status.AsStringNode().Value != "MobileGestaltDeprecated") { throw new Exception("Failed to query MobileGestalt"); } } - + return response["Diagnostics"].AsDictionaryNode()["MobileGestalt"].AsDictionaryNode(); }