Skip to content

Commit

Permalink
mobilebackup2: Fix missing key error for iPadOS (#1332)
Browse files Browse the repository at this point in the history
  • Loading branch information
prosch88 authored Jan 12, 2025
1 parent f859896 commit 3318b64
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pymobiledevice3/services/mobilebackup2.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from pathlib import Path

from pymobiledevice3.exceptions import AfcException, AfcFileNotFoundError, ConnectionTerminatedError, LockdownError, \
PyMobileDevice3Exception
MissingValueError, PyMobileDevice3Exception
from pymobiledevice3.lockdown import LockdownClient
from pymobiledevice3.lockdown_service_provider import LockdownServiceProvider
from pymobiledevice3.services.afc import AFC_LOCK_EX, AFC_LOCK_UN, AfcService, afc_error_t
Expand Down Expand Up @@ -272,7 +272,12 @@ def init_mobile_backup_factory_info(self, afc: AfcService):
with InstallationProxyService(self.lockdown) as ip, SpringBoardServicesService(self.lockdown) as sbs:
root_node = self.lockdown.get_value()
itunes_settings = self.lockdown.get_value(domain='com.apple.iTunes')
min_itunes_version = self.lockdown.get_value('com.apple.mobile.iTunes', 'MinITunesVersion')
try:
min_itunes_version = self.lockdown.get_value('com.apple.mobile.iTunes', 'MinITunesVersion')
except MissingValueError:
# iPadOS may not contain this value. See:
# https://github.com/doronz88/pymobiledevice3/issues/1332
min_itunes_version = '10.0.1'
app_dict = {}
installed_apps = []
apps = ip.browse(options={'ApplicationType': 'User'},
Expand Down

0 comments on commit 3318b64

Please sign in to comment.