1 创建一个工作目录,比如桌面上的resign目录,其绝对路径是/Users/apple/desktop/resign/,并切换到当前目录下
2 解压缩需要重签名的cma.ipa到payload目录
3 在当前目录resign中创建tips目录,并拷贝tips.ipa到此目录,解压tips.ipa到payload目录
4 取出tips.app中的embedded.mobileprovision到当前目录resign
cp tips/payload/tips.app/embedded.mobileprovision /Users/apple/desktop/resign/
5
security cms -D -i embedded.mobileprovision > profile.plist
/usr/libexec/PlistBuddy -x -c ‘Print :Entitlements’ profile.plist > entitlements.plist
cp entitlements.plist Payload/
6
cp embedded.mobileprovision Payload/长马智驭.app/embedded.mobileprovision
7
/usr/libexec/PlistBuddy -c “Set :CFBundleIdentifier BS6PFJ29C8.com.second.tipsme” Payload/长马智驭.app/Info.plist
8
rm -rf Payload/长马智驭.app/_CodeSignature
8.1
chmod +x Payload/长马智驭.app/长马智驭
9
codesign -f -s C4EECE7290604BEF63462DE0E972E70FA610600E --no-strict --entitlements=entitlements.plist Payload/长马智驭.app
codesign -f -s “iPhone Distribution: jinguang liu (BS6PFJ29C8)” --no-strict --entitlements=entitlements.plist Payload/长马智驭.app
10
zip -ry ‘cma_new.ipa’ ‘Payload’
11
codesign -v Payload/长马智驭.app
12
codesign -vv -d Payload/长马智驭.app
13
codesign --entitlements :- -d Payload/长马智驭.app
查看根证书:
security find-certificate -c “Apple Worldwide Developer Relations Certification Authority”
检查签名:
codesign —verify payload/长马智驭.app
列出所有开发者证书文件:
security find-identity -v -p codesigning
查看dylib:
otool -L payload/长马智驭.app/长马智驭
注入:
建一个Frameworks目录把动态库放进去
./yololib payload/长马智驭.app/长马智驭 Frameworks/PatchPGO.framework/PatchPGO
把Frameworks的目录一起拷到.app目录