所需硬件环境
1,mac一台
2,越狱手机一部(主要为砸壳用,破解注入后的APP可安装在非越狱手机上)
所需软件环境
1,Xcode
2,iOS9.3.3(截止到目前,还没有9.3.4的越狱方法发布出来)
3,clutch
4,iOSOpenDev
安装问题解决
首先homebrew安装dpkg
然后下载https://github.com/LengYi/iosOpenDev中的文件
(1)iPhoneOS开头的四个文件放到/应用程序/Xcode/Content/Developer/Platforms/IphoneOS.platform/Developer/Library/Xcode/Specifications文件夹下(如果没有,请自己创建一个)
(2)iPhone Simulator 开头的另外四个文件放入/应用程序/Xcode/Content/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Specifications文件夹下(如果没有,请同样创建一个)
(3)在/应用程序/Xcode/Content/Developer/Platforms/iPhoneSimulator.platform/Developer/文件夹下创建usr文件夹,usr文件夹下再创建一个名为bin的文件夹
最后仍然可能提示安装失败,打开Xcode,如果在新建工程选项里已经有了iOSOpenDev就不用在意了
5,yololib
6,mobiledevice
假设需要注入的APP为TheyChat,假设自己存在一个开发者证书并且打包过自己的APP名称为YouChat
准备好所有软硬件环境以后
ssh进入设备shell
clutch -i
列出所有已经安装的APP及其序号,找到TheyChat的序号x
clutch -d x
砸壳APP,会输出砸壳后的输出文件地址
scp将砸壳后的的文件拷贝到mac
建立Cocoa Touch Libary工程,编写注入代码,编译生成MeChat.dylib
yololib TheyChat MeChat.dylib
实现注入
将注入后的TheyChat,MeChat.dylib以及打包YouChat时的embedded.mobileprovision拷贝至TheyChat.app文件下
修改info.plist中的Bundle identifier为YouChat的Bundle identifier
建立entitlements.plist文件,内容可通过codesign -d --entitlements - YouChat.app来得到,如下
<plist version="1.0"><dict> <key>application-identifier</key> <string>123456.com.jumpingfish.youchat</string> <key>com.apple.developer.team-identifier</key> <string>123456</string> <key>get-task-allow</key> <true/> <key>keychain-access-groups</key> <array> <string>123456.com.jumpingfish.youchat</string> </array></dict></plist>
codesign -f -s "证书名称(可在mac的Key Chain应用中找到)" MeChat.dylib
codesign -f -s "证书名称" --entitlements entitlements.plist TheyChat.app
xcrun -sdk iphoneos PackageApplication -v TheyChat.app -o ~/Documents/TheyChat.ipa
使用mobiledevice install_app TheyChat.ipa
将APP安装到设备,此设备必须为provision中注册的设备
网友评论