Andfix 部分机器报错lib/arm64/libandfix.so问题

来源:互联网 发布:单雯 知乎 编辑:程序博客网 时间:2024/06/09 22:39
用华为荣耀手机GEM机型使用热修复补丁出现读取补丁就崩溃的问题,其系统日志打印如下
I/dex2oat: dex2oat took 104.305ms (threads: 4) arena alloc=564KB java alloc=384KB native alloc=1558KB free=37KBA/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x8000912d20010 in tid 11910 (om.zwashservice)I/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***I/DEBUG: Build fingerprint: 'HUAWEI/GEM-703L/HWGemini:5.1.1/HUAWEIGEM-703L/C233B112:user/release-keys'I/DEBUG: Revision: '0'I/DEBUG: ABI: 'arm64'I/DEBUG: pid: 11910, tid: 11910, name: om.zwashservice  >>> com.community.custom.zwashservice <<<I/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8000912d20010I/DEBUG:     x0   0000000912cca000  x1   0008000912d20000  x2   0000000000000001  x3   000000557492616cI/DEBUG:     x4   0000000000000000  x5   0000005574926168  x6   0000000000000000  x7   0000000000430000I/DEBUG:     x8   0000000000000000  x9   6dea0bed7f7d6fbf  x10  0000000000000000  x11  0000000000430000I/DEBUG:     x12  0000000000550000  x13  0000000000430000  x14  0000000000000000  x15  0000007faf05e000I/DEBUG:     x16  0000007faf060470  x17  000000000000002e  x18  0000007faefbb000  x19  000000000000003aI/DEBUG:     x20  0000007f9a7cd29c  x21  0000005574936db0  x22  0000000012c643f0  x23  0000000012e38280I/DEBUG:     x24  0000000012e382e0  x25  0000000012c64ad0  x26  0000000012e30ac0  x27  0000000012c643f0I/DEBUG:     x28  0000000012c1e400  x29  0000000012e2adc0  x30  0000007f9a7cd8a0I/DEBUG:     sp   0000007fee906c80  pc   0000007f9a7cd8b4  pstate 0000000060000000I/DEBUG: backtrace:I/DEBUG:     #00 pc 00000000000018b4  /data/app/com.community.custom.zwashservice-1/lib/arm64/libandfix.so (replace_5_1(_JNIEnv*, _jobject*, _jobject*)+68)I/DEBUG:     #01 pc 0000000000001554  /data/app/com.community.custom.zwashservice-1/lib/arm64/libandfix.soI/DEBUG:     #02 pc 00000000000012d4  /data/app/com.community.custom.zwashservice-1/lib/arm64/libandfix.soI/DEBUG:     #03 pc 00000000004b818c  /data/dalvik-cache/arm64/data@app@com.community.custom.zwashservice-1@base.apk@classes.dexI/K3V3CpuGovernorPolicy: close previously scene Hmp policy : 300 , 150I/DEBUG: Tombstone written to: /data/tombstones/tombstone_05


用官网 andfix so库没有解决问题最后修改了gradle配置文件解决问题。

参考博客:http://www.cnblogs.com/poe-blog/p/4728970.html


复制代码
Edit your build.gradle file as follows:android {  // rest of your app's logic  splits {    abi {        enable true        reset()        include 'x86', 'x86_64', 'arm64-v8a', 'armeabi-v7a', 'armeabi'        universalApk false    }  }}(*)注意上面的红色部分要删除掉最后看起来是这样:
复制代码
复制代码
android {  // rest of your app's logic  splits {    abi {        enable true        reset()        include 'x86', 'x86_64', 'armeabi-v7a', 'armeabi'        universalApk false    }  }}
复制代码

原理:

enable: enables the ABIs split mechanism
exclude: By default all ABIs are included, you can remove some ABIs.
include: indicate which ABIs to be included
reset(): reset the list of ABIs to be included to an empty string (this allows, in conjunctions with include, to indicate which one to use rather than which ones to ignore)
universalApk: indicates whether to package a universal version (with all ABIs) or not. Default is false.



0 0
原创粉丝点击