Skip to content

Instantly share code, notes, and snippets.

@tonycoco
Last active November 13, 2024 00:35
Show Gist options
  • Save tonycoco/66b08eea237ff64bf7becb54afb2e04d to your computer and use it in GitHub Desktop.
Save tonycoco/66b08eea237ff64bf7becb54afb2e04d to your computer and use it in GitHub Desktop.
Enable JIT on iOS and tvOS from the command line

Install https://github.com/doronz88/pymobiledevice3.

Get your device's UUID:

xcrun xctrace list devices

Mount the disk image:

sudo pymobiledevice3 mounter auto-mount

Start the tunnel:

sudo pymobiledevice3 remote start-tunnel --script-mode

Keep the tunnel running. Open the app you are trying to enable JIT on your device. Keep the screen alive.

Now, paste the output of that command as the RSD connection to start a debug server:

sudo pymobiledevice3 developer debugserver start-server --rsd <YOUR_CONNECTION_DETAILS>

Get the PID:

sudo pymobiledevice3 processes pgrep <YOUR_APP_NAME> --udid <YOUR_UUID>

Open lldb to start debugging:

lldb

Run the following commands:

(lldb) platform select remote-ios
(lldb) process connect connect://<YOUR_CONNECTION_DETAILS>
(lldb) settings set target.memory-module-load-level minimal
(lldb) attach -p <YOUR_PID>
(lldb) detach
(lldb) exit
@tonycoco
Copy link
Author

tonycoco commented Jul 9, 2024

If you're using AltStore you can just make sure you install the dependencies to the Python install that Xcode uses:

/Applications/Xcode.app/Contents/Developer/usr/bin/python3 -m pip install -U pymobiledevice3==2.30.0 construct==2.10.69 qh3==0.15.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment