Last active
February 12, 2018 15:54
-
-
Save smirn0v/0b4fefcb5d2452f716b1 to your computer and use it in GitHub Desktop.
Debugserver
This file contains 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
$ cd /Applications/Xcode6-Beta5.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/ | |
# choose your platform | |
$ cd 7.1 | |
# mount developer disk image | |
$ hdiutil attach DeveloperDiskImage.dmg | |
# copy debugserver | |
$ cp /Volumes/DeveloperDiskImage/usr/bin/debugserver ~/ | |
$ cd ~/ | |
# prepare entitlements | |
$ cat > entitlements.plist << 'EOF' | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>com.apple.springboard.debugapplications</key> | |
<true/> | |
<key>get-task-allow</key> | |
<true/> | |
<key>task_for_pid-allow</key> | |
<true/> | |
<key>run-unsigned-code</key> | |
<true/> | |
</dict> | |
</plist> | |
EOF | |
# sign debugserver | |
$ codesign -s - --entitlements entitlements.plist -f debugserver | |
# copy debug server on the device with entitlements | |
$ scp -P 31337 debugserver [email protected]:~/ | |
$ scp -P 31337 entitlements.plist [email protected]:~/ | |
# run debugserver and attach to process | |
# on idevice | |
$ ~/debugserver *:31338 --attach=<PID> | |
# or | |
$ ./debugserver -x backboard *:31338 /var/mobile/Containers/Bundle/Application/F7C4437F-01B4-44BC-8BD7-031C572BCB5B/ICQ.app/ICQ | |
# on mac | |
$ lldb | |
(lldb) platform select --sysroot "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/9.1" remote-ios | |
(lldb) process connect connect://127.0.0.1:3138 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment