{"id":1378,"date":"2018-11-09T12:14:15","date_gmt":"2018-11-09T04:14:15","guid":{"rendered":"http:\/\/www.yusian.com\/blog\/?p=1378"},"modified":"2018-11-09T12:18:17","modified_gmt":"2018-11-09T04:18:17","slug":"tweak%e9%a1%b9%e7%9b%aeipa%e5%8c%85%e9%87%8d%e7%ad%be%e5%90%8d","status":"publish","type":"post","link":"https:\/\/www.yusian.com\/blog\/reverse\/2018\/11\/09\/1214151378.html","title":{"rendered":"tweak\u9879\u76eeipa\u5305\u91cd\u7b7e\u540d"},"content":{"rendered":"<p>1\u3001\u53c2\u8003\u94fe\u63a5\uff1a<a href=\"http:\/\/www.yusian.com\/blog\/reverse\/2018\/11\/09\/091250.html\">ipa\u5305\u91cd\u7b7e\u540d<\/a><br \/>\n2\u3001tweak\u9879\u76ee\u4fee\u6539\u90e8\u5206\u662f\u4ee5\u63d2\u4ef6\u7684\u5f62\u5f0f\u5b58\u5728\uff0c\u56e0\u6b64\u9700\u8981\u5c06\u63d2\u4ef6\u52a8\u6001\u5e93\u4e0e\u73b0\u5728\u7684ipa\u5305\u91cd\u65b0\u6253\u5305\u7b7e\u540d\uff1b<br \/>\n3\u3001\u627e\u5230tweak\u540e\u751f\u6210\u7684\u52a8\u6001\u5e93\uff0c\u53c2\u8003\u8def\u5f84\u4e3a\uff1a\/Library\/MobileSubstrate\/DynamicLibarries\/xxxTweak.dylib\uff1b<br \/>\n4\u3001\u5c06\u8be5dylib\u6587\u4ef6\u653e\u5728\u73b0\u6709\u5305xx.app\u4e2d\uff0c\u4e0e\u4e8c\u8fdb\u6587\u4ef6\u540c\u76ee\u5f55\uff1b<br \/>\n5\u3001\u4f7f\u7528otool -L xxxxx\u67e5\u770bMach-O\u6587\u4ef6\u7684\u52a8\u6001\u5e93\u52a0\u8f7d\uff0c\u8fd9\u91cc\u9762\u662f\u6ca1\u6709tweak\u52a8\u6001\u5e93\u7684\uff0c\u9700\u8981\u5c06xxxTweak.dylib\u52a0\u8fdb\u6765\uff1b<br \/>\n6\u3001\u5de5\u5177\u6765\u4e86\uff0c<a href=\"https:\/\/github.com\/Tyilo\/insert_dylib\">https:\/\/github.com\/Tyilo\/insert_dylib<\/a>\uff1b<br \/>\n6.1\u3001\u4f7f\u7528release\u7f16\u8bd1\u8be5git\u5de5\u7a0b\uff0c\u5f97\u5230\u4e00\u4e2ainser_dylib\u5de5\u5177\uff0c\u653e\u5728\/usr\/local\/bin\u4e2d\uff1b<br \/>\n6.2\u3001insert_dylib @executable_path\/xxxTweak.dylib xxxx<\/p>\n<pre lang=\"bash\">yusian@SianMac2:~$insert_dylib @executable_path\/xxxTweak.dylib xxxx\r\nLC_CODE_SIGNATURE load command found. Remove it? [y\/n] y\r\nAdded LC_LOAD_DYLIB to lldb_patched<\/pre>\n<p>6.3\u3001\u6b64\u65f6\u4f1a\u751f\u6210\u4e00\u4e2axxxx_patched\u7684Mach-O\u6587\u4ef6\uff0c\u4f7f\u7528otool -L xxxx\u67e5\u770b\u80fd\u770b\u5230\u65b0\u52a0\u7684\u52a8\u6001\u5e93<br \/>\n7\u3001\u4fee\u6539xxxTweak.dylib\u4e2d\u7684\u5e93\u8def\u5f84\uff1b<br \/>\n7.1\u3001\u4f7f\u7528otool -L xxxTweak.dylib\uff0c\u53ef\u770b\u5230\u4f9d\u8d56\u7684\u5e93\u6709\u4e00\u4e2a\u662f\u4e0eCydia\u76f8\u5173\u7684<br \/>\n\/Library\/Frameworks\/CydiaSubstrate.framework\/CydiaSubstrate<br \/>\n7.2\u3001\u4ece\u8d8a\u72f1\u624b\u673a\u4e2d\u5c06\u5e93\u62f7\u8d1d\u51fa\u6765\u5b58\u653e\u5230xxx.app\u76ee\u5f55\u4e2d\uff0c\u4e0e\u8be5\u52a8\u6001\u5e93\u540c\u76ee\u5f55\uff1b<br \/>\n7.3\u3001\u4fee\u6539\u52a8\u6001\u5e93\u4e2dCydiaSubstrate\u7684\u8def\u5f84<\/p>\n<pre lang=\"bash\">yusian@SianMac2:~$ install_name_tool xxxxtweak.dylib \/Library\/Frameworks\/CydiaSubstrate.framework\/CydiaSubstrate @loader_path\/CydiaSubstrate<\/pre>\n<p>8\u3001\u5c06\u65b0\u52a0\u8fdb\u6765\u7684\u4e24\u4e2a\u52a8\u6001\u5e93\u7b7e\u540d<\/p>\n<pre lang=\"bash\">yusian@SianMac2:~$ codesign -fs xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxtweak.dylib\r\nlldbtweak.dylib: replacing existing signature\r\nyusian@SianMac2:~$ codesign -fs xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx CydiaSubstrate\r\nCydiaSubstrate: replacing existing signature<\/pre>\n<p>9\u3001\u6574\u5305\u91cd\u7b7e\u540d\uff1a<a href=\"http:\/\/www.yusian.com\/blog\/reverse\/2018\/11\/09\/091250.html\">ipa\u5305\u91cd\u7b7e\u540d<\/a><\/p>\n<pre lang=\"bash\">yusian@SianMac2:~$ codesign -fs xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --entitlements inh_entitlements.plist Payload\/xxxx.app\r\nPayload\/lldb.app: replacing existing signature<\/pre>\n<p>10\u3001\u4e24\u4e2a\u73af\u5883\u53d8\u91cf\u8bf4\u660e\uff1a<br \/>\n10.1\u3001@executable_path\uff1a\u53ef\u6267\u884c\u6587\u4ef6\u8def\u5f84<br \/>\n10.2\u3001@loader_path\uff1a\u5f53\u524d\u52a0\u8f7d\u5e93\u8def\u5f84<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1\u3001\u53c2\u8003\u94fe\u63a5\uff1aipa\u5305\u91cd\u7b7e\u540d 2\u3001tweak\u9879\u76ee\u4fee\u6539\u90e8\u5206\u662f\u4ee5\u63d2\u4ef6\u7684\u5f62\u5f0f\u5b58\u5728\uff0c\u56e0\u6b64\u9700\u8981\u5c06\u63d2\u4ef6\u52a8\u6001\u5e93\u4e0e\u73b0\u5728\u7684ipa\u5305\u91cd\u65b0\u6253\u5305\u7b7e\u540d\uff1b 3\u3001\u627e\u5230tweak\u540e\u751f\u6210\u7684\u52a8\u6001\u5e93\uff0c\u53c2\u8003\u8def\u5f84\u4e3a\uff1a\/Library\/MobileSubstrate\/DynamicLibarries\/xxxTweak.dylib\uff1b 4\u3001\u5c06\u8be5dylib\u6587\u4ef6\u653e\u5728\u73b0\u6709\u5305xx.app\u4e2d\uff0c\u4e0e\u4e8c\u8fdb\u6587\u4ef6\u540c\u76ee\u5f55\uff1b 5\u3001\u4f7f\u7528otool -L xxxxx\u67e5\u770bMach-O\u6587\u4ef6\u7684\u52a8\u6001\u5e93\u52a0\u8f7d\uff0c\u8fd9\u91cc\u9762\u662f\u6ca1\u6709tweak\u52a8\u6001\u5e93\u7684\uff0c\u9700\u8981\u5c06xxxTweak.dylib\u52a0\u8fdb\u6765\uff1b 6\u3001\u5de5\u5177\u6765\u4e86\uff0chttps:\/\/github.com\/Tyilo\/insert_dylib\uff1b 6.1\u3001\u4f7f\u7528release\u7f16\u8bd1\u8be5git\u5de5\u7a0b\uff0c\u5f97\u5230\u4e00\u4e2ainser_dylib\u5de5\u5177\uff0c\u653e\u5728\/usr\/local\/bin\u4e2d\uff1b 6.2\u3001insert_dylib @executable_path\/xxxTweak.dylib xxxx yusian@SianMac2:~$insert_dylib @executable_path\/xxxTweak.dylib xxxx LC_CODE_SIGNATURE load command found. Remove it? [y\/n] y Added LC_LOAD_DYLIB to lldb_patched 6.3\u3001\u6b64\u65f6\u4f1a\u751f\u6210\u4e00\u4e2axxxx_patched\u7684Mach-O\u6587\u4ef6\uff0c\u4f7f\u7528otool -L xxxx\u67e5\u770b\u80fd\u770b\u5230\u65b0\u52a0\u7684\u52a8\u6001\u5e93 7\u3001\u4fee\u6539xxxTweak.dylib\u4e2d\u7684\u5e93\u8def\u5f84\uff1b 7.1\u3001\u4f7f\u7528otool -L xxxTweak.dylib\uff0c\u53ef\u770b\u5230\u4f9d\u8d56\u7684\u5e93\u6709\u4e00\u4e2a\u662f\u4e0eCydia\u76f8\u5173\u7684 \/Library\/Frameworks\/CydiaSubstrate.framework\/CydiaSubstrate 7.2\u3001\u4ece\u8d8a\u72f1\u624b\u673a\u4e2d\u5c06\u5e93\u62f7\u8d1d\u51fa\u6765\u5b58\u653e\u5230xxx.app\u76ee\u5f55\u4e2d\uff0c\u4e0e\u8be5\u52a8\u6001\u5e93\u540c\u76ee\u5f55\uff1b 7.3\u3001\u4fee\u6539\u52a8\u6001\u5e93\u4e2dCydiaSubstrate\u7684\u8def\u5f84 yusian@SianMac2:~$ install_name_tool xxxxtweak.dylib \/Library\/Frameworks\/CydiaSubstrate.framework\/CydiaSubstrate @loader_path\/CydiaSubstrate 8\u3001\u5c06\u65b0\u52a0\u8fdb\u6765\u7684\u4e24\u4e2a\u52a8\u6001\u5e93\u7b7e\u540d yusian@SianMac2:~$ codesign -fs xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxtweak.dylib lldbtweak.dylib: replacing existing signature yusian@SianMac2:~$ codesign -fs [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[120],"tags":[170,158,172,171],"class_list":["post-1378","post","type-post","status-publish","format-standard","hentry","category-reverse","tag-ios","tag-tweak","tag-172","tag-171"],"_links":{"self":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts\/1378","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/comments?post=1378"}],"version-history":[{"count":0,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts\/1378\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/media?parent=1378"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/categories?post=1378"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/tags?post=1378"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}