厄~我承认这个标题很有诱惑性和极具危险性,我虽不是法盲,但这么高级的法律知识我还真不懂,如果侵犯到了某人的利益,请及时通知我撤销文章,并当众给您道歉,上CCAV道歉都成~很诚意的!
本文只讲述一段故事,这个故事是说某公司开发了一个软件,在没代码,没越狱机器也没上APPSTORE的情况下,公司其他员工(非本人)利用不道德的手段将IPA安装到了手机上,道德我们不谈了,谈谈他是咋做的吧!(但也不保证所有软件都能顺利安装)
首先要有个MAC电脑(据某人说黑苹果也成,毕竟技术都是一样的),然后要装个xcode 下面的模板专门针对xcode 4以上的(下面的模板在4.2上顺利通过)
如果不想花99刀买开发者证书就上GOOGLE上搜搜“免费真机调试”(郑重声明,我说的免费真机调试是指有些人愿意帮忙申请证书的,如果您搜索到其他不道德的文章,一切责任你知道不管我事就成了~)
装好之后去下个CrappStore For Xcode 4.zip(http://imzdl.com/有下载),打开crappstore不要安装,找到CrappStoreXC4Installer右键选择“Show Package Contents”进入Contents->Resources将CrappStore文件夹拷贝到/Users/apple/Library/Developer/Xcode/Templates/Project Templates下,重启xcode新建一个工程,发现左面有个CrappStore的模板,这就表示CrappStore安装好了,先不用记着去试,现在需要修改一下CrappStore的模板,让他更自动化~
在/Users/apple/Library/Developer/Xcode/Templates/Project Templates/CrappStore/CrappStore.xctemplate/新建一个Entitlements.plist文件内容为:
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
- <plist version="1.0">
- <dict>
- <key>get-task-allow</key>
- <true/>
- </dict>
- </plist>
打开同目录下的TemplateInfo.plist将其内容改为:
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
- <plist version="1.0">
- <dict>
- <key>Ancestors</key>
- <array>
- <string>com.iPAGod.base</string>
- <string>com.iPAGod.iosbase</string>
- </array>
- <key>Concrete</key>
- <true/>
- <key>Definitions</key>
- <dict>
- <key>Entitlements.plist</key>
- <dict>
- <key>Path</key>
- <string>Entitlements.plist</string>
- </dict>
- <key>Classes/AppDelegate.h</key>
- <dict>
- <key>Group</key>
- <string>Classes</string>
- <key>Path</key>
- <string>Classes/AppDelegate.h</string>
- </dict>
- <key>Classes/AppDelegate.m</key>
- <dict>
- <key>Group</key>
- <string>Classes</string>
- <key>Path</key>
- <string>Classes/AppDelegate.m</string>
- </dict>
- <key>main.m</key>
- <dict>
- <key>Group</key>
- <string>Other Sources</string>
- <key>Path</key>
- <string>main.m</string>
- </dict>
- <key>plusutil</key>
- <dict>
- <key>Path</key>
- <string>plusutil</string>
- </dict>
- </dict>
- <key>Description</key>
- <string>CrappStore, your way for installing cracked apps on a non-jailbroken device (Developer Account Needed).</string>
- <key>Identifier</key>
- <string>com.iPAGod.CrappStore</string>
- <key>Kind</key>
- <string>Xcode.Xcode3.ProjectTemplateUnitKind</string>
- <key>Nodes</key>
- <array>
- <string>Entitlements.plist</string>
- <string>main.m</string>
- <string>Classes/AppDelegate.h</string>
- <string>Classes/AppDelegate.m</string>
- <string>plusutil</string>
- </array>
- <key>Options</key>
- <array>
- <dict>
- <key>Identifier</key>
- <string>deviceFamily</string>
- <key>Units</key>
- <dict>
- <key>iPhone</key>
- <dict>
- <key>Definitions</key>
- <dict/>
- </dict>
- </dict>
- </dict>
- </array>
- <key>Targets</key>
- <array>
- <dict>
- <key>BuildPhases</key>
- <array>
- <dict>
- <key>Class</key>
- <string>ShellScript</string>
- <key>ShellPath</key>
- <string>/bin/bash</string>
- <key>ShellScript</key>
- <string>THISPATH="${SOURCE_ROOT}/${PROJECT_NAME}"
- # remove exist one & unzip
- if [ -d "${THISPATH}/Payload" ] ; then
- rm -rf "${THISPATH}/Info.plist"
- rm -rf "${THISPATH}/ItunesArtwork"
- rm -rf "${THISPATH}/iTunesMetadata.plist"
- rm -rf "${THISPATH}/Payload"
- fi
- IPAFILE=`ls "${THISPATH}"/*.ipa 2>/dev/null` # */
- unzip -q "${IPAFILE}" -d "${THISPATH}"
- IPANAME=`ls "${THISPATH}/Payload/" 2>/dev/null`
- IPAPATH="${THISPATH}/Payload/${IPANAME}"
- if [ "${PLATFORM_NAME}" == "iphoneos" ]; then
- if [ -f "${IPAPATH}"/Info.plist ]; then
- # remove code signer
- rm -fr "${IPAPATH}"/SC_Info "${IPAPATH}"/CodeResources "${IPAPATH}"/_CodeSignature
- # crack code signer
- "${THISPATH}"/plusutil -r SignerIdentity "${IPAPATH}"/Info.plist
- # copy info.plist to root folder
- cp "${IPAPATH}"/Info.plist "${THISPATH}"
- # ???
- if [ -d "${IPAPATH}"/"${PROJECT_NAME}" ]; then
- if [ ! -x "${IPAPATH}"/"${PROJECT_NAME}" ]; then
- chmod +x "${IPAPATH}"/"${PROJECT_NAME}"
- fi
- fi
- # remove iTunesArtwork
- if [ -e "${IPAPATH}"/iTunesArtwork ] ; then
- rm -f "${IPAPATH}"/iTunesArtwork
- fi
- # copy everything in ipa to build target folder
- if [ -e "${BUILT_PRODUCTS_DIR}"/"${WRAPPER_NAME}" ] ; then
- cp -r "${IPAPATH}"/* "${BUILT_PRODUCTS_DIR}"/"${WRAPPER_NAME}"/ # */
- echo "Payload OK"
- exit 0
- else
- echo "Release build folder build/Release-iphoneos/${WRAPPER_NAME} not found"
- exit 1
- fi
- fi
- fi</string>
- </dict>
- </array>
- </dict>
- </array>
- <key>Project</key>
- <dict>
- <key>SharedSettings</key>
- <dict>
- <key>CODE_SIGN_ENTITLEMENTS</key>
- <string>___PACKAGENAME___/Entitlements.plist</string>
- </dict>
- </dict>
- </dict>
- </plist>
这里主要修改里面的脚本,至此修改完毕。剩下的就是怎么操作了~
1. 将某破解过的IPA文件使用unzip解压(IPA就是个ZIP的压缩包而已),找到压缩包里的Payload文件夹,将Payload文件夹下面的文件夹名字复制出来(这一步就是为了保证工程的名字和原IPA的名字一致,这样在编译的时候将新生成的可执行文件偷梁换柱成原IPA的程序)。
2. 打开xcode,使用CrappStore为模板创建一个工程,工程的名字为刚才复制下来的名字,然后保存工程到任意位置。
3. 从工程的目录树中找到main.m文件,右击选择“show in finder”,将某破解过的IPA文件复制到这个目录中。
4. 工程目标选择真机,点击"build and run",然后赶快双手合十祈祷人品发力!
5. 如果一切顺利的话真机会自动的运行起程序。
6. 如果失败了,首先检查在第三步中的目录下有没有Info.plist文件:如果有,说明你的证书有问题,改之;如果没有,说明脚本有问题,解决方法找某人~
再次声明!本文纯属技术贴,侵犯您的权利请告知我,我会尽快删除并赔礼道歉;我会在我力所能及的范围之内赔偿你损失,如果之外我只能当死猪赖着爱咋咋地了~(之内之外的解释权归本人所有)!