iOS_逆向_Theos

一丶介绍

Theos是一个越狱开发工具包;
特点:安装简单,Logos语法简单

https://github.com/theos/theos
https://github.com/theos/theos/wiki/Installation

二丶安装及使用

2.1安装
下载Theos
$export THEOS=/opt/theos
$sudo git clone https://github.com/DHowett/theos.git $THEOS

配置ldid
$brew install dpkg ldid
然后把/opt/theos的权限改成你自己:
$sudo chown $(id -u):$(id -g) /opt/theos
$open ~/.bash_profile
添加
export THEOS=/opt/theos
export PATH=/opt/theos/bin/:$PATH
2.2测试

在自己Desktop创一个文件夹;
输入

$/opt/theos/bin/nic.pl 
iOS_逆向_Theos_第1张图片
2.3使用

1.创建工程


iOS_逆向_Theos_第2张图片

生成:

iOS_逆向_Theos_第3张图片
Paste_Image.png

Makefile详细介绍:

http://www.gnu.org/software/make/manual/html_node/Makefiles.html

三丶使用问题:

3.1 make package install 安装过程

问题1

➜ xzbhook git:(master) make package install==> Error:
The vendor/include and/or vendor/lib directories are missing. Please run git submodule update --init --recursive in your Theos directory. More information: https://github.com/theos/theos/wiki/Installation.
make: *** [before-all] Error 1

解决方法:
①open ~/.bash_profile
添加
$export PATH=/usr/local/opt/gnu-sed/bin/:$PATH
②cd /opt/theos
$sudo git submodule update --init --recursive

问题2

dpkg-deb: error: obsolete compression type 'lzma'; use xz instead
Type dpkg-deb --help for help about manipulating *.deb files;
Type dpkg --help for help about installing and deinstalling packages.
make: *** [internal-package] Error 2

解决:

find /opt/theos -type f -name "*.mk" | xargs grep "lzma"

/opt/theos/makefiles/package/deb.mk:_THEOS_PLATFORM_DPKG_DEB_COMPRESSION ?= lzma

iOS_逆向_Theos_第4张图片

问题3

ssh: connect to host 192.168.2.7 port 22: Connection refused
make: *** [internal-install] Error 255

在设备中打开“Cydia”,搜索“OpenSSH”,在搜索结果中选择“openSSH”并点击“安装”;

iOS_逆向_Theos_第5张图片

问题4

==>
Installing…
[email protected]'s password:
(Reading database ... 3459 files and directories currently installed.)
Preparing to unpack /tmp/_theos_install.deb ...
Unpacking com.swhl.hook-app (0.0.1-5+debug) ...
dpkg-deb (subprocess): unable to execute decompressing archive member (xz): No such file or directory
dpkg-deb (subprocess): subprocess decompressing archive member returned error exit status 2
dpkg-deb: error: subprocess returned error exit status 2
dpkg: error processing archive /tmp/_theos_install.deb (--install):
subprocess dpkg-deb --fsys-tarfile returned error exit status 2
Errors were encountered while processing:
/tmp/_theos_install.deb
make: *** [internal-install] Error 1

把
$(ECHO_NOTHING)COPYFILE_DISABLE=1 $(FAKEROOT) -r dpkg-deb -b "$(THEOS_STAGING_DIR)" "$(_THEOS_DEB_PACKAGE_FILENAME)" $(STDERR_NULL_REDIRECT)$(ECHO_END)

替换成
$(ECHO_NOTHING)COPYFILE_DISABLE=1 $(FAKEROOT) -r dpkg-deb -Zgzip -b "$(THEOS_STAGING_DIR)" "$(_THEOS_DEB_PACKAGE_FILENAME)" $(STDERR_NULL_REDIRECT)$(ECHO_END)

解决:

http://stackoverflow.com/questions/21013325/dpkg-error-contains-ununderstood-data-member

iOS_逆向_Theos_第6张图片

你可能感兴趣的:(iOS_逆向_Theos)