首页
社区
课程
招聘
[原创]4s的9.3.5尝试Proteas大神的Native lldb
发表于: 2017-10-19 23:25 8309

[原创]4s的9.3.5尝试Proteas大神的Native lldb

2017-10-19 23:25
8309
 

目录

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.很诡异,搜都搜不到!等大神来解答。


[课程]FART 脱壳王!加量不加价!FART作者讲授!

收藏
免费 1
支持
分享
最新回复 (3)
雪    币: 290
活跃值: (43)
能力值: ( LV3,RANK:30 )
在线值:
发帖
回帖
粉丝
2
顶啊顶啊,牛的一b
2017-10-20 10:01
0
雪    币: 3907
活跃值: (5817)
能力值: ( LV12,RANK:200 )
在线值:
发帖
回帖
粉丝
3
Proteas回复:“Stach  那个问题,因为程序带了三种架构,实际上只有  armv7  就可以,体积可以减少到  1/3。这个没时间弄,只要自己  lipo  一下就可以。”
2017-10-20 10:47
0
雪    币: 353
活跃值: (504)
能力值: ( LV7,RANK:100 )
在线值:
发帖
回帖
粉丝
4
辛苦  roysue  写  guide。:)
在  Github  中新添加了一个包:lldb-v3.8.0-proteas-2016-05-06.deb。
Description:  security  policy  error:lldb  加载的  dylib  都需要  codesign,尤其是从  Cydia  中安装的那些,可能是没签名的。
关于存储空间:默认的  deb  中包含了  armv7,  armv7s,  arm64,实际上只要  armv7  就可以,所以可以  thin  一下再重新打包,这样只要占用原来  1/3  的空间。
2017-10-20 11:25
0
游客
登录 | 注册 方可回帖
返回
//