Skip to content

Conversation

@abhishekbedi1432
Copy link

Description

This PR migrates HydraLab's iOS device management from tidevice to pymobiledevice3 to enable support for iOS 17+ devices while maintaining backward compatibility with older iOS versions.

Why this change?

  • tidevice is incompatible with iOS 17+ - Uses deprecated DeveloperDiskImage system
  • Screenshots and device operations fail on modern iOS devices
  • tidevice development stalled - Last significant update in 2021
  • pymobiledevice3 has active development with full iOS 17+ support

Key Changes

Component Change
IOSUtils.java Updated all CLI commands to pymobiledevice3 equivalents
IOSDeviceDriver.java Updated JSON parsing with backward-compatible field fallbacks
EnvCapability.java Added pymobiledevice3 capability keyword

Command Migration Summary

tidevice pymobiledevice3
tidevice list --json python3 -m pymobiledevice3 usbmux list
tidevice -u <udid> screenshot python3 -m pymobiledevice3 developer dvt screenshot --udid
tidevice -u <udid> install python3 -m pymobiledevice3 apps install --udid
tidevice -u <udid> relay python3 -m pymobiledevice3 usbmux forward --serial

See TIDEVICE_TO_PYMOBILEDEVICE3_MIGRATION.md for complete mapping.

Linked GitHub issue ID: N/A (Enhancement)

Pull Request Checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Code compiles correctly with all tests are passed.
  • I've read the contributing guide and followed the recommended practices.
  • Wikis or README have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

  • Yes
  • No

Migration is backward compatible - JSON parsing supports both old (tidevice) and new (pymobiledevice3) field names.

How you tested it

  • Verified on iPhone 11 Pro (iOS 26.2)
  • Device discovery and listing functional
  • Screenshot capture working
  • App install/uninstall operations verified
  • Port forwarding for WDA proxy tested

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Technical design
  • Build related changes
  • Refactoring (no functional changes, no api changes)
  • Code style update (formatting, renaming) or Documentation content changes
  • Other (please describe)

Feature UI screenshots or Technical design diagrams

N/A - Backend changes only. See migration doc for architecture details.


Co-Authored-By: Warp agent@warp.dev

## Summary
Replace tidevice library with pymobiledevice3 to support iOS 17+ devices
while maintaining backward compatibility with older iOS versions.

## Problem
- tidevice is incompatible with iOS 17+ (uses deprecated DeveloperDiskImage)
- Screenshots and device operations fail on modern iOS devices
- tidevice development has stalled since 2021

## Solution
Migrate all iOS device management commands to pymobiledevice3:
- Device discovery: usbmux list
- Device info: lockdown info
- App management: apps install/uninstall/list
- Screenshots: developer dvt screenshot
- Log collection: syslog live, crash pull
- Port forwarding: usbmux forward

## Backward Compatibility
- JSON parsing supports both tidevice and pymobiledevice3 field names
- Device unlock failures are now non-fatal for XCTest execution
- Device watcher uses polling mechanism (usbmux watch not available)

## Files Modified
- IOSUtils.java: Updated all command invocations
- IOSDeviceDriver.java: Updated parsing and capability requirements
- EnvCapability.java: Added pymobiledevice3 capability keyword

## Testing
- Verified on iPhone 11 Pro (iOS 26.2)
- All core device operations functional

Ref: TIDEVICE_TO_PYMOBILEDEVICE3_MIGRATION.md for detailed command mapping

Co-Authored-By: Warp <agent@warp.dev>
@abhishekbedi1432
Copy link
Author

@microsoft-github-policy-service agree

@abhishekbedi1432 abhishekbedi1432 marked this pull request as draft January 29, 2026 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants