Debugserver 签名失败

我参考这两个网站对debugserver重签名的步骤,没能成功。究其原因是:签名后,查看debugserver的签名,发现里面内容出现了两段重复的xml。
参考网址:
https://blog.csdn.net/yahibo/article/details/104909040
https://blog.csdn.net/yishengzhiai005/article/details/104275252

复现步骤:
1、找到手机中的debugserver,然后通过scp命令,拷贝到本机;
2、查看debugserver的现有签名,随后导出签名信息,调用命令:ldid -e debugserver > debuger.entitlements。
3、按照网上所说, 新增get-task-allow、task_for_pid-allow 字段设置为YES
4、重新签名,调用命令:ldid -Sdebuger.entitlements debugserver。
5、查看签名;

问题就出在第五步的结果上。结果显示如下:

<?xml version="1.0" encoding="UTF-8"?> get-task-allow task_for_pid_allow com.apple.springboard.debugapplications com.apple.backboardd.launchapplications com.apple.backboardd.debugapplications com.apple.frontboard.launchapplications com.apple.frontboard.debugapplications seatbelt-profiles debugserver com.apple.diagnosticd.diagnostic com.apple.security.network.server com.apple.security.network.client com.apple.private.memorystatus com.apple.private.cs.debugger <?xml version="1.0" encoding="UTF-8"?> get-task-allow task_for_pid_allow com.apple.springboard.debugapplications com.apple.backboardd.launchapplications com.apple.backboardd.debugapplications com.apple.frontboard.launchapplications com.apple.frontboard.debugapplications seatbelt-profiles debugserver com.apple.diagnosticd.diagnostic com.apple.security.network.server com.apple.security.network.client com.apple.private.memorystatus com.apple.private.cs.debugger

** 环境:
macOS 版本号 11.2.2
XCode 版本号 12.4
iPhone4s os版本号 12.4

iPhone 用的是爱思助手 一键越狱。

求助大佬,此题何解啊?太难了……

买本书 紫薯布丁

有两段重复只是因为是fat格式

➜ lipo -i debugserver                              
Architectures in the fat file: debugserver are: arm64 arm64e 

可以分别lipo成arm64和arm64e
iOS-debugserver

谢谢大佬,按照你提供的这个链接中的办法,我已经过了debugserver这一步了。但是在之后进行lldb链接debugserver时lldb报错:error: failed to get reply to handshake packet。debugserver窗口报错为:error: rejecting incoming connection from ::ffff:192.168.102.93 (expecting ::1)。请问这是怎么回事呢?

谢谢大佬,这个问题目前我是把:这个命令[debugserver :1234 -a “ProcessName” ] 中的通配符“”换成了本机的“127.0.0.1”,就搞定了。