fix: 适配 iOS 18.2+,升级 pymobiledevice3 至 9.x#96
Open
wxxcl0825 wants to merge 1 commit into
Open
Conversation
旧版 pymobiledevice3 2.46.1 无法连接 iOS 18.2 及以上设备(如 iOS 26), 原因有二: 1. iOS 18.2+ 移除了 QUIC 隧道协议,必须改用 TCP 协议; 2. pymobiledevice3 9.x 将设备相关 API 全面改为 async,并移动/重命名了 大量符号(select_device、install_driver_if_required、 DvtSecureSocketProxyService 等已不存在)。 主要改动: - requirements.txt: pymobiledevice3 2.46.1 -> 9.27.0 - driver/connect.py: lockdown / AMFI 调用改为 async;用 get_core_device_tunnel_services + start_tunnel(protocol=TCP) 替代 已移除的 select_device/install_driver_if_required - main.py: 用 RemoteServiceDiscoveryService + DvtProvider + LocationSimulation 重写为 async(asyncio.run 驱动) - driver/location.py、run.py、init/init.py、init/tunnel.py: 跟随改为 async - run.py: 用 asyncio.sleep 取代忙等待循环 注:Python < 3.13 时 TCP 隧道依赖 sslpsk_pmd3 的 PSK-TLS 回退实现。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
当前依赖的 pymobiledevice3 2.46.1 无法连接 iOS 18.2 及以上设备(实测 iOS 26.5.1),启动隧道时报错。原因有两点:
QuicProtocolNotSupportedError: iOS 18.2+ removed QUIC protocol support)。select_device、install_driver_if_required、DvtSecureSocketProxyService、create_amfi_show_override_path_file等)。改动
requirements.txt:pymobiledevice32.46.1 → 9.27.0driver/connect.py:lockdown / AMFI 调用改为 async;改用get_core_device_tunnel_services+start_tunnel(protocol=TunnelProtocol.TCP)替代已移除的select_device/install_driver_if_requiredmain.py:使用RemoteServiceDiscoveryService+DvtProvider+LocationSimulation重写为 async,由asyncio.run驱动driver/location.py、run.py、init/init.py、init/tunnel.py:跟随改为 asyncrun.py:用asyncio.sleep取代忙等待循环说明
sslpsk_pmd3的 PSK-TLS 回退实现(pymobiledevice3 自带依赖)。🤖 Generated with Claude Code