Tencent / tinker

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

tinker补丁下载成功,但是合并代码在校验文件MD5时,出错了 #1643

Open LiviaGeneral opened 2 years ago

LiviaGeneral commented 2 years ago

异常类型:app运行时异常

手机型号: 华为 8x max

手机系统版本:Android 9.0 tinker版本:1.9.14.19

gradle版本:3.5.4

是否使用热更新SDK: Bugly SDK

系统:windows

堆栈/日志: 2022-04-09 08:58:33.073 22429-22429/? D/Tinker.DefaultAppLike: onCreate 2022-04-09 08:58:33.086 22429-22429/? W/Tinker.UpgradePatchRetry: onPatchRetryLoad retry is not main process, just return 2022-04-09 08:58:33.088 22429-22429/? D/Tinker.TinkerLoader: [PendingLog @ 2022-04-09 08:58:33.055] tryLoad test test 2022-04-09 08:58:33.088 22429-22429/? W/Tinker.TinkerLoader: [PendingLog @ 2022-04-09 08:58:33.058] tryLoadPatchFiles:patch info not exist:/data/user/0/com.zhongwei.jxm/tinker/patch.info 2022-04-09 08:58:33.088 22429-22429/? D/Tinker.DefaultAppLike: [PendingLog @ 2022-04-09 08:58:33.059] onBaseContextAttached: 2022-04-09 08:58:36.233 21763-21763/? V/Tinker.TinkerManager: onDownloadSuccess. 2022-04-09 08:58:36.233 21763-21763/? V/Tinker.TinkerManager: check if has new patch. 2022-04-09 08:58:36.248 21763-21763/? V/Tinker.TinkerManager: has new patch. 2022-04-09 08:58:36.269 21763-21763/? V/Tinker.TinkerManager: starting patch. 2022-04-09 08:58:36.283 21763-21763/? V/Tinker.TinkerPatchListener: receive a patch file: /data/user/0/com.zhongwei.jxm/app_tmpPatch/tmpPatch.apk, file size:1889370 2022-04-09 08:58:36.295 21763-21763/? W/Tinker.PatchInfo: read property failed, e:java.io.FileNotFoundException: /data/user/0/com.zhongwei.jxm/tinker/patch.info (No such file or directory) 2022-04-09 08:58:36.296 21763-21763/? W/Tinker.PatchInfo: read property failed, e:java.io.FileNotFoundException: /data/user/0/com.zhongwei.jxm/tinker/patch.info (No such file or directory) 2022-04-09 08:58:36.300 21763-21763/? V/Tinker.TinkerPatchListener: get platform:null 2022-04-09 08:58:36.306 21763-21763/? I/Tinker.TinkerPatchService: run patch service... 2022-04-09 08:58:36.340 2342-2436/? I/ActivityManager: Start proc 22479:com.zhongwei.jxm:patch/u0a570 for service com.zhongwei.jxm/com.tencent.tinker.lib.service.TinkerPatchForeService 2022-04-09 08:58:36.477 22479-22479/? D/Tinker.TinkerLoader: tryLoad test test 2022-04-09 08:58:36.479 22479-22479/? W/Tinker.TinkerLoader: tryLoadPatchFiles: we don't load patch with :patch process itself, just return 2022-04-09 08:58:36.480 22479-22479/? D/Tinker.DefaultAppLike: onBaseContextAttached: 2022-04-09 08:58:36.481 22479-22479/? I/Tinker.ReflectApp: with app realApplication from manifest applicationName:com.zhongwei.jxm.app.JXMApplication 2022-04-09 08:58:36.493 22479-22479/? V/Tinker.TinkerPatchListener: application maxMemory:256 2022-04-09 08:58:36.495 22479-22479/? W/Tinker.Tinker: tinker patch directory: /data/user/0/com.zhongwei.jxm/tinker 2022-04-09 08:58:36.495 22479-22479/? I/Tinker.Tinker: try to install tinker, isEnable: true, version: 1.9.14.19 2022-04-09 08:58:36.495 22479-22479/? I/Tinker.TinkerLoadResult: parseTinkerResult loadCode:-1, process name:com.zhongwei.jxm:patch, main process:false, systemOTA:false, fingerPrint:HONOR/ARE-AL00/HWARE-Q:9/HONORARE-AL00/9.1.0.172C00:user/release-keys, oatDir:null, useInterpretMode:false 2022-04-09 08:58:36.495 22479-22479/? W/Tinker.TinkerLoadResult: tinker is disable, just return 2022-04-09 08:58:36.496 22479-22479/? I/Tinker.DefaultLoadReporter: patch loadReporter onLoadResult: patch load result, path:/data/user/0/com.zhongwei.jxm/tinker, code: -1, cost: 3ms 2022-04-09 08:58:36.496 22479-22479/? W/Tinker.Tinker: tinker load fail! 2022-04-09 08:58:36.497 22479-22479/? E/Tinker.ReflectApp: replaceApplicationLike delegateClass:class com.tencent.bugly.beta.tinker.TinkerApplicationLike 2022-04-09 08:58:36.497 22479-22479/? D/Tinker.DefaultAppLike: onCreate 2022-04-09 08:58:36.523 22479-22509/? I/Tinker.TinkerPatchService: for system version >= Android O, we just ignore increasingPriority job to avoid crash or toasts. 2022-04-09 08:58:36.529 22479-22479/? W/Tinker.UpgradePatchRetry: onPatchRetryLoad retry is not main process, just return 2022-04-09 08:58:36.530 22479-22509/? I/Tinker.DefaultPatchReporter: patchReporter onPatchServiceStart: patch service start 2022-04-09 08:58:36.548 22479-22479/? D/Tinker.TinkerLoader: [PendingLog @ 2022-04-09 08:58:36.477] tryLoad test test 2022-04-09 08:58:36.548 22479-22479/? W/Tinker.TinkerLoader: [PendingLog @ 2022-04-09 08:58:36.479] tryLoadPatchFiles: we don't load patch with :patch process itself, just return 2022-04-09 08:58:36.548 22479-22479/? D/Tinker.DefaultAppLike: [PendingLog @ 2022-04-09 08:58:36.480] onBaseContextAttached: 2022-04-09 08:58:36.559 22479-22509/? W/Tinker.UpgradePatchRetry: try copy file: /data/user/0/com.zhongwei.jxm/app_tmpPatch/tmpPatch.apk to /data/user/0/com.zhongwei.jxm/tinker_temp/temp.apk 2022-04-09 08:58:36.622 22479-22509/? I/Tinker.UpgradePatch: UpgradePatch tryPatch:patchMd5:04e07996b281589748ae5124b2b76f03 2022-04-09 08:58:36.623 22479-22509/? W/Tinker.PatchInfo: read property failed, e:java.io.FileNotFoundException: /data/user/0/com.zhongwei.jxm/tinker/patch.info (No such file or directory) 2022-04-09 08:58:36.623 22479-22509/? W/Tinker.PatchInfo: read property failed, e:java.io.FileNotFoundException: /data/user/0/com.zhongwei.jxm/tinker/patch.info (No such file or directory) 2022-04-09 08:58:36.624 22479-22509/? I/Tinker.UpgradePatch: UpgradePatch tryPatch:patchVersionDirectory:/data/user/0/com.zhongwei.jxm/tinker/patch-04e07996 2022-04-09 08:58:36.629 22479-22509/? W/Tinker.UpgradePatch: UpgradePatch copy patch file, src file: /data/user/0/com.zhongwei.jxm/app_tmpPatch/tmpPatch.apk size: 1889370, dest file: /data/user/0/com.zhongwei.jxm/tinker/patch-04e07996/patch-04e07996.apk size:1889370 2022-04-09 08:58:36.634 22479-22509/? I/Tinker.DexDiffPatchInternal: try Extracting /data/user/0/com.zhongwei.jxm/tinker/patch-04e07996/dex/classes6.dex.jar 2022-04-09 08:58:36.702 22479-22509/? I/Tinker.DexDiffPatchInternal: isExtractionSuccessful: false 2022-04-09 08:58:36.703 22479-22509/? I/Tinker.DexDiffPatchInternal: try Extracting /data/user/0/com.zhongwei.jxm/tinker/patch-04e07996/dex/classes6.dex.jar 2022-04-09 08:58:36.764 22479-22509/? I/Tinker.DexDiffPatchInternal: isExtractionSuccessful: false 2022-04-09 08:58:36.765 22479-22509/? W/Tinker.DexDiffPatchInternal: Failed to extract raw patch file /data/user/0/com.zhongwei.jxm/tinker/patch-04e07996/dex/classes6.dex.jar 2022-04-09 08:58:36.765 22479-22509/? I/Tinker.DefaultPatchReporter: patchReporter onPatchTypeExtractFail: file extract fail type: dex, path: /data/user/0/com.zhongwei.jxm/tinker/patch-04e07996/patch-04e07996.apk, extractTo: /data/user/0/com.zhongwei.jxm/tinker/patch-04e07996/dex/classes6.dex.jar, filename: classes6.dex 2022-04-09 08:58:36.773 22479-22509/? I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/user/0/com.zhongwei.jxm/tinker/patch-04e07996/patch-04e07996.apk 2022-04-09 08:58:36.773 22479-22509/? I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/user/0/com.zhongwei.jxm/tinker/patch-04e07996/dex 2022-04-09 08:58:36.773 22479-22509/? I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/user/0/com.zhongwei.jxm/tinker/patch-04e07996 2022-04-09 08:58:36.774 22479-22509/? W/Tinker.DexDiffPatchInternal: patch recover, extractDiffInternals fail 2022-04-09 08:58:36.774 22479-22509/? I/Tinker.DexDiffPatchInternal: recover dex result:false, cost:145 2022-04-09 08:58:36.775 22479-22509/? E/Tinker.UpgradePatch: UpgradePatch tryPatch:new patch recover, try patch dex failed 2022-04-09 08:58:36.775 22479-22509/? I/Tinker.DefaultPatchReporter: patchReporter onPatchResult: patch all result path: /data/user/0/com.zhongwei.jxm/app_tmpPatch/tmpPatch.apk, success: false, cost: 184 2022-04-09 08:58:36.775 22479-22509/? I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/user/0/com.zhongwei.jxm/tinker_temp/temp.apk 2022-04-09 08:58:36.795 21763-22513/? V/Tinker.TinkerResultService: TinkerResultService receive result: PatchResult: isSuccess:false rawPatchFilePath:/data/user/0/com.zhongwei.jxm/app_tmpPatch/tmpPatch.apk costTime:184 dexoptTriggerTime:0 isOatGenerated:false patchVersion:04e07996b281589748ae5124b2b76f03 2022-04-09 08:58:36.808 2342-3285/? W/ActivityManager: Scheduling restart of crashed service com.zhongwei.jxm/com.tencent.tinker.lib.service.TinkerPatchForeService in 1000ms

出现问题看了下源码在这一行:DexDiffPathInternal 中的 public static boolean verifyDexFileMd5(File file, String md5) ,检验失败了,请问是什么原因导致的啊?