iOS11上使用lldb调试APP

本文详细介绍了如何在使用Electra越狱的iOS11设备上,通过debugserver进行应用程序调试的过程。包括获取并签名debugserver,配置XML文件,执行debugserver及jailbreakd_client命令,最后在Mac上使用lldb连接进行调试。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

这里说的是使用Electra越狱的iOS11设备,使用平常的方式是无法用debugserver调试的。这是由于Electra本身的原因,使用unc0ver越狱iOS11则没有此问题

1.获取一个签名的debugserver。如果手头没有,可以在iphone连接mac后,在iphone的/Developer/usr/bin/debugserver取到,将其放在/usr/bin/下。后面如果/usr/bin下签名失败,可以换个位置签名,只要出现kill 9,就需要删掉重新来

2.将debugserver签名。xml如下

```
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>platform-application</key>
        <true/>
        <key>com.apple.backboardd.debugapplications</key>
        <true/>
        <key>com.apple.backboardd.launchapplications</key>
        <true/>
        <key>com.apple.diagnosticd.diagnostic</key>
        <true/>
        <key>com.apple.frontboard.debugapplications</key>
        <true/>
        <key>com.apple.frontboard.launchapplications</key>
        <true/>
        <key>com.apple.springboard.debugapplications</key>
        <true/>
        <key>com.apple.springboard.launchapplications</key>
        <true/>
        <key>com.apple.security.network.client</key>
        <true/>
        <key>com.apple.security.network.server</key>
        <true/>
        <key>com.apple.assertiond.app-state-monitor</key>
        <true/>
        <key>com.apple.private.network.socket-delegate</key>
        <true/>
        <key>com.apple.mobileactivationd.network-security-disabled</key>
        <true/>
        <key>com.apple.networkd_privileged</key>
        <true/>
        <key>run-unsigned-code</key>
        <true/>
        <key>get-task-allow</key>
        <true/>
        <key>task_for_pid-allow</key>
        <true/>
        <key>com.apple.system-task-ports</key>
        <true/>
    </dict>
</plist>
```
保存为xml,和debugserver一起传到iphone上,放在同一目录
在该目录执行  ldid -S1.xml debugserver,如果失败则尝试在其他目录执行,
签名后debugserver放在/usr/bin/下

3.执行debugserver

IP地址为要运行lldb的mac主机的ip
debugserver mac机器地址:iphone端口 -waitfor APP二进制名,例如
debugserver 192.168.1.12:111 -waitfor AWZ

4.执行jailbreakd_client

另开一个iphone的ssh,找到debugserver的pid,例如1234,然后执行
/electra/jailbreakd_client 1234 1

5.启动app

6.mac上lldb连接

lldb->

proess connect connect://iphone的ip:iphone的端口
本例中就是proess connect connect://192.168.1.10:111
 如果没错误就连接上了


 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值