通过usb线ssh连接iPhone

来源:互联网 发布:js 获取input value值 编辑:程序博客网 时间:2024/05/29 13:53

1. 下载usbmuxd源码包,解压

http://marcansoft.com/blog/iphonelinux/usbmuxd/

http://cgit.sukimashita.com/usbmuxd.git/

2. cd python-client目录, chmod +x tcprelay.py
3. 运行 ./tcprelay.py -t 22:2222

4. 再起一个终端(commad+t), ssh root@localhost -p 2222就可以登录越狱的iPhone了
默认密码是alpine

./tcprelay.py –help可以看到其它选项。



顺便记录一个自动同步游戏脚本文件到设备上的shell脚本。

#!/usr/bin/expect -f    set port "2222"  set user "root"  set host "localhost"  set password "pass1212"  set timeout -1  spawn scp -P 2222 ./CgScene.lua root@localhost:/var/mobile/Containers/Bundle/Application/0B3AE856-3B12-4C6F-9961-56AA2F53EBA4/testGame.app/src/Login/CgScene.luacexpect "*assword:*"  send "$password\r"expect eof# 执行命令spawn ssh -p 2222 root@localhost "killall pokemoniOS"expect "*assword:*"  send "$password\r"expect eof


0 0
原创粉丝点击