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

Bugly第二次补丁修复无效果 #1663

Open shiduan opened 2 years ago

shiduan commented 2 years ago

步骤: 第一次补丁:方法内添加一个Toast,补丁激活且生效 第二次补丁:修改Toast内容,补丁激活状态,但是实际上没有效果 project gradle:
classpath 'com.android.tools.build:gradle:4.1.3' classpath 'com.tencent.bugly:tinker-support:latest.release'

app gradle: implementation 'com.tencent.bugly:crashreport_upgrade:1.3.6' // 指定tinker依赖版本(注:应用升级1.3.5版本起,不再内置tinker) implementation 'com.tencent.tinker:tinker-android-lib:1.9.14.15' implementation 'com.tencent.bugly:nativecrashreport:latest.release'

tinker-support-gradle: //自动生成tinkerId autoGenerateTinkerId = true

是否使用热更新SDK: Bugly SDK

堆栈/日志: 2022-06-28 14:25:49.508 4675-4675/? D/Tinker.TinkerLoader: tryLoad test test 2022-06-28 14:25:49.516 4675-4675/? I/Tinker.TinkerInternals: class not found exception 2022-06-28 14:25:49.516 4675-4675/? D/Tinker.TinkerInternals: getCurrentInstructionSet:arm64 2022-06-28 14:25:49.516 4675-4675/? W/Tinker.TinkerLoader: tryLoadPatchFiles:isEnabledForResource:true 2022-06-28 14:25:49.516 4675-4675/? D/Tinker.TinkerInternals: same fingerprint:realme/RMX2202/RMX2202CN:12/SKQ1.210216.001/R.202204192204:user/release-keys 2022-06-28 14:25:49.517 4675-4675/? I/Tinker.TinkerInternals: getSafeModeCount: count: 0 2022-06-28 14:25:49.517 4675-4675/? I/Tinker.TinkerInternals: setSafeModeCount: count: 1 2022-06-28 14:25:49.517 4675-4675/? I/Tinker.TinkerDexLoader: classloader: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/cRql1aS-CgCmN_5WIFI8Gw==/com.bugly.test-a-saH611ZSrb3oX762p8BA==/base.apk"],nativeLibraryDirectories=[/data/app/cRql1aS-CgCmN_5WIFI8Gw==/com.bugly.test-a-saH611ZSrb3oX762p8BA==/lib/arm64, /data/app/~~cRql1aS-CgCmN_5WIFI8Gw==/com.bugly.test-a-saH611ZSrb3oX762p8BA==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]]] 2022-06-28 14:25:49.517 4675-4675/? I/Tinker.TinkerDexLoader: verify dex file:/data/user/0/com.bugly.test/tinker/patch-9cde11ac/dex/tinker_classN.apk md5, use time: 0 2022-06-28 14:25:49.517 4675-4675/? I/Tinker.ClassLoaderAdder: installDexes dexOptDir: /data/user/0/com.bugly.test/tinker/patch-9cde11ac/odex, dex size:1 2022-06-28 14:25:49.520 4675-4675/? I/Tinker.ClassLoaderAdder: after loaded classloader: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/user/0/com.bugly.test/tinker/patch-9cde11ac/dex/tinker_classN.apk", zip file "/data/app/cRql1aS-CgCmN_5WIFI8Gw==/com.bugly.test-a-saH611ZSrb3oX762p8BA==/base.apk"],nativeLibraryDirectories=[/data/app/cRql1aS-CgCmN_5WIFI8Gw==/com.bugly.test-a-saH611ZSrb3oX762p8BA==/lib/arm64, /data/app/~~cRql1aS-CgCmN_5WIFI8Gw==/com.bugly.test-a-saH611ZSrb3oX762p8BA==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]]], dex size:1 2022-06-28 14:25:49.520 4675-4675/? W/Tinker.ClassLoaderAdder: checkDexInstall result:true 2022-06-28 14:25:49.520 4675-4675/? I/Tinker.IncrementCompMgr: package has no incremental component meta, skip init. 2022-06-28 14:25:49.520 4675-4675/? I/Tinker.AppInfoChangedBlocker: tryStart called. 2022-06-28 14:25:49.520 4675-4675/? I/Tinker.AppInfoChangedBlocker: tryStart done. 2022-06-28 14:25:49.521 4675-4675/? I/Tinker.TinkerLoader: tryLoadPatchFiles: load end, ok! 2022-06-28 14:25:49.521 4675-4675/? D/Tinker.DefaultAppLike: onBaseContextAttached: 2022-06-28 14:25:49.521 4675-4675/? I/Tinker.TinkerInternals: setSafeModeCount: count: 0 2022-06-28 14:25:49.521 4675-4675/? I/Tinker.ReflectApp: with app realApplication from manifest applicationName:com.gree.greemall2.base.MyApplication 2022-06-28 14:25:49.522 4675-4675/? V/Tinker.TinkerPatchListener: application maxMemory:384 2022-06-28 14:25:49.523 4675-4675/? W/Tinker.Tinker: tinker patch directory: /data/user/0/com.bugly.test/tinker 2022-06-28 14:25:49.523 4675-4675/? I/Tinker.Tinker: try to install tinker, isEnable: true, version: 1.9.14.15 2022-06-28 14:25:49.523 4675-4675/? I/Tinker.TinkerLoadResult: parseTinkerResult loadCode:0, process name:com.bugly.test, main process:true, systemOTA:false, fingerPrint:realme/RMX2202/RMX2202CN:12/SKQ1.210216.001/R.202204192204:user/release-keys, oatDir:odex, useInterpretMode:false 2022-06-28 14:25:49.523 4675-4675/? I/Tinker.TinkerLoadResult: parseTinkerResult oldVersion:9cde11ac84e167edbcace9133ba9d051, newVersion:9cde11ac84e167edbcace9133ba9d051, current:9cde11ac84e167edbcace9133ba9d051 2022-06-28 14:25:49.523 4675-4675/? I/Tinker.TinkerLoadResult: oh yeah, tinker load all success 2022-06-28 14:25:49.523 4675-4675/? I/Tinker.DefaultLoadReporter: patch loadReporter onLoadResult: patch load result, path:/data/user/0/com.bugly.test/tinker, code: 0, cost: 12ms 2022-06-28 14:25:49.543 4675-4675/? E/Tinker.ReflectApp: replaceApplicationLike delegateClass:class com.tencent.bugly.beta.tinker.TinkerApplicationLike 2022-06-28 14:25:49.543 4675-4675/? D/Tinker.DefaultAppLike: onCreate 2022-06-28 14:25:49.547 4675-4675/? I/CrashReport: backup java handler: com.tencent.bugly.beta.tinker.TinkerUncaughtExceptionHandler@57ce7e8 2022-06-28 14:25:49.564 4675-4675/? I/CrashReport: TINKER_ID:V2.2.4.122_0628-09-54-51 2022-06-28 14:25:49.564 4675-4675/? I/CrashReport: NEW_TINKER_ID:V2.2.4.122_0628-09-54-51 2022-06-28 14:25:49.782 4675-4675/? D/Tinker.TinkerLoader: [PendingLog @ 2022-06-28 14:25:49.508] tryLoad test test 2022-06-28 14:25:49.782 4675-4675/? I/Tinker.TinkerInternals: [PendingLog @ 2022-06-28 14:25:49.516] class not found exception 2022-06-28 14:25:49.782 4675-4675/? D/Tinker.TinkerInternals: [PendingLog @ 2022-06-28 14:25:49.516] getCurrentInstructionSet:arm64 2022-06-28 14:25:49.782 4675-4675/? W/Tinker.TinkerLoader: [PendingLog @ 2022-06-28 14:25:49.516] tryLoadPatchFiles:isEnabledForResource:true 2022-06-28 14:25:49.782 4675-4675/? D/Tinker.TinkerInternals: [PendingLog @ 2022-06-28 14:25:49.516] same fingerprint:realme/RMX2202/RMX2202CN:12/SKQ1.210216.001/R.202204192204:user/release-keys 2022-06-28 14:25:49.782 4675-4675/? I/Tinker.TinkerInternals: [PendingLog @ 2022-06-28 14:25:49.517] getSafeModeCount: count: 0 2022-06-28 14:25:49.782 4675-4675/? I/Tinker.TinkerInternals: [PendingLog @ 2022-06-28 14:25:49.517] setSafeModeCount: count: 1 2022-06-28 14:25:49.782 4675-4675/? I/Tinker.TinkerDexLoader: [PendingLog @ 2022-06-28 14:25:49.517] classloader: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/cRql1aS-CgCmN_5WIFI8Gw==/com.bugly.test-a-saH611ZSrb3oX762p8BA==/base.apk"],nativeLibraryDirectories=[/data/app/cRql1aS-CgCmN_5WIFI8Gw==/com.bugly.test-a-saH611ZSrb3oX762p8BA==/lib/arm64, /data/app/~~cRql1aS-CgCmN_5WIFI8Gw==/com.bugly.test-a-saH611ZSrb3oX762p8BA==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]]] 2022-06-28 14:25:49.782 4675-4675/? I/Tinker.TinkerDexLoader: [PendingLog @ 2022-06-28 14:25:49.517] verify dex file:/data/user/0/com.bugly.test/tinker/patch-9cde11ac/dex/tinker_classN.apk md5, use time: 0 2022-06-28 14:25:49.782 4675-4675/? I/Tinker.ClassLoaderAdder: [PendingLog @ 2022-06-28 14:25:49.517] installDexes dexOptDir: /data/user/0/com.bugly.test/tinker/patch-9cde11ac/odex, dex size:1 2022-06-28 14:25:49.783 4675-4675/? I/Tinker.ClassLoaderAdder: [PendingLog @ 2022-06-28 14:25:49.520] after loaded classloader: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/user/0/com.bugly.test/tinker/patch-9cde11ac/dex/tinker_classN.apk", zip file "/data/app/cRql1aS-CgCmN_5WIFI8Gw==/com.bugly.test-a-saH611ZSrb3oX762p8BA==/base.apk"],nativeLibraryDirectories=[/data/app/cRql1aS-CgCmN_5WIFI8Gw==/com.bugly.test-a-saH611ZSrb3oX762p8BA==/lib/arm64, /data/app/~~cRql1aS-CgCmN_5WIFI8Gw==/com.bugly.test-a-saH611ZSrb3oX762p8BA==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]]], dex size:1 2022-06-28 14:25:49.783 4675-4675/? W/Tinker.ClassLoaderAdder: [PendingLog @ 2022-06-28 14:25:49.520] checkDexInstall result:true 2022-06-28 14:25:49.783 4675-4675/? I/Tinker.IncrementCompMgr: [PendingLog @ 2022-06-28 14:25:49.520] package has no incremental component meta, skip init. 2022-06-28 14:25:49.783 4675-4675/? I/Tinker.AppInfoChangedBlocker: [PendingLog @ 2022-06-28 14:25:49.520] tryStart called. 2022-06-28 14:25:49.783 4675-4675/? I/Tinker.AppInfoChangedBlocker: [PendingLog @ 2022-06-28 14:25:49.520] tryStart done. 2022-06-28 14:25:49.783 4675-4675/? I/Tinker.TinkerLoader: [PendingLog @ 2022-06-28 14:25:49.520] tryLoadPatchFiles: load end, ok! 2022-06-28 14:25:49.783 4675-4675/? D/Tinker.DefaultAppLike: [PendingLog @ 2022-06-28 14:25:49.521] onBaseContextAttached: 2022-06-28 14:25:49.783 4675-4675/? I/Tinker.TinkerInternals: [PendingLog @ 2022-06-28 14:25:49.521] setSafeModeCount: count: 0 2022-06-28 14:25:49.922 4675-4675/? W/Tinker.UpgradePatchRetry: onPatchRetryLoad patch file: /data/user/0/com.bugly.test/tinker_temp/temp.apk is not exist, just return 2022-06-28 14:25:52.699 4675-4728/? D/CrashReport: app version is: [V2.2.4.122], [deviceId:null|null|9772c2baafbf468e], channel: [null], base tinkerId:[V2.2.4.122_0628-09-54-51], patch tinkerId:[V2.2.4.122_0628-09-54-51], patch version:[2]

GitHubWebb commented 1 year ago

相同问题

Fomovet commented 1 year ago

同问