Issue/提问须知
在提交issue之前,我们应该先查询是否已经有相关的issue以及常见问题。提交issue时,我们需要写明issue的原因,以及编译或运行过程的日志(加载进程以及Patch进程)。issue需要以下面的格式:
异常类型:app运行时异常/编译异常
手机型号:荣耀等
手机系统版本:如:Android 10
tinker版本:1.9.14.25
agp 版本: 4.2.2
gradle版本:gradle-6.9.1-all
是否使用热更新SDK:是
系统:Mac
问题原因: TinkerTestDexLoad.isPatch = false
打补丁包是否成功:成功
补丁包生效状况:打完补丁后重启生效,再次重启失效。
原因分析简述: test.dex 被改名为 class23.dex,导致重启后排序被放到了最后,class23.dex 内部的 TinkerTestDexLoad isPatch = true被前面 class10.dex(这个是 TinkerTestDexLoad 在基准包中的 的 dex 文件) 覆盖了导致 isPatch = false。
关于这个问题的其他 issue: https://github.com/Tencent/tinker/issues/1680, 这个issue 跟我这个应该是同一个问题,里面给了临时的解决方案。不过既然 tinker 这么设计,肯定是有他的道理。直接跳过 checkDexInstall 只是临时的一个方案。
### 现在我的疑问在于,我看了tinker 相关的源码,发现现在的现象是符合预期的,也就是按照源码里的流程,UpgradePatch 里 会把 补丁包中test.dex 改名为 classesN.dex(在我这里是 classes23.dex),然后 再次启动时 TinkerLoader install 的时候,SystemClassLoaderAdder 排序后 classes23.dex 被排到了最后优先级是最低的(这里即使还是 test.dex 也会被排在最后)。
所以有大佬能帮忙解答一下我的疑问吗?** test.dex 经过上面的处理后,在所有 dex 文件中排到了最后一个,那么他的TinkerTestDexLoad 类就会被排在前面基准包里的 TinkerTestDexLoad isPatch = false 覆盖,导致 checkDexInstall = false,补丁包安装失败。所以是哪里出问题了呢**。
打补丁包日志:
2022-11-21 11:08:32.167 com.my.package W/Tinker.PatchInfo: read property failed, e:java.io.FileNotFoundException: /data/user/0/com.my.package/tinker/patch.info: open failed: ENOENT (No such file or directory)
2022-11-21 11:08:32.167 com.my.package W/Tinker.PatchInfo: read property failed, e:java.io.FileNotFoundException: /data/user/0/com.my.package/tinker/patch.info: open failed: ENOENT (No such file or directory)
2022-11-21 11:08:32.168 com.my.package W/Tinker.UpgradePatchRetry: onPatchListenerCheck retry file is not exist, just return
2022-11-21 11:08:32.173 com.my.package I/Tinker.TinkerPatchService: run patch service...
2022-11-21 11:08:32.899 com.my.package D/Tinker.TinkerLoader: tryLoad test test
2022-11-21 11:08:32.901 com.my.package W/Tinker.TinkerLoader: tryLoadPatchFiles: we don't load patch with :patch process itself, just return
2022-11-21 11:08:32.905 com.my.package D/Tinker.DefaultAppLike: onBaseContextAttached:
2022-11-21 11:08:32.910 com.my.package W/Tinker.Tinker: tinker patch directory: /data/user/0/com.my.package/tinker
2022-11-21 11:08:32.912 com.my.package I/Tinker.Tinker: try to install tinker, isEnable: true, version: 1.9.14.25
2022-11-21 11:08:32.912 com.my.package I/Tinker.TinkerLoadResult: parseTinkerResult loadCode:-1, process name:com.my.package:patch, main process:false, systemOTA:false, fingerPrint:HONOR/HLK-AL00/HWHLK-H:10/HONORHLK-AL00/102.0.0.270C00:user/release-keys, oatDir:null, useInterpretMode:false
2022-11-21 11:08:32.912 com.my.package W/Tinker.TinkerLoadResult: tinker is disable, just return
2022-11-21 11:08:32.913 com.my.package I/Tinker.My: MyLoadReporter onLoadResult -1
2022-11-21 11:08:32.913 com.my.package I/Tinker.DefaultLoadReporter: patch loadReporter onLoadResult: patch load result, path:/data/user/0/com.my.package/tinker, code: -1, cost: 2ms
2022-11-21 11:08:32.913 com.my.package W/Tinker.Tinker: tinker load fail!
2022-11-21 11:08:32.913 com.my.package D/Tinker.DefaultAppLike: onCreate
2022-11-21 11:08:32.944 com.my.package I/Tinker.TinkerPatchService: for system version >= Android O, we just ignore increasingPriority job to avoid crash or toasts.
2022-11-21 11:08:32.945 com.my.package I/Tinker.My: MyPatchReporter onPatchServiceStart
2022-11-21 11:08:32.946 com.my.package I/Tinker.DefaultPatchReporter: patchReporter onPatchServiceStart: patch service start
2022-11-21 11:08:32.947 com.my.package D/Tinker.TinkerLoader: [PendingLog @ 2022-11-21 11:08:32.899] tryLoad test test
2022-11-21 11:08:32.947 com.my.package W/Tinker.TinkerLoader: [PendingLog @ 2022-11-21 11:08:32.901] tryLoadPatchFiles: we don't load patch with :patch process itself, just return
2022-11-21 11:08:32.948 com.my.package D/Tinker.DefaultAppLike: [PendingLog @ 2022-11-21 11:08:32.905] onBaseContextAttached:
2022-11-21 11:08:32.960 com.my.package W/Tinker.UpgradePatchRetry: try copy file: /storage/emulated/0/Android/data/com.my.package/files/tinker/app-debug-patch_signed.apk to /data/user/0/com.my.package/tinker_temp/temp.apk
2022-11-21 11:08:33.042 com.my.package I/Tinker.UpgradePatch: UpgradePatch tryPatch:patchMd5:f3027dc220a962f988e3bc8b17ce7020
2022-11-21 11:08:33.043 com.my.package W/Tinker.PatchInfo: read property failed, e:java.io.FileNotFoundException: /data/user/0/com.my.package/tinker/patch.info: open failed: ENOENT (No such file or directory)
2022-11-21 11:08:33.043 com.my.package W/Tinker.PatchInfo: read property failed, e:java.io.FileNotFoundException: /data/user/0/com.my.package/tinker/patch.info: open failed: ENOENT (No such file or directory)
2022-11-21 11:08:33.044 com.my.package I/Tinker.UpgradePatch: UpgradePatch tryPatch:patchVersionDirectory:/data/user/0/com.my.package/tinker/patch-f3027dc2
2022-11-21 11:08:33.044 com.my.package W/Tinker.UpgradePatch: UpgradePatch copy patch file, src file: /storage/emulated/0/Android/data/com.my.package/files/tinker/app-debug-patch_signed.apk size: 4932, dest file: /data/user/0/com.my.package/tinker/patch-f3027dc2/patch-f3027dc2.apk size:4932
2022-11-21 11:08:33.049 com.my.package I/Tinker.DexDiffPatchInternal: try Extracting /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes18.dex.jar
2022-11-21 11:08:33.054 com.my.package I/Tinker.DexDiffPatchInternal: isExtractionSuccessful: true
2022-11-21 11:08:33.055 com.my.package I/Tinker.DexDiffPatchInternal: try Extracting /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes9.dex.jar
2022-11-21 11:08:33.060 com.my.package I/Tinker.DexDiffPatchInternal: isExtractionSuccessful: true
2022-11-21 11:08:33.061 com.my.package I/Tinker.DexDiffPatchInternal: try Extracting /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes8.dex.jar
2022-11-21 11:08:33.063 com.my.package I/Tinker.DexDiffPatchInternal: isExtractionSuccessful: true
2022-11-21 11:08:33.064 com.my.package I/Tinker.DexDiffPatchInternal: try Extracting /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes19.dex.jar
2022-11-21 11:08:33.912 com.my.package I/Tinker.DexDiffPatchInternal: isExtractionSuccessful: true
2022-11-21 11:08:33.993 com.my.package I/Tinker.DexDiffPatchInternal: try Extracting /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes22.dex.jar
2022-11-21 11:08:34.088 com.my.package I/Tinker.DexDiffPatchInternal: isExtractionSuccessful: true
2022-11-21 11:08:34.096 com.my.package I/Tinker.DexDiffPatchInternal: try Extracting /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes21.dex.jar
2022-11-21 11:08:34.213 com.my.package I/Tinker.DexDiffPatchInternal: isExtractionSuccessful: true
2022-11-21 11:08:34.230 com.my.package I/Tinker.DexDiffPatchInternal: try Extracting /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes20.dex.jar
2022-11-21 11:08:35.145 com.my.package I/Tinker.DexDiffPatchInternal: isExtractionSuccessful: true
2022-11-21 11:08:35.234 com.my.package I/Tinker.DexDiffPatchInternal: try Extracting /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes11.dex.jar
2022-11-21 11:08:35.236 com.my.package I/Tinker.DexDiffPatchInternal: isExtractionSuccessful: true
2022-11-21 11:08:35.237 com.my.package I/Tinker.DexDiffPatchInternal: try Extracting /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes10.dex.jar
2022-11-21 11:08:35.241 com.my.package I/Tinker.DexDiffPatchInternal: isExtractionSuccessful: true
2022-11-21 11:08:35.242 com.my.package I/Tinker.DexDiffPatchInternal: try Extracting /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes12.dex.jar
2022-11-21 11:08:35.245 com.my.package I/Tinker.DexDiffPatchInternal: isExtractionSuccessful: true
2022-11-21 11:08:35.246 com.my.package I/Tinker.DexDiffPatchInternal: try Extracting /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes3.dex.jar
2022-11-21 11:08:35.354 com.my.package I/Tinker.DexDiffPatchInternal: isExtractionSuccessful: true
2022-11-21 11:08:35.363 com.my.package I/Tinker.DexDiffPatchInternal: try Extracting /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes2.dex.jar
2022-11-21 11:08:35.475 com.my.package I/Tinker.DexDiffPatchInternal: isExtractionSuccessful: true
2022-11-21 11:08:35.487 com.my.package I/Tinker.DexDiffPatchInternal: try Extracting /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes13.dex.jar
2022-11-21 11:08:35.490 com.my.package I/Tinker.DexDiffPatchInternal: isExtractionSuccessful: true
2022-11-21 11:08:37.609 com.my.package W/Tinker.DexDiffPatchInternal: success recover dex file: /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes.dex.jar, size: 4272772, use time: 2118
2022-11-21 11:08:37.609 com.my.package I/Tinker.DexDiffPatchInternal: try Extracting /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes17.dex.jar
2022-11-21 11:08:37.613 com.my.package I/Tinker.DexDiffPatchInternal: isExtractionSuccessful: true
2022-11-21 11:08:37.614 com.my.package I/Tinker.DexDiffPatchInternal: try Extracting /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes6.dex.jar
2022-11-21 11:08:37.620 com.my.package I/Tinker.DexDiffPatchInternal: isExtractionSuccessful: true
2022-11-21 11:08:37.622 com.my.package I/Tinker.DexDiffPatchInternal: try Extracting /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes7.dex.jar
2022-11-21 11:08:37.623 com.my.package I/Tinker.DexDiffPatchInternal: isExtractionSuccessful: true
2022-11-21 11:08:37.624 com.my.package I/Tinker.DexDiffPatchInternal: try Extracting /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes16.dex.jar
2022-11-21 11:08:37.629 com.my.package I/Tinker.DexDiffPatchInternal: isExtractionSuccessful: true
2022-11-21 11:08:37.644 com.my.package W/Tinker.DexDiffPatchInternal: success recover dex file: /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes14.dex.jar, size: 18214, use time: 15
2022-11-21 11:08:37.645 com.my.package I/Tinker.DexDiffPatchInternal: try Extracting /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes5.dex.jar
2022-11-21 11:08:37.648 com.my.package I/Tinker.DexDiffPatchInternal: isExtractionSuccessful: true
2022-11-21 11:08:37.649 com.my.package I/Tinker.DexDiffPatchInternal: try Extracting /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes4.dex.jar
2022-11-21 11:08:37.653 com.my.package I/Tinker.DexDiffPatchInternal: isExtractionSuccessful: true
2022-11-21 11:08:37.654 com.my.package I/Tinker.DexDiffPatchInternal: try Extracting /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes15.dex.jar
2022-11-21 11:08:37.658 com.my.package I/Tinker.DexDiffPatchInternal: isExtractionSuccessful: true
2022-11-21 11:08:37.659 com.my.package I/Tinker.DexDiffPatchInternal: try Extracting /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/test.dex.jar
2022-11-21 11:08:37.660 com.my.package I/Tinker.DexDiffPatchInternal: isExtractionSuccessful: true
2022-11-21 11:08:38.150 com.my.package I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes12.dex.jar
2022-11-21 11:08:38.150 com.my.package I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes13.dex.jar
2022-11-21 11:08:38.150 com.my.package I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes11.dex.jar
2022-11-21 11:08:38.150 com.my.package I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes18.dex.jar
2022-11-21 11:08:38.151 com.my.package I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes3.dex.jar
2022-11-21 11:08:38.151 com.my.package I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes2.dex.jar
2022-11-21 11:08:38.151 com.my.package I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes.dex.jar
2022-11-21 11:08:38.152 com.my.package I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes14.dex.jar
2022-11-21 11:08:38.152 com.my.package I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes6.dex.jar
2022-11-21 11:08:38.152 com.my.package I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes4.dex.jar
2022-11-21 11:08:38.153 com.my.package I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/test.dex.jar
2022-11-21 11:08:38.153 com.my.package I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes8.dex.jar
2022-11-21 11:08:38.153 com.my.package I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes5.dex.jar
2022-11-21 11:08:38.153 com.my.package I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes10.dex.jar
2022-11-21 11:08:38.153 com.my.package I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes20.dex.jar
2022-11-21 11:08:38.154 com.my.package I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes15.dex.jar
2022-11-21 11:08:38.154 com.my.package I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes19.dex.jar
2022-11-21 11:08:38.155 com.my.package I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes7.dex.jar
2022-11-21 11:08:38.155 com.my.package I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes16.dex.jar
2022-11-21 11:08:38.155 com.my.package I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes9.dex.jar
2022-11-21 11:08:38.156 com.my.package I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes22.dex.jar
2022-11-21 11:08:38.156 com.my.package I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes21.dex.jar
2022-11-21 11:08:38.156 com.my.package I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/classes17.dex.jar
2022-11-21 11:08:38.156 com.my.package I/Tinker.DexDiffPatchInternal: merge classN dex file /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/tinker_classN.apk, result: true, size: 39160685, use: 496ms
2022-11-21 11:08:38.157 com.my.package I/Tinker.DexDiffPatchInternal: legal files to do dexopt: [/data/user/0/com.my.package/tinker/patch-f3027dc2/dex/tinker_classN.apk]
2022-11-21 11:08:38.157 com.my.package D/Tinker.TinkerInternals: getCurrentInstructionSet:arm64
2022-11-21 11:08:38.158 com.my.package I/Tinker.DexDiffPatchInternal: patch recover, try to optimize dex file count:1, optimizeDexDirectory:/data/user/0/com.my.package/tinker/patch-f3027dc2/odex/
2022-11-21 11:08:38.160 com.my.package I/Tinker.DexDiffPatchInternal: start to parallel optimize dex /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/tinker_classN.apk, size: 39160685
2022-11-21 11:08:38.160 com.my.package I/Tinker.ParallelDex: Creating fake odex path structure.
2022-11-21 11:08:38.594 com.my.package I/Tinker.ParallelDex: [+] Hit target device, do dexopt logic now.
2022-11-21 11:08:38.594 com.my.package I/Tinker.ParallelDex: [+] Execute shell cmd, args: [compile, -f, --secondary-dex, -m, speed-profile, com.my.package]
2022-11-21 11:08:42.393 com.my.package I/Tinker.ParallelDex: [+] Execute shell cmd done.
2022-11-21 11:08:42.393 com.my.package I/Tinker.ParallelDex: [+] File /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/oat/arm64/tinker_classN.vdex was found.
2022-11-21 11:08:42.394 com.my.package I/Tinker.DexDiffPatchInternal: success to parallel optimize dex /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/tinker_classN.apk, opt file:/data/user/0/com.my.package/tinker/patch-f3027dc2/dex/oat/arm64/tinker_classN.odex, opt file size: 646800, use time 4234
2022-11-21 11:08:42.394 com.my.package I/Tinker.DexDiffPatchInternal: recover dex result:true, cost:9348
2022-11-21 11:08:42.395 com.my.package W/Tinker.BsDiffPatchInternal: patch recover, library is not contained
2022-11-21 11:08:42.397 com.my.package W/Tinker.ResDiffPatchInternal: patch recover, resource is not contained
2022-11-21 11:08:42.397 com.my.package I/Tinker.DexDiffPatchInternal: raw dex count: 23, dex opt dex count: 1, final wait times: 120
2022-11-21 11:08:42.401 com.my.package I/Tinker.DexDiffPatchInternal: check dex optimizer file exist: /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/oat/arm64/tinker_classN.odex, size 646800
2022-11-21 11:08:42.402 com.my.package I/Tinker.DexDiffPatchInternal: check dex optimizer file format: tinker_classN.odex, size 646800
2022-11-21 11:08:42.405 com.my.package I/Tinker.PatchInfo: rewritePatchInfoFile file path:/data/user/0/com.my.package/tinker/patch.info , oldVer:, newVer:f3027dc220a962f988e3bc8b17ce7020, isProtectedApp:0, versionToRemove:, fingerprint:HONOR/HLK-AL00/HWHLK-H:10/HONORHLK-AL00/102.0.0.270C00:user/release-keys, oatDir:odex, isRemoveInterpretOATDir:0, stack: java.lang.Throwable
at com.tencent.tinker.loader.shareutil.SharePatchInfo.rewritePatchInfoFile(SharePatchInfo.java:184)
at com.tencent.tinker.loader.shareutil.SharePatchInfo.rewritePatchInfoFileWithLock(SharePatchInfo.java:104)
at com.tencent.tinker.lib.patch.UpgradePatch.tryPatch(UpgradePatch.java:196)
at com.my.package.tinker.my.MyUpgradePatch.tryPatch(MyUpgradePatch.kt:24)
at com.tencent.tinker.lib.service.TinkerPatchService.doApplyPatch(TinkerPatchService.java:223)
at com.tencent.tinker.lib.service.TinkerPatchService.onHandleIntent(TinkerPatchService.java:101)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:78)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:219)
at android.os.HandlerThread.run(HandlerThread.java:67)
2022-11-21 11:08:42.406 com.my.package I/Tinker.UpgradePatchRetry: onPatchResetMaxCheck, reset max check to 1
2022-11-21 11:08:42.407 com.my.package W/Tinker.UpgradePatch: UpgradePatch tryPatch: done, it is ok
2022-11-21 11:08:42.407 com.my.package I/Tinker.My: MyPatchReporter onPatchResult true, /storage/emulated/0/Android/data/com.my.package/files/tinker/app-debug-patch_signed.apk
2022-11-21 11:08:42.407 com.my.package I/Tinker.DefaultPatchReporter: patchReporter onPatchResult: patch all result path: /storage/emulated/0/Android/data/com.my.package/files/tinker/app-debug-patch_signed.apk, success: true, cost: 9426
2022-11-21 11:08:42.407 com.my.package I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/user/0/com.my.package/tinker_temp/temp.apk
2022-11-21 11:08:42.425 com.my.package V/Tinker.SampleResultService: SampleResultService receive result:
PatchResult:
isSuccess:true
rawPatchFilePath:/storage/emulated/0/Android/data/com.my.package/files/tinker/app-debug-patch_signed.apk
costTime:9426
dexoptTriggerTime:1669000118158
isOatGenerated:true
patchVersion:f3027dc220a962f988e3bc8b17ce7020
2022-11-21 11:08:42.427 com.my.package W/Tinker.DefaultTinkerResultService: deleteRawPatchFile rawFile path: /storage/emulated/0/Android/data/com.my.package/files/tinker/app-debug-patch_signed.apk
2022-11-21 11:08:42.427 com.my.package I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /storage/emulated/0/Android/data/com.my.package/files/tinker/app-debug-patch_signed.apk
2022-11-21 11:08:42.427 com.my.package V/Tinker.SampleResultService: tinker wait screen to restart process
重启后日志:
2022-11-21 11:12:02.438 com.my.package D/Tinker.TinkerLoader: tryLoad test test
2022-11-21 11:12:02.470 com.my.package D/Tinker.TinkerInternals: getCurrentInstructionSet:arm64
2022-11-21 11:12:02.470 com.my.package W/Tinker.TinkerLoader: tryLoadPatchFiles:isEnabledForResource:true
2022-11-21 11:12:02.471 com.my.package D/Tinker.TinkerInternals: same fingerprint:HONOR/HLK-AL00/HWHLK-H:10/HONORHLK-AL00/102.0.0.270C00:user/release-keys
2022-11-21 11:12:02.471 com.my.package W/Tinker.TinkerInternals: getSafeModeCount: recFileName:safemode_count_rec_com.my.package failed, return 0 instead.
2022-11-21 11:12:02.472 com.my.package I/Tinker.TinkerInternals: setSafeModeCount: count: 1
2022-11-21 11:12:02.472 com.my.package I/Tinker.TinkerDexLoader: classloader: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.my.package-47CW_Wv7r7KMm2hdXtXPsA==/base.apk"],nativeLibraryDirectories=[/data/app/com.my.package-47CW_Wv7r7KMm2hdXtXPsA==/lib/arm64, /data/app/com.my.package-47CW_Wv7r7KMm2hdXtXPsA==/base.apk!/lib/arm64-v8a, /system/lib64, /hw_product/lib64, /system/product/lib64]]]
2022-11-21 11:12:02.473 com.my.package I/Tinker.TinkerDexLoader: verify dex file:/data/user/0/com.my.package/tinker/patch-f3027dc2/dex/tinker_classN.apk md5, use time: 0
2022-11-21 11:12:02.473 com.my.package I/Tinker.ClassLoaderAdder: installDexes dexOptDir: /data/user/0/com.my.package/tinker/patch-f3027dc2/odex, dex size:1
2022-11-21 11:12:02.483 com.my.package I/Tinker.ClassLoaderAdder: after loaded classloader: dalvik.system.DelegateLastClassLoader[DexPathList[[zip file "/data/user/0/com.my.package/tinker/patch-f3027dc2/dex/tinker_classN.apk"],nativeLibraryDirectories=[/data/app/com.my.package-47CW_Wv7r7KMm2hdXtXPsA==/lib/arm64, /data/app/com.my.package-47CW_Wv7r7KMm2hdXtXPsA==/base.apk!/lib/arm64-v8a, /system/lib64, /hw_product/lib64, /system/product/lib64]]], dex size:1
2022-11-21 11:12:02.488 com.my.package I/Tinker.ClassLoaderAdder: checkDexInstall result: false, checker_classloader: dalvik.system.DelegateLastClassLoader[DexPathList[[zip file "/data/user/0/com.my.package/tinker/patch-f3027dc2/dex/tinker_classN.apk"],nativeLibraryDirectories=[/data/app/com.my.package-47CW_Wv7r7KMm2hdXtXPsA==/lib/arm64, /data/app/com.my.package-47CW_Wv7r7KMm2hdXtXPsA==/base.apk!/lib/arm64-v8a, /system/lib64, /hw_product/lib64, /system/product/lib64]]]
2022-11-21 11:12:02.488 com.my.package E/Tinker.TinkerDexLoader: install dexes failed
2022-11-21 11:12:02.488 com.my.package W/Tinker.TinkerLoader: tryLoadPatchFiles:onPatchLoadDexesFail
2022-11-21 11:12:02.494 com.my.package D/Tinker.DefaultAppLike: onBaseContextAttached:
2022-11-21 11:12:02.514 com.my.package W/Tinker.Tinker: tinker patch directory: /data/user/0/com.my.package/tinker
2022-11-21 11:12:02.514 com.my.package I/Tinker.Tinker: try to install tinker, isEnable: true, version: 1.9.14.25
2022-11-21 11:12:02.515 com.my.package I/Tinker.TinkerLoadResult: parseTinkerResult loadCode:-14, process name:com.my.package, main process:true, systemOTA:false, fingerPrint:HONOR/HLK-AL00/HWHLK-H:10/HONORHLK-AL00/102.0.0.270C00:user/release-keys, oatDir:odex, useInterpretMode:false
2022-11-21 11:12:02.515 com.my.package I/Tinker.TinkerLoadResult: parseTinkerResult oldVersion:, newVersion:f3027dc220a962f988e3bc8b17ce7020, current:f3027dc220a962f988e3bc8b17ce7020
2022-11-21 11:12:02.516 com.my.package I/Tinker.TinkerLoadResult: Tinker load have exception loadCode:-14
2022-11-21 11:12:02.516 com.my.package I/Tinker.My: MyLoadReporter onLoadException -2, com.tencent.tinker.loader.TinkerRuntimeException: Tinker Exception:checkDexInstall failed
2022-11-21 11:12:02.516 com.my.package E/Tinker.DefaultLoadReporter: patch loadReporter onLoadException: tinker dex check fail:Tinker Exception:checkDexInstall failed
2022-11-21 11:12:02.523 com.my.package I/Tinker.DefaultLoadReporter: dex exception disable tinker forever with sp
2022-11-21 11:12:02.523 com.my.package E/Tinker.DefaultLoadReporter: tinker load exception, welcome to submit issue to us: https://github.com/Tencent/tinker/issues
2022-11-21 11:12:02.524 com.my.package E/Tinker.DefaultLoadReporter: tinker load exception com.tencent.tinker.loader.TinkerRuntimeException: Tinker Exception:checkDexInstall failed
at com.tencent.tinker.loader.SystemClassLoaderAdder.installDexes(SystemClassLoaderAdder.java:73)
at com.tencent.tinker.loader.TinkerDexLoader.loadTinkerJars(TinkerDexLoader.java:191)
at com.tencent.tinker.loader.TinkerLoader.tryLoadPatchFilesInternal(TinkerLoader.java:346)
at com.tencent.tinker.loader.TinkerLoader.tryLoad(TinkerLoader.java:57)
at com.my.package.tinker.my.MyTinkerLoader.tryLoad(MyTinkerLoader.kt:20)
at java.lang.reflect.Method.invoke(Native Method)
at com.tencent.tinker.loader.app.TinkerApplication.loadTinker(TinkerApplication.java:125)
at com.tencent.tinker.loader.app.TinkerApplication.onBaseContextAttached(TinkerApplication.java:163)
at com.my.package.TinkerApp.onBaseContextAttached(TinkerApp.kt:26)
at com.tencent.tinker.loader.app.TinkerApplication.attachBaseContext(TinkerApplication.java:186)
at android.app.Application.attach(Application.java:358)
at android.app.Instrumentation.newApplication(Instrumentation.java:1168)
at android.app.LoadedApk.makeApplication(LoadedApk.java:1451)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7554)
at android.app.ActivityThread.access$2600(ActivityThread.java:260)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2435)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:219)
at android.app.ActivityThread.main(ActivityThread.java:8668)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1109)
2022-11-21 11:12:02.524 com.my.package I/Tinker.My: MyLoadReporter checkAndCleanPatch
2022-11-21 11:12:02.525 com.my.package I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/user/0/com.my.package/tinker/patch-f3027dc2/patch-f3027dc2.apk
2022-11-21 11:12:02.525 com.my.package I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/oat/arm64/tinker_classN.odex
2022-11-21 11:12:02.525 com.my.package I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/oat/arm64/tinker_classN.vdex
2022-11-21 11:12:02.526 com.my.package I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/oat/arm64
2022-11-21 11:12:02.526 com.my.package I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/oat/tinker_classN.apk.cur.prof
2022-11-21 11:12:02.526 com.my.package I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/oat/tinker_classN.apk.prof
2022-11-21 11:12:02.526 com.my.package I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/oat
2022-11-21 11:12:02.527 com.my.package I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/user/0/com.my.package/tinker/patch-f3027dc2/dex/tinker_classN.apk
2022-11-21 11:12:02.527 com.my.package I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/user/0/com.my.package/tinker/patch-f3027dc2/dex
2022-11-21 11:12:02.527 com.my.package I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/user/0/com.my.package/tinker/patch-f3027dc2/odex
2022-11-21 11:12:02.527 com.my.package I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/user/0/com.my.package/tinker/patch-f3027dc2
2022-11-21 11:12:02.529 com.my.package I/Tinker.PatchInfo: rewritePatchInfoFile file path:/data/user/0/com.my.package/tinker/patch.info , oldVer:, newVer:, isProtectedApp:0, versionToRemove:, fingerprint:HONOR/HLK-AL00/HWHLK-H:10/HONORHLK-AL00/102.0.0.270C00:user/release-keys, oatDir:odex, isRemoveInterpretOATDir:0, stack: java.lang.Throwable
at com.tencent.tinker.loader.shareutil.SharePatchInfo.rewritePatchInfoFile(SharePatchInfo.java:184)
at com.tencent.tinker.loader.shareutil.SharePatchInfo.rewritePatchInfoFileWithLock(SharePatchInfo.java:104)
at com.tencent.tinker.loader.shareutil.ShareTinkerInternals.cleanPatch(ShareTinkerInternals.java:745)
at com.tencent.tinker.lib.tinker.Tinker.cleanPatch(Tinker.java:258)
at com.tencent.tinker.lib.reporter.DefaultLoadReporter.checkAndCleanPatch(DefaultLoadReporter.java:307)
at com.my.package.tinker.my.MyLoadReporter.checkAndCleanPatch(MyLoadReporter.kt:96)
at com.tencent.tinker.lib.reporter.DefaultLoadReporter.onLoadException(DefaultLoadReporter.java:280)
at com.my.package.tinker.my.MyLoadReporter.onLoadException(MyLoadReporter.kt:52)
at com.tencent.tinker.lib.tinker.TinkerLoadResult.parseTinkerResult(TinkerLoadResult.java:142)
at com.tencent.tinker.lib.tinker.Tinker.install(Tinker.java:152)
at com.tencent.tinker.lib.tinker.TinkerInstaller.install(TinkerInstaller.java:71)
at com.my.package.tinker.TinkerManager.installTinker(TinkerManager.java:119)
at com.my.package.IllusionApp.onBaseContextAttached(IllusionApp.kt:92)
at com.tencent.tinker.entry.TinkerApplicationInlineFence.handleMessageImpl(TinkerApplicationInlineFence.java:72)
at com.tencent.tinker.entry.TinkerApplicationInlineFence.handleMessage_$noinline$(TinkerApplicationInlineFence.java:60)
at com.tencent.tinker.entry.TinkerApplicationInlineFence.handleMessage(TinkerApplicationInlineFence.java:53)
at com.tencent.tinker.loader.app.TinkerInlineFenceAction.callOnBaseContextAttached(TinkerInlineFenceAction.java:47)
at com.tencent.tinker.loader.app.TinkerApplication.onBaseContextAttached(TinkerApplication.java:168)
at com.my.package.TinkerApp.onBaseContextAttached(TinkerApp.kt:26)
at com.tencent.tinker.loader.app.TinkerApplication.attachBaseContext(TinkerApplication.java:186)
at android.app.Application.attach(Application.java:358)
at android.app.Instrumentation.newApplication(Instrumentation.java:1168)
at android.app.LoadedApk.makeApplication(LoadedApk.java:1451)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7554)
at android.app.ActivityThread.access$2600(ActivityThread.java:260)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2435)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:219)
at android.app.ActivityThread.main(ActivityThread.java:8668)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1109)
2022-11-21 11:12:02.534 com.my.package W/Tinker.PatchInfo: path info file corrupted:/data/user/0/com.my.package/tinker/patch.info
2022-11-21 11:12:02.536 com.my.package W/Tinker.PatchInfo: path info file corrupted:/data/user/0/com.my.package/tinker/patch.info
2022-11-21 11:12:02.538 com.my.package I/Tinker.My: MyLoadReporter onLoadResult -14
2022-11-21 11:12:02.539 com.my.package I/Tinker.DefaultLoadReporter: patch loadReporter onLoadResult: patch load result, path:/data/user/0/com.my.package/tinker, code: -14, cost: 50ms
2022-11-21 11:12:02.539 com.my.package W/Tinker.Tinker: tinker load fail!
2022-11-21 11:12:02.539 com.my.package I/Tinker.TinkerInternals: setSafeModeCount: count: 0
2022-11-21 11:12:02.582 ? D/Tinker.DefaultAppLike: onCreate