├── Function.sh ├── README.md ├── TheosScript.sh └── class-dump /Function.sh: -------------------------------------------------------------------------------- 1 | function_setport(){ 2 | echo "-----------设置环境变量-----------" 3 | export THEOS=/opt/theos 4 | export OSldid=$THEOS/bin/ldid 5 | export OSdpkg=$THEOS/bin/dpkg-deb 6 | } 7 | 8 | function_installTheos(){ 9 | clear 10 | echo "正在初始化环境下载Theos..." 11 | echo "如有提示Password,请输入系统登录密码。" 12 | 13 | # 下载安装theos,这个theos是本人已经修改过的,已经放入ldid,dpkg等 14 | sudo git clone https://github.com/bigsen/Theos.git $THEOS 15 | 16 | # 设置文件权限 17 | sudo chmod 777 $OSldid 18 | sudo chmod 777 $OSdpkg 19 | 20 | open $THEOS 21 | } 22 | 23 | function_dumpFile(){ 24 | clear 25 | #!/bin/sh 26 | export dumpath=/usr/bin/class-dump 27 | clear 28 | if [ ! -f $dumpath ] 29 | then 30 | sudo cp class-dump /usr/bin/ 31 | echo "拷贝class-dump完成" 32 | sudo chmod 777 $dumpath 33 | fi 34 | 35 | read -p "请输入APP的路径(可拖拽进来): " appPath 36 | read -p "请输入输出目标文件夹的路径(可拖拽进来) :" inputPath 37 | class-dump -s -S -H $appPath -o $inputPath 38 | open $inputPath 39 | echo "完成导出头文件" 40 | } 41 | 42 | function_didload(){ 43 | clear 44 | function_setport 45 | echo "1, Install Theos" 46 | echo "2, Dump App" 47 | read -p "请输入您的选择:" branchNum 48 | case $branchNum in 49 | 1) function_installTheos 50 | ;; 51 | 2) function_dumpFile 52 | ;; 53 | *) echo 'You do not select a number between 1 to 4' 54 | ;; 55 | esac 56 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Theos-Script 2 | ##### 主要进行自动安装theos工具。 3 | 4 | ##### 下载完,执行:./TheosScript.sh 5 | 6 | ![进行简单演示](http://upload-images.jianshu.io/upload_images/790890-0dff3b591093d974.gif?imageMogr2/auto-orient/strip) 7 | -------------------------------------------------------------------------------- /TheosScript.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | source function.sh 3 | didFinishLaunching(){ 4 | chmod 777 ./function.sh 5 | function_didload 6 | } 7 | clear 8 | didFinishLaunching -------------------------------------------------------------------------------- /class-dump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigsen/Theos-Script/edf99c25d3d038ae2ebd14da81177afdb868f12b/class-dump --------------------------------------------------------------------------------