我的Theos安装以及问题

首先, 安装theos必须去看官方的WIKI, 也可以去看百科, 这里面很详细的, 唯一的问题就是~/.bash_profile这里面的配置, 可能不太清晰,我会说明一下我的写法

  • 安装
  1. 必须有Xcode dpkg ldid 这三个东西:
 // xcode  就不需要说了
 brew install dpkg ldid
 brew install --HEAD hbang/repo/deviceconsole
  1. 我的路径是/opt/theos, 原理是一样的, 路径不同而已, 然后去下载:
export THEOS=/opt/theos  // 指定路径
cd ..           // 回到上一级目录,删除 theos 目录, 然后去clone
 git clone --recursive https://github.com/theos/theos.git // 如果clone失败试试看在git前 加上sudo
  1. 下载完成后, 去配置 ~/.bash_profile
open ~/.bash_profile
// 复制下面三句话到该文件中, 放到最后就行
export THEOS=/opt/theos
export PATH=$THEOS/bin:$PATH
export THEOS_DEVICE_IP=example.local THEOS_DEVICE_PORT=22

配置就完成, 这样的话应该是标准的配置,我是为了研究逆向工程用的,因为总是报错, 错误原因大概看个开头和结尾就行了没必要仔细看我的这个, 总之这个错误就是因为theos配置有问题才这样的

Making all for tweak WeChatRedEnvelop...
Preprocessing Tweak.xm...
Compiling Tweak.xm...
Tweak.xm:69:35: error: use of undeclared identifier 'MSHookIvar'
MMTableViewInfo *tableViewInfo = MSHookIvar(self, "m_tableVi...
^
Tweak.xm:69:46: error: unexpected type name 'id': expected expression
MMTableViewInfo *tableViewInfo = MSHookIvar(self, "m_tableVi...
^
Tweak.xm:69:50: error: expression result unused [-Werror,-Wunused-value]
MMTableViewInfo *tableViewInfo = MSHookIvar(self, "m_tableVi...
^~
3 errors generated.
make[2]: *** [obj/Tweak.xm.b770397b.o] Error 1
make[1]: *** [internal-library-all_] Error 2
make: *** [WeChatRedEnvelop.all.tweak.variables] Error 2

你可能感兴趣的:(我的Theos安装以及问题)