无证书调试,xcode破解详细教程

在越狱的 iphone 的 cydia 添加源 AppSync. 源地址 http://cydia.hackulo.us

关闭xcode

打开终端 

cd /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk
sudo cp SDKSettings.plist SDKSettings.plist.orig
sudo vi SDKSettings.plist
找到

<key>CODE_SIGNING_REQUIRED</key>
<string>YES</string>
YES 改为 NO
然后找到

<key>ENTITLEMENTS_REQUIRED</key>
<string>YES</string>

把 YES 改为 NO 

注意:在 vi里面, 查找用 ‘/’ ,而没有 “Cmd-F”

cd /Developer/Platforms/iPhoneOS.platform/
sudo cp Info.plist Info.plist.orig
sudo vi Info.plist

会有二处下面的代码

<key>CODE_SIGN_CONTEXT_CLASS</key>
<string>XCiPhoneOSCodeSignContext</string>
找到

<string>XCiPhoneOSCodeSignContext</string>

替换为:

<string>XCCodeSignContext</string>
然后 继续 在终端里面
cd ~/Desktop
vi script
按 “i” 按键 粘贴到这里
#!/bin/bash
cd /Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Plug-ins/iPhoneOS\ Build\ System\ Support.xcplugin/Contents/MacOS/
dd if=iPhoneOS\ Build\ System\ Support of=working bs=500 count=255
printf "\xc3\x26\x00\x00" >> working
/bin/mv -n iPhoneOS\ Build\ System\ Support iPhoneOS\ Build\ System\ Support.original
/bin/mv working iPhoneOS\ Build\ System\ Support
chmod a+x iPhoneOS\ Build\ System\ Support


然后按ESC 按键,输入“:” “x”

然后enter回车按键

chmod 777 script
./script

正常运行晚的结果如下
$ ./script
223+1 records in
223+1 records out
111648 bytes transferred in 0.002678 secs (41692099 bytes/sec)

到这个时候 xcode 几乎破解ok了


mkdir /Developer/iphoneentitlements401
cd /Developer/iphoneentitlements401
curl -O http://www.alexwhittemore.com/iphone/gen_entitlements.txt
mv gen_entitlements.txt gen_entitlements.py
chmod 777 gen_entitlements.py
然后还要添加一个script  Project > New Build Phase > New Run Script Build Phase.  copy/paste this:

export CODESIGN_ALLOCATE=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
if [ "${PLATFORM_NAME}" == "iphoneos" ]; then
/Developer/iphoneentitlements401/gen_entitlements.py "my.company.${PROJECT_NAME}" "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/${PROJECT_NAME}.xcent";
codesign -f -s "iPhone Developer" --entitlements "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/${PROJECT_NAME}.xcent" "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/"
fi


参考文档:http://kqwd.blog.163.com/blog/static/4122344820117191351263/

你可能感兴趣的:(无证书调试,xcode破解详细教程)