Tencent / tinker

Tinker is a hot-fix solution library for Android, it supports dex, library and resources update without reinstall apk.
Other
17.17k stars 3.34k forks source link

加固模式下合成补丁失败 #1363

Closed hqzxzwb closed 4 years ago

hqzxzwb commented 4 years ago
异常类型:app运行时异常

手机型号:无关

手机系统版本:< Android 9

tinker版本:1.9.14.6

gradle版本:AGP 3.6.1 

是否使用热更新SDK: 否

系统:Mac

堆栈/日志:
2020-03-25 11:30:36.564 23310-23310/? W/dex2oat: Using default instruction set features for ARM CPU variant (default) using conservative defaults
2020-03-25 11:30:36.565 23310-23310/? W/dex2oat: Using default instruction set features for ARM CPU variant (cortex-a9) using conservative defaults
2020-03-25 11:30:36.565 23310-23310/? I/dex2oat: /system/bin/dex2oat -j3 --dex-file=/data/data/***/tinker/patch-c8a9aad5/dex/tinker_classN.apk --output-vdex-fd=70 --oat-fd=71 --oat-location=/data/data/***/tinker/patch-c8a9aad5/dex/oat/arm/tinker_classN.odex --compiler-filter=quicken
2020-03-25 11:30:36.639 23310-23310/? E/dex2oat: Invalid version number in dex file header.  File: /data/data/***/tinker/patch-c8a9aad5/dex/tinker_classN.apk
2020-03-25 11:30:36.642 23310-23310/? I/dex2oat: dex2oat took 78.200ms (61.778ms cpu) (threads: 3) 
2020-03-25 11:30:36.648 23224-23305/? W/zygote: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg & --instruction-set=arm --instruction-set-features=-div,-atomic_ldrd_strd,-armv8a --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m -j3 --instruction-set-variant=cortex-a9 --instruction-set-features=default --dex-file=/data/data/***/tinker/patch-c8a9aad5/dex/tinker_classN.apk --output-vdex-fd=70 --oat-fd=71 --oat-location=/data/data/***/tinker/patch-c8a9aad5/dex/oat/arm/tinker_classN.odex --compiler-filter=quicken) because non-0 exit status
2020-03-25 11:30:36.648 23224-23305/? W/zygote: Unrecognized version number in /data/user/0/***/tinker/patch-c8a9aad5/dex/tinker_classN.apk: 0 3 9 

该问题可能与这行代码有关

hqzxzwb commented 4 years ago

@tomystang

zhengzhuoxing commented 4 years ago

@hqzxzwb 你好,你的问题解决了么

hqzxzwb commented 4 years ago

我目前是写了个脚本在生成补丁之后把里面的dex文件修改一下再打包回去,眼下能用。注意要同时修改dex_meta文件以及重新签名。

WhatHowWhy commented 4 years ago

@hqzxzwb 你好,我也遇到了这个问题,请问能说一下具体步骤吗,方便发一下脚本内容吗

hqzxzwb commented 4 years ago

Dup of #1391