Debugserver(iPhone 4s下提取)

 

一、(条件)手机连接到Xcode,通过Xcode--->Window--->Devices/Simulators时,debugserver才会被安装到iOS上的/Developer/usr/bin目录里面 

二、/Developer/usr/bin目录 把 Debugserver 拷贝到Mac中

三、打开 终端 执行 “lipo -thin armv7 /Users/xxx/pojie/debugserver -output /Users/xxx/pojie/debugserver” (瘦身)

       如果报错“xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun”,(需执行 “xcode-select --install” 把工具安装)

四、给Debugserver添加“task_for_pid”权限 使用xcode创建“ent.xml”或者“ent.plist”文件,内容如下:

<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>

并与 Debugserver 放在同一目录下

五、执行命令“ldid -Sent.xml debugserver” 如果不能执行 ldid 命令 请搜索“theos的介绍,安装和使用”

六、执行后,把 “debugserver” 拷贝到 iPhone的“/usr/bin”(注意是/usr/bin 而非/Develop/usr/bin(只读的文件系统,不可写))目录下,并赋予“执行”权限,命令如下:
        chmod +x /usr/bin/debugserver

七、使用debugserver,启动或附加进程
        a、启动手机上app,并且开启端口:debugserver -x backboard IP:port /ios/path/to/appExeFile。例子:

              debugserver -x backboard *:1234 /Applications/MobileSMS.app/MobileSMS(启动短信)

        b、附加进程,并且开启端口:debugserver IP:port -a "ProcessName"。例子:

             debugserver 192.168.1.6:1234 -a "MobileSMS"

八、command + “n” 新建 终端 “cd /Applications/Xcode.app/Contents/Developer/usr/bin/lldb” 开启 “lldb”

九、连接iPhone的应用(进程)执行命令如下:

        process connect connect://192.168.xxx.xxx:1234

       继续执行命令:image list -o -f  即可打印

 

 

 

 

 

 

       

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值