您的位置:首页 > 其它

通过usb线ssh连接iPhone

2016-01-08 13:51 260 查看
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.luac

expect "*assword:*"

send "$password\r"
expect eof

# 执行命令
spawn ssh -p 2222 root@localhost "killall pokemoniOS"
expect "*assword:*"

send "$password\r"
expect eof
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: