目录
Proteas公开了iOS本地编译的lldb在刚刚的文章 中,我们已经讨论了利弊,现在来研究一下,4s的9.3.5能不能安装和跑起来。
准备环境按照Phoenix 的越狱流程进行越狱。
安装Cydia,SSH等流畅无需再表。
官方README.md不支持
Only tested on iOS 9.0.2, ARM64, untethered jailbreak.
4s是32位机器,且最新版本是9.3.5
Do not use it on tethered jailbreak device, it may break the system, and cause white apple.
4s的9.3.5越狱也是不完美越狱,不过4s有不死鸟之身,因为其9.3.5是有苹果官方无限签名的。
强推! 拷贝到手机中去$ scp *deb root@192.168.42.206:/tmp
尝试先安装一个Cydia是默认有dpkg的。
# dpkg -i python-v2.7.6-proteas-2015-11-30.deb
Selecting previously deselected package python.
(Reading database ... 2320 files and directories currently installed.)
Unpacking python (from python-v2.7.6-proteas-2015-11-30.deb) ...
dpkg: dependency problems prevent configuration of python:
python depends on berkeleydb; however:
Package berkeleydb is not installed.
python depends on libffi; however:
Package libffi is not installed.
python depends on sqlite3; however:
Package sqlite3 is not installed.
dpkg: error processing python (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
python
但是明显还有很多依赖Proteas并没有写出来,我们到Cydia里去安装在Cydia里搜索下载Berkeley DB
,然后将libffi
重装了一下,OK了。
又来了新的问题。# dpkg -i python-v2.7.6-proteas-2015-11-30.deb
(Reading database ... 7645 files and directories currently installed.)
Preparing to replace python 2.7.6-6 (using python-v2.7.6-proteas-2015-11-30.deb) ...
Unpacking replacement python ...
dpkg: error processing python-v2.7.6-proteas-2015-11-30.deb (--install):
failed in buffer_write(fd) (7, ret=-1): backend dpkg-deb during `./usr/include/python2.7/Python-ast.h': No space left on device
dpkg-deb: subprocess paste killed by signal (Broken pipe: 13)
Errors were encountered while processing:
python-v2.7.6-proteas-2015-11-30.deb
空间不够了,需要Stash。
添加Coolstar的源:https://coolstar.org/publicrepo/
,注意是https ,不是http 。在该源里下载Stashing for iOS 9.2-10.2,并安装,重启之后,再重新越狱,该问题就解决了。
然而,安装其他插件,都没有问题,使用dpkg -i python-v2.7.6-proteas-2015-11-30.deb
就不行;
# dpkg -i python-v2.7.6-proteas-2015-11-30.deb
(Reading database ... 2409 files and directories currently installed.)
Unpacking python (from python-v2.7.6-proteas-2015-11-30.deb) ...
dpkg-deb (subprocess): short read in buffer_copy (failed to write to pipe in copy)
dpkg-deb: subprocess paste returned error exit status 2
dpkg: error processing python-v2.7.6-proteas-2015-11-30.deb (--install):
short read in buffer_copy (backend dpkg-deb during `./usr/lib/python2.7/test/cmath_testcases.txt')
Processing triggers for org.coolstar.stash933 ...
Stash933 App Stasher Version 1.2.2
Copyright 2016, CoolStar.
Please wait, scanning apps...
Stashing /Applications/Filza.app
Please wait, scanning for orphaned apps...
Done stashing apps.
Stash933 CLI Tool/Library Stasher Version 1.0
Copyright 2016, CoolStar.
Please wait, reading database...
Folder detected at /usr/lib/pkgconfig. Not stashing as folders aren't supported yet.
Folder detected at /usr/lib/p7zip. Not stashing as folders aren't supported yet.
Folder detected at /usr/lib/pkgconfig. Not stashing as folders aren't supported yet.
Folder detected at /usr/lib/pkgconfig. Not stashing as folders aren't supported yet.
Stashing Bin: file
Please wait, searching for orphaned binaries...
Done stashing binaries.
Stashing Lib: libmagic.la
Stashing Lib: libmagic.1.0.0.dylib
Please wait, searching for orphaned libraries...
Done stashing libraries.
Errors were encountered while processing:
python-v2.7.6-proteas-2015-11-30.deb
当然,想要安装lldb也是不行的。
# dpkg -i lldb-v3.8.0-proteas-2015-12-16.deb
Selecting previously deselected package lldb.
(Reading database ... 2426 files and directories currently installed.)
Unpacking lldb (from lldb-v3.8.0-proteas-2015-12-16.deb) ...
dpkg: error processing lldb-v3.8.0-proteas-2015-12-16.deb (--install):
failed in buffer_write(fd) (7, ret=-1): backend dpkg-deb during `./usr/lib/liblldb.3.8.0.dylib': No space left on device
dpkg-deb: subprocess paste killed by signal (Broken pipe: 13)
success to unintall lldb
Processing triggers for org.coolstar.stash933 ...
Stash933 App Stasher Version 1.2.2
Copyright 2016, CoolStar.
Please wait, scanning apps...
Stashing /Applications/Filza.app
Stashing /Applications/MTerminal.app
Please wait, scanning for orphaned apps...
Done stashing apps.
Stash933 CLI Tool/Library Stasher Version 1.0
Copyright 2016, CoolStar.
Please wait, reading database...
Folder detected at /usr/lib/pkgconfig. Not stashing as folders aren't supported yet.
Folder detected at /usr/lib/p7zip. Not stashing as folders aren't supported yet.
Folder detected at /usr/lib/pkgconfig. Not stashing as folders aren't supported yet.
Folder detected at /usr/lib/pkgconfig. Not stashing as folders aren't supported yet.
Please wait, searching for orphaned binaries...
Done stashing binaries.
Please wait, searching for orphaned libraries...
Done stashing libraries.
Errors were encountered while processing:
lldb-v3.8.0-proteas-2015-12-16.deb
用Filza/ifile来尝试安装deb安装一下 Filza
发现其也是调用的dpkg -i
,那肯定也是没戏了。
iFile奇怪的是iFile安装python,成功了。
iFile安装Fizla不行;还是之前的错误。
尝试使用Cydia的autoInstall从上文Stashing的过程中来看,这个Stashing对于Cydia是奏效的,对于dpkg可能是不奏效的。
Cydia的自动安装目录是/var/root/Media/Cydia/AutoInstall/
,这个目录并不存在,需要新建好,然后将lldb这个deb 放到这个目录下去。
# pwd
/var/root/Media/Cydia/AutoInstall
# ls
lldb-v3.8.0-proteas-2015-12-16.deb
然后重启,重新越狱,重启,发现该目录下该deb 已经消失,说明已经安装,然而Cydia里已安装列表里没有,直接运行lldb
也没有,又失败。
所以此时我已经失去了耐心。
恢复初始系统,重新越狱安装。从ipsw.me 下载全新的9.3.5的镜像进行恢复。然后全新越狱,过程不表。
看看下载的deb包是否损坏:
$ md5sum *deb
27b951e2464746227dd9f984832afa97 lldb-v3.8.0-proteas-2015-12-16.deb
50d3fa7d260e2d5f5fab071bfff3e7e4 python-v2.7.6-proteas-2015-11-30.deb
与官方是一致的。当然,上面也是用的这两个包。
发现越狱完成的时候,根目录下只有29m的空间。
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/disk0s1s1 2.1G 2.1G 29M 99% /
devfs 25K 25K 0 100% /dev
/dev/disk0s1s2 5.4G 422M 4.9G 8% /private/var
按照此贴 的方法,清理一些空间出来。
# rm -rf /System/Library/LinguisticData/*
# rm -rf /System/Library/Fonts/*
然后就有了三百多兆的空间。
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/disk0s1s1 2.1G 1.8G 323M 85% /
devfs 25K 25K 0 100% /dev
/dev/disk0s1s2 5.4G 712M 4.7G 14% /private/var
然后python的包安装之前还是要在Cydia中搜索Berkeley DB
安装,以及重装一下libffi
,就可以正确安装了。
# dpkg -i python-v2.7.6-proteas-2015-11-30.deb
(Reading database ... 6486 files and directories currently installed.)
Preparing to replace python 2.7.6-6 (using python-v2.7.6-proteas-2015-11-30.deb) ...
Unpacking replacement python ...
Setting up python (2.7.6-6) ...
iPhone:/var/mobile/tmp root#
然后lldb也没有压力。
# dpkg -i lldb-v3.8.0-proteas-2015-12-16.deb
(Reading database ... 1117 files and directories currently installed.)
Unpacking lldb (from lldb-v3.8.0-proteas-2015-12-16.deb) ...
Setting up lldb (3.8.0) ...
success to intall lldb
iPhone:/var/mobile/tmp root#
最后lldb调试MobileSafari:
显示Code:0x9, Description: security policy error.
,这不就是传说中的killed:9
么?应该是签名的问题。那就签个task_for_pid
试试。
# cat ent.xml
<!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.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>
签上之后发现还是不行:
实在是困死了,先去睡觉啦!还是等Proteas大神来解决吧!
总结: lldb与Stashing有冲突,腾出空间安装就OK,采用Stash就不行; 末尾的Code:0x9, Description: security policy error.
很诡异,搜都搜不到!等大神来解答。
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课