通过theos实现非常简单的hoke操作,下载地址:https://github.com/theos/theos
1,安装HomeBrew。
2,在终端敲 brew install ldid
3,修改环境变量(保存下载地址为一个变量THEOS)
vim ~/.bash_profile
export THEOS=~/theos
export PATH=$THEOS/bin:$PATH
4,在终端的根目录下敲echo $THEOS 如果结果为空。说明导入export THEOS=~/theos没有起作用
5,敲source .bash_profile 运行一下.bash_profile(使环境变量THEOS,PATH生效),再echo $THEOS就会打印出路径了。
4,下载theos ,git clone --recursive https://github.com.theos/theos.git $THEOS
![](https://img.haomeiwen.com/i3308479/e701a7770d0a5a7a.png)
theos的使用
1,cd 到 Desktop(桌面)
![](https://img.haomeiwen.com/i3308479/effb78beca51c9be.png)
用sublime打开 Project Name 的项目里面要修改三种文件:
1>,Makefile 配置一下手机的IP地址和端口号
2>,在Tweak.xm中编写要修改的demo
3>, .plist文件中有配置项目的id
![](https://img.haomeiwen.com/i3308479/444cda68d5ec0555.png)
卸载修改的文件,打开IFunBox 进入 Device/Library/MobileSubStrate/DynamicLibraries 删除 项目名.dylib 和 项目名.plist这两个文件。
网友评论