Jump to content

How to build Debugserver for any iOS (Mac only)!


13 posts in this topic

Recommended Posts

Updated (edited)

How to build Debugsever binary for any iOSes on MAC OS X:

 

1. On Terminal

cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/7.0

(which iOS do you have, mine is iOS 9 so i need to cd to the 9.0 folder)

 

2. then

hdiutil attach ./DeveloperDiskImage.dmg

3. this will Mount DeveloperDiskImage.dmg, copy everything into a folder

 

4. Use iFunbox or SCP tool upload all files in DeveloperDiskImage.dmg to iphone /Developer (if you use xcode to debug on device before, you can skip this step)

 

5. find debugserver binary in /usr/bin in the files that you copied from the dmg before and copy it to Desktop or anywhere else (simple place).

 

6. cd to the folder that contains the debugserver and thin it to what Arch you want by any of these commands. (mine is arm64 so i'll use that)

lipo -thin armv7 /Developer/usr/bin/debugserver -output debugserver
lipo -thin armv7S /Developer/usr/bin/debugserver -output debugserver
lipo -thin arm64 /Developer/usr/bin/debugserver -output debugserver

7. next we need to sign the debugserver:

 

1st) make a new file in the same directory and name it

entitlements.plist

2nd) copy this code and paste it in the file.

<?xml version="1.0" encoding="UTF-8"?>
<!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>run-unsigned-code</key>
<true/>
<key>get-task-allow</key>
<true/>
<key>task_for_pid-allow</key>
<true/>
</dict>
</plist>

3rd) Then sign it by this command.

codesign -s - --entitlements entitlements.plist -f debugserver

8. copy the debugserver to the iPhone by this command.

scp ./debugserver root@wifi-IP:/usr/bin/

(find the IP in ur iPhone's Settings/Wi-Fi then tap the little button near your Wi-Fi's name.)

 

We are done :p

Updated by F1reCub3s
  • Like 1
Posted

So you can debug on any iOS?

 

Thanks for the tutorial. :)

 

this is for the ones who can't debug with gdb on windows :) this debug server works on the win lldb version though

you are welcome

Posted

this is for the ones who can't debug with gdb on windows :) this debug server works on the win lldb version though

you are welcome

Does it?

 

On iOS 8.4 example?

Posted

Does it?

 

On iOS 8.4 example?

 

don't know test it, if u want debugserver of ios9 arm64 i can pm it to u. its freshly built by my self

Posted

don't know test it, if u want debugserver of ios9 arm64 i can pm it to u. its freshly built by my self

Post a link to it please. :)

Posted

Post a link to it please. :)

 

sure i'll make a post tonight containing all common iOS versions (7/8/9) debug servers of armv7 and arm64 just please pin this :p

Posted

wow, I'm interested on debug for arm64. Can you give a little insight of the features we can do with it?

debug on ios games and hack em same as gdb but on lldb

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines