【1】安裝Theos
http://blog.csdn.net/wiki_su/article/details/78107291
請查看本博客此文章Theos的安裝。
【2】安裝usbmuxd
打開終端,輸入 brew install usbmuxd
就可以安裝了。已經安裝的請繼續往下走。
【3】手機下載軟件
越獄手機
找到Cydia進入APP
在Cydia首頁,有一個OpenSSH訪問教程。
下載最新的包
然後好好閱讀一下教程。
搜索cycript下載安裝
Ps:本人測試的手機的很久以前就預約的4s , 6.1.3的系統
【4】終端連接
在終端輸入:
然後輸入密碼
默認密碼是 alpine
如果你手動修改過密碼,那麼輸入你設置的密碼。
然後就真的連接上了。。。
走的坑有點多,如果你沒連接上,請多查詢度娘,古哥。
知道錯誤原因,就好解決了。
然後終端輸入
cycript -p SpringBoard
如果出現 cy#
, 那麼就成功了。
【5】測試
終端輸入
wiki:~ root# cycript -p SpringBoard
cy# alertView = [[UIAlertView alloc] initWithTitle:@"test" message:@"123" delegte:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]
#"<UIAlertView: 0x214e68f0; frame = (0 0; 0 0); opaque = NO; layer = <CALayer: 0x214e3a50>>"
cy# [alertView show]
如果我們想輸入中文,怎麼辦呢?
http://tool.chinaz.com/Tools/unicode.aspx
我們使用Unicode編碼進行轉碼
隔壁老王是你嗎? —> \u9694\u58c1\u8001\u738b\u662f\u4f60\u5417\u003f
cy# alert = [[UIAlertView alloc] initWithTitle:@"\u9694\u58c1\u8001\u738b\u662fu4f60\u5417\u003f" message:nil delegate:nil cancelButtonTitle:@"OK" otherButtonitles:nil]
#"<UIAlertView: 0x21847780; frame = (0 0; 0 0); opaque = NO; layer = <CALayer: 0x2173b9e0>>"
cy# [#0x21847780 show]