需求:我想把自己制作的一个deb注入到一个app中去
问题:用越狱手机安装deb,运行没有问题,但是将libsubstrate.dylib和自己的动态库放到app包中打包成ipa安装就闪退
代码:
修改路径:install_name_tool -change /Library/Frameworks/CydiaSubstrate.framework/CydiaSubstrate @loader_path/libsubstrate.dylib yktwHook.dylib
将动态库关联macho文件:yololib MyGames-mobile yktwHook.dylib
奔溃日志:crash文件
{“app_name”:“ShanShuiClient-mobile”,“app_version”:“3.0”,“bundleID”:“com.yujiaTec5.shisanzhang”,“adam_id”:0,“os_version”:“iPhone OS 8.4 (12H143)”,“slice_uuid”:“ed18aa2b-d105-3cdf-9a7d-09c5800ed481”,“share_with_app_devs”:false,“build_version”:“3.2”,“is_first_party”:false,“bug_type”:“109”,“name”:“ShanShuiClient-mobile”}
Incident Identifier: 4A6EDE19-A3A6-4D54-905F-F059CAEC201B
CrashReporter Key: 85f777e859e4e80c3b443285c0d84b5b5112fa1e
Hardware Model: iPhone7,2
Process: ShanShuiClient-mobile [11848]
Path: /private/var/mobile/Containers/Bundle/Application/83ACA96F-192C-4291-970D-72A2B630ACCC/ShanShuiClient-mobile.app/ShanShuiClient-mobile
Identifier: com.yujiaTec5.shisanzhang
Version: 3.2 (3.0)
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
Date/Time: 2018-05-02 10:56:12.678 +0800
Launch Time: 2018-05-02 10:56:12.616 +0800
OS Version: iOS 8.4 (12H143)
Report Version: 105
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x0000000120095088
Triggered by Thread: 0
Dyld Error Message:
Library not loaded: @executable_path//Users/joe/Downloads/com.yujiaTec5.shisanzhang-iOS7.0-(Clutch-2.0.4)/Payload/ShanShuiClient-mobile.app/yktwHook.dylib
Referenced from: /private/var/mobile/Containers/Bundle/Application/83ACA96F-192C-4291-970D-72A2B630ACCC/ShanShuiClient-mobile.app/ShanShuiClient-mobile
Reason: image not found
Dyld Version: 353.12