美文网首页
iOS debugserver 调试任意 App

iOS debugserver 调试任意 App

作者: jacinzhang | 来源:发表于2022-12-03 21:45 被阅读0次

debuserver

手机上的 debugserver 位置,此文件只读,所以需要将此文件拷贝出来,进行权限配置,然后再拷贝会手机另一个目录。

/Developer/usr/bin/debugserver

给 debugserver 配置权限

1.新建文件 ent.xml

<?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.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.security.network.client</key>
    <true/>
    <key>com.apple.security.network.server</key>
    <true/>
    <key>com.apple.springboard.debugapplications</key>
    <true/>
    <key>com.apple.system-task-ports</key>
    <true/>
    <key>get-task-allow</key>
    <true/>
    <key>platform-application</key>
    <true/>
    <key>run-unsigned-code</key>
    <true/>
    <key>task_for_pid-allow</key>
    <true/>
</dict>
</plist>

2.赋予权限

ldid -Sent.xml debugserver
  1. 放到手机中
    拷贝到手机 /usr/bin 目录

  2. 端口映射

iproxy 2222:22 4444:4444
  1. 手机开启 debugser 端口监听
debugserver localhost:4444 --attach WeChat
  1. macOS 开启 lldb 调试
process connect connect://localhost:4444

相关文章

网友评论

      本文标题:iOS debugserver 调试任意 App

      本文链接:https://www.haomeiwen.com/subject/ahoufdtx.html