Skip to content

Commit

Permalink
mobile_image_mounter: update DDI upon new release
Browse files Browse the repository at this point in the history
  • Loading branch information
doronz88 committed Sep 22, 2024
1 parent 65dddbc commit 0561ded
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pymobiledevice3/services/mobile_image_mounter.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
from pymobiledevice3.restore.tss import TSSRequest
from pymobiledevice3.services.lockdown_service import LockdownService

LATEST_DDI_BUILD_ID = '16A242d'


class MobileImageMounterService(LockdownService):
# implemented in /usr/libexec/mobile_storage_proxy
Expand Down Expand Up @@ -343,7 +345,8 @@ async def auto_mount_personalized(lockdown: LockdownServiceProvider) -> None:
build_manifest = local_path / 'BuildManifest.plist'
trustcache = local_path / 'Image.trustcache'

if not image.exists():
if (not build_manifest.exists() or
plistlib.loads(build_manifest.read_bytes()).get('ProductBuildVersion') != LATEST_DDI_BUILD_ID):
# download the Personalized image from our repository
repo = DeveloperDiskImageRepository.create()
personalized_image = repo.get_personalized_disk_image()
Expand Down

0 comments on commit 0561ded

Please sign in to comment.