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

vivo 补丁失败 #306

Closed small-tree closed 7 years ago

small-tree commented 7 years ago

01-05 16:57:14.197 18335-18335/? I/Tinker.ServerClient: checkPatchCrashTime, reset patch version 0, crash 0 to 0 01-05 16:57:14.214 18335-18335/? W/Tinker.UrlConnectionFetcher: loadData from url: http://q.tinkerpatch.com/546a817b0034c3c1/4.5.8?d=eab0f8d2-a551-4223-8798-f56418ba11db&v=1483606634212, method:GET, body:null 01-05 16:57:14.638 18335-18606/? D/Tinker.UrlConnectionFetcher: response code 200 msg: OK 01-05 16:57:14.638 18335-18606/? E/Tinker.ClientImpl: tinker server sync respond:{"v":17} 01-05 16:57:14.639 18335-18606/? I/Tinker.ClientImpl: sync response in update:version:17 grayValue:null conditions: pause:false rollback:false 01-05 16:57:14.639 18335-18606/? I/Tinker.VersionInfo: VersionCheck: patchVersion from 0 to 17 01-05 16:57:14.639 18335-18606/? I/Tinker.VersionInfo: GrayGroupCheck: true, gray value:null and my gray value is 2 01-05 16:57:14.640 18335-18606/? W/Tinker.UrlConnectionFetcher: loadData from url: http://q.tinkerpatch.com/546a817b0034c3c1/4.5.8/file17?d=eab0f8d2-a551-4223-8798-f56418ba11db&v=1483606634639, method:GET, body:null 01-05 16:57:14.838 18335-18606/? D/Tinker.UrlConnectionFetcher: response code 200 msg: OK 01-05 16:57:14.839 18335-18606/? W/Tinker.PatchRequestCallback: TinkerPatchRequestCallback: onPatchUpgrade, file:/data/data/com.minxindai/tinker_server/4.5.8_17.apk, newVersion:17, currentVersion:0 01-05 16:57:14.934 18335-18606/? I/Tinker.ServerClient: tinker server report patch download success, patchVersion:17 01-05 16:57:14.935 18335-18606/? W/Tinker.UrlConnectionFetcher: loadData from url: http://stat.tinkerpatch.com/succ.php, method:POST, body:t=1&pv=17&av=4.5.8&k=546a817b0034c3c1 01-05 16:57:14.936 18335-18606/? I/Tinker.VersionInfo: updateVersionInfo file path:/data/data/com.minxindai/tinker_server/version.info, appVersion: 4.5.8, uuid:eab0f8d2-a551-4223-8798-f56418ba11db, abi:armeabi, patchVersion:17, patchMd5:0007bfdb502d191b8a7a6046e1456807, grayValue:2, crashTimes:0, retryTimes:0 01-05 16:57:14.938 18335-18606/? I/Tinker.TinkerServerPatchListener: receive a patch file: /data/data/com.minxindai/tinker_server/4.5.8_17.apk, file size:4322 01-05 16:57:15.105 18335-18606/? W/Tinker.UpgradePatchRetry: onPatchListenerCheck retry file is not exist, just return 01-05 16:57:15.112 772-1637/? D/ActivityManager: app: com.minxindai:patch, app uid: 10183, user 0, intent ComponentInfo{com.minxindai/com.tencent.tinker.lib.service.TinkerPatchService}, calling uid 10183, mCallerApp ProcessRecord{25f8e282 18335:com.minxindai/u0a183} 01-05 16:57:15.136 772-1637/? I/ActivityManager: Start proc com.minxindai:patch for service com.minxindai/com.tencent.tinker.lib.service.TinkerPatchService: pid=18614 uid=10183 gids={50183, 9997, 1028, 1015, 3003} abi=armeabi 01-05 16:57:15.207 18614-18614/? W/Tinker.TinkerLoader: tryLoadPatchFiles:patch dir not exist:/data/data/com.minxindai/tinker 01-05 16:57:15.246 18614-18614/? D/Tinker.DefaultAppLike: onBaseContextAttached: 01-05 16:57:15.254 18614-18614/? I/Tinker.ServerUtils: with app key from manifest appKey:546a817b0034c3c1 01-05 16:57:15.254 18614-18614/? I/Tinker.ServerUtils: with app version from manifest appVersion:4.5.8 01-05 16:57:15.258 18614-18614/? I/Tinker.VersionInfo: readVersionInfo file path:/data/data/com.minxindai/tinker_server/version.info, appVersion: 4.5.8, uuid:eab0f8d2-a551-4223-8798-f56418ba11db, abi:armeabi, patchVersion:17, patchMd5:0007bfdb502d191b8a7a6046e1456807, grayValue:2, crashTimes:0, retryTimes:0 01-05 16:57:15.267 18614-18614/? W/Tinker.Debugger: debugger not attached cu == null 01-05 16:57:15.267 18614-18614/? W/Tinker.ServerClient: installTinkerServer, debug value: false, appVersion: 4.5.8, appKey: 546a817b0034c3c1 01-05 16:57:15.273 18614-18614/? W/Tinker.Tinker: tinker patch directory: /data/data/com.minxindai/tinker 01-05 16:57:15.275 18614-18614/? I/Tinker.TinkerLoadResult: parseTinkerResult loadCode:-2 01-05 16:57:15.275 18614-18614/? W/Tinker.TinkerLoadResult: can't find patch file, is ok, just return 01-05 16:57:15.275 18614-18614/? I/Tinker.DefaultLoadReporter: patch loadReporter onLoadResult: patch load result, path:/data/data/com.minxindai/tinker, code:-2, cost:2 01-05 16:57:15.276 18614-18614/? W/Tinker.Tinker: tinker load fail! 01-05 16:57:15.278 18614-18614/? D/Tinker.DefaultAppLike: onCreate 01-05 16:57:15.279 18614-18614/? D/ActivityThread: SVC-Creating service: CreateServiceData{token=android.os.BinderProxy@ed7ddd4 className=com.tencent.tinker.lib.service.TinkerPatchService packageName=com.minxindai intent=null} 01-05 16:57:15.280 18614-18614/? D/ActivityThread: SVC-CREATE_SERVICE handled : 0 / CreateServiceData{token=android.os.BinderProxy@ed7ddd4 className=com.tencent.tinker.lib.service.TinkerPatchService packageName=com.minxindai intent=null} 01-05 16:57:15.280 18614-18614/? D/ActivityThread: SVC-Calling onStartCommand: com.tencent.tinker.lib.service.TinkerPatchService@3d783b7d, flags=0, startId=1 01-05 16:57:15.281 18614-18614/? D/ActivityThread: SVC-SERVICE_ARGS handled : 0 / ServiceArgsData{token=android.os.BinderProxy@ed7ddd4 startId=1 args=Intent { cmp=com.minxindai/com.tencent.tinker.lib.service.TinkerPatchService (has extras) }} 01-05 16:57:15.282 18614-18638/? I/Tinker.DefaultPatchReporter: patchReporter onPatchServiceStart: patch service start 01-05 16:57:15.284 18614-18638/? W/Tinker.UpgradePatchRetry: try copy file: /data/data/com.minxindai/tinker_server/4.5.8_17.apk to /data/data/com.minxindai/tinker_temp/temp.apk 01-05 16:57:15.284 18614-18614/? W/Tinker.UpgradePatchRetry: onPatchRetryLoad retry is not main process, just return 01-05 16:57:15.287 18614-18638/? I/Tinker.TinkerPatchService: try to increase patch process priority 01-05 16:57:15.294 18614-18614/? D/ActivityThread: SVC-Creating service: CreateServiceData{token=android.os.BinderProxy@dff9a72 className=com.tencent.tinker.lib.service.TinkerPatchService$InnerService packageName=com.minxindai intent=null} 01-05 16:57:15.297 18614-18614/? D/ActivityThread: SVC-CREATE_SERVICE handled : 0 / CreateServiceData{token=android.os.BinderProxy@dff9a72 className=com.tencent.tinker.lib.service.TinkerPatchService$InnerService packageName=com.minxindai intent=null} 01-05 16:57:15.297 18614-18614/? D/ActivityThread: SVC-Calling onStartCommand: com.tencent.tinker.lib.service.TinkerPatchService$InnerService@3d0faec3, flags=0, startId=1 01-05 16:57:15.297 18614-18614/? D/ActivityThread: SVC-SERVICE_ARGS handled : 0 / ServiceArgsData{token=android.os.BinderProxy@dff9a72 startId=1 args=Intent { cmp=com.minxindai/com.tencent.tinker.lib.service.TinkerPatchService$InnerService }} 01-05 16:57:15.297 18614-18614/? D/ActivityThread: SVC-Destroying service: com.tencent.tinker.lib.service.TinkerPatchService$InnerService@3d0faec3 01-05 16:57:15.330 18614-18638/? I/Tinker.UpgradePatch: UpgradePatch tryPatch:patchMd5:0007bfdb502d191b8a7a6046e1456807 01-05 16:57:15.331 18614-18638/? I/Tinker.UpgradePatch: UpgradePatch tryPatch:patchVersionDirectory:/data/data/com.minxindai/tinker/patch-0007bfdb 01-05 16:57:15.333 18614-18638/? W/Tinker.UpgradePatch: UpgradePatch after /data/data/com.minxindai/tinker_server/4.5.8_17.apk size:4322, /data/data/com.minxindai/tinker/patch-0007bfdb/patch-0007bfdb.apk size:4322 01-05 16:57:17.853 18335-18606/? D/Tinker.UrlConnectionFetcher: response code 200 msg: OK 01-05 16:57:17.853 18335-18606/? D/Tinker.ClientImpl: reportSuccess successfully:{"succ":1} 01-05 16:57:21.667 18614-18638/? W/Tinker.DexDiffPatchInternal: success recover dex file: /data/data/com.minxindai/tinker/patch-0007bfdb/dex/classes.dex.jar, use time: 6301 01-05 16:57:21.668 18614-18638/? I/Tinker.DexDiffPatchInternal: try Extracting /data/data/com.minxindai/tinker/patch-0007bfdb/dex/classes2.dex.jar 01-05 16:57:22.133 18614-18638/? I/Tinker.DexDiffPatchInternal: isExtractionSuccessful: true 01-05 16:57:22.162 18614-18638/? I/Tinker.DexDiffPatchInternal: try Extracting /data/data/com.minxindai/tinker/patch-0007bfdb/dex/test.dex.jar 01-05 16:57:22.164 18614-18638/? I/Tinker.DexDiffPatchInternal: isExtractionSuccessful: true 01-05 16:57:22.165 18614-18638/? W/Tinker.DexDiffPatchInternal: patch recover, try to optimize dex file count:3 01-05 16:57:22.167 18614-18650/? I/Tinker.DexDiffPatchInternal: start to optimize dex /data/data/com.minxindai/tinker/patch-0007bfdb/dex/classes.dex.jar 01-05 16:57:22.167 18614-18651/? I/Tinker.DexDiffPatchInternal: start to optimize dex /data/data/com.minxindai/tinker/patch-0007bfdb/dex/classes2.dex.jar 01-05 16:57:22.169 18614-18652/? I/Tinker.DexDiffPatchInternal: start to optimize dex /data/data/com.minxindai/tinker/patch-0007bfdb/dex/test.dex.jar 01-05 16:57:22.281 18614-18652/? I/Tinker.DexDiffPatchInternal: success to optimize dex /data/data/com.minxindai/tinker/patch-0007bfdb/dex/test.dex.jar use time 112 01-05 16:57:22.392 18614-18651/? I/Tinker.DexDiffPatchInternal: success to optimize dex /data/data/com.minxindai/tinker/patch-0007bfdb/dex/classes2.dex.jar use time 223 01-05 16:57:22.743 18614-18650/? I/Tinker.DexDiffPatchInternal: success to optimize dex /data/data/com.minxindai/tinker/patch-0007bfdb/dex/classes.dex.jar use time 574 01-05 16:57:22.744 18614-18638/? I/Tinker.ParallelDex: All dexes are optimized successfully, cost: 578 ms. 01-05 16:57:22.746 18614-18638/? E/Tinker.DexDiffPatchInternal: parallel dex optimizer file /data/data/com.minxindai/tinker/patch-0007bfdb/odex/classes.dex.dex fail, optimize again 01-05 16:57:23.296 18614-18638/? I/Tinker.DexDiffPatchInternal: success single dex optimize file, path: /data/data/com.minxindai/tinker/patch-0007bfdb/dex/classes.dex.jar, use time: 550 01-05 16:57:23.297 18614-18638/? I/Tinker.DefaultPatchReporter: patchReporter onPatchDexOptFail: dex opt fail path:/data/data/com.minxindai/tinker/patch-0007bfdb/patch-0007bfdb.apk, dexPath:/data/data/com.minxindai/tinker/patch-0007bfdb/dex/classes.dex.jar, optDir:/data/data/com.minxindai/tinker/patch-0007bfdb/odex/, dexName:classes.dex.jar 01-05 16:57:23.297 18614-18638/? E/Tinker.DefaultPatchReporter: onPatchDexOptFail: com.tencent.tinker.loader.TinkerRuntimeException: Tinker Exception:dexOpt file:/data/data/com.minxindai/tinker/patch-0007bfdb/odex/classes.dex.dex is not exist at com.tencent.tinker.lib.b.d.a(SourceFile:142) at com.tencent.tinker.lib.b.d.a(SourceFile:68) at com.tencent.tinker.lib.b.f.a(SourceFile:128) at com.tencent.tinker.lib.service.TinkerPatchService.onHandleIntent(SourceFile:129) at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65) at android.os.Handler.dispatchMessage(Handler.java:111) at android.os.Looper.loop(Looper.java:194) at android.os.HandlerThread.run(HandlerThread.java:61) 01-05 16:57:23.298 18614-18638/? I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/data/com.minxindai/tinker/patch-0007bfdb/patch-0007bfdb.apk 01-05 16:57:23.299 18614-18638/? I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/data/com.minxindai/tinker/patch-0007bfdb/dex/classes.dex.jar 01-05 16:57:23.302 18614-18638/? I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/data/com.minxindai/tinker/patch-0007bfdb/dex/classes2.dex.jar 01-05 16:57:23.302 18614-18638/? I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/data/com.minxindai/tinker/patch-0007bfdb/dex/test.dex.jar 01-05 16:57:23.303 18614-18638/? I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/data/com.minxindai/tinker/patch-0007bfdb/dex 01-05 16:57:23.303 18614-18638/? I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/data/com.minxindai/tinker/patch-0007bfdb/odex/classes.dex.dex 01-05 16:57:23.304 18614-18638/? I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/data/com.minxindai/tinker/patch-0007bfdb/odex/test.dex.dex 01-05 16:57:23.304 18614-18638/? I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/data/com.minxindai/tinker/patch-0007bfdb/odex 01-05 16:57:23.304 18614-18638/? I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/data/com.minxindai/tinker/patch-0007bfdb 01-05 16:57:23.304 18614-18638/? I/Tinker.DexDiffPatchInternal: recover dex result:false, cost:7970 01-05 16:57:23.304 18614-18638/? E/Tinker.UpgradePatch: UpgradePatch tryPatch:new patch recover, try patch dex failed 01-05 16:57:23.305 18614-18638/? I/Tinker.DefaultPatchReporter: patchReporter onPatchResult: patch all result path:/data/data/com.minxindai/tinker_server/4.5.8_17.apk, success:false, cost:8018 01-05 16:57:23.305 18614-18638/? I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/data/com.minxindai/tinker_temp/temp.apk 01-05 16:57:23.313 18335-18335/? D/ActivityThread: SVC-Creating service: CreateServiceData{token=android.os.BinderProxy@341dafbb className=com.tinkerpatch.sdk.tinker.service.TinkerServerResultService packageName=com.minxindai intent=null} 01-05 16:57:23.314 18335-18335/? D/ActivityThread: SVC-CREATE_SERVICE handled : 0 / CreateServiceData{token=android.os.BinderProxy@341dafbb className=com.tinkerpatch.sdk.tinker.service.TinkerServerResultService packageName=com.minxindai intent=null} 01-05 16:57:23.314 18335-18335/? D/ActivityThread: SVC-Calling onStartCommand: com.tinkerpatch.sdk.tinker.service.TinkerServerResultService@21d0fcd8, flags=0, startId=1 01-05 16:57:23.314 18335-18335/? D/ActivityThread: SVC-SERVICE_ARGS handled : 0 / ServiceArgsData{token=android.os.BinderProxy@341dafbb startId=1 args=Intent { cmp=com.minxindai/com.tinkerpatch.sdk.tinker.service.TinkerServerResultService (has extras) }} 01-05 16:57:23.316 18614-18614/? D/ActivityThread: SVC-Destroying service: com.tencent.tinker.lib.service.TinkerPatchService@3d783b7d 01-05 16:57:23.318 18335-18674/? I/Tinker.TinkerServerResultService: receive result: PatchResult: isSuccess:false rawPatchFilePath:/data/data/com.minxindai/tinker_server/4.5.8_17.apk costTime:8018 patchVersion:0007bfdb502d191b8a7a6046e1456807 01-05 16:57:23.319 18335-18674/? I/Tinker.ServerClient: tinker server report patch fail, patchVersion:17, errorCode:-2 01-05 16:57:23.319 18335-18674/? W/Tinker.UrlConnectionFetcher: loadData from url: http://stat.tinkerpatch.com/err.php, method:POST, body:t=1&code=-2&pv=17&av=4.5.8&k=546a817b0034c3c1 01-05 16:57:23.320 18335-18674/? I/Tinker.TinkerServerResultService: patch fail, please check reason 01-05 16:57:23.321 18335-18335/? D/ActivityThread: SVC-Destroying service: com.tinkerpatch.sdk.tinker.service.TinkerServerResultService@21d0fcd8 01-05 16:57:23.374 18335-18606/? D/Tinker.UrlConnectionFetcher: response code 200 msg: OK 01-05 16:57:23.376 18335-18606/? D/Tinker.ClientImpl: reportFail successfully:{"succ":1}

shwenzhang commented 7 years ago

这个是vivo修改dex2oat解释执行导致,将在1.7.7版本修复

small-tree commented 7 years ago

1.7.5 好像没有问题,用tinkerpatch1.0.1集成就出现个问题了。是1.7.6 bug么

shwenzhang commented 7 years ago

也不能说是bug,只是能支持的不太好把

balizhuang2012 commented 7 years ago

我的vivo X6S A,安卓5.1.1,加载补丁成功,但inflate一个webview时出现崩溃,不知道是否和VivoResources类需要适配有关。堆栈太长,只贴关键的: 01-07 16:46:14.206 E/AndroidRuntime(20858): Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x2040003 01-07 16:46:14.206 E/AndroidRuntime(20858): at android.content.res.Resources.getText(Resources.java:318) 01-07 16:46:14.206 E/AndroidRuntime(20858): at android.content.res.VivoResources.getText(VivoResources.java:113) 01-07 16:46:14.206 E/AndroidRuntime(20858): at android.content.res.Resources.getString(Resources.java:404) 01-07 16:46:14.206 E/AndroidRuntime(20858): at com.android.org.chromium.content.browser.ContentViewCore.setContainerView(ContentViewCore.java:694) 01-07 16:46:14.206 E/AndroidRuntime(20858): at com.android.org.chromium.content.browser.ContentViewCore.initialize(ContentViewCore.java:618) 01-07 16:46:14.206 E/AndroidRuntime(20858): at com.android.org.chromium.android_webview.AwContents.createAndInitializeContentViewCore(AwContents.java:631) 01-07 16:46:14.206 E/AndroidRuntime(20858): at com.android.org.chromium.android_webview.AwContents.setNewAwContents(AwContents.java:780) 01-07 16:46:14.206 E/AndroidRuntime(20858): at com.android.org.chromium.android_webview.AwContents.(AwContents.java:619)

01-07 16:46:14.206 E/AndroidRuntime(20858): at com.android.org.chromium.android_webview.AwContents.(AwContents.java:556)

01-07 16:46:14.206 E/AndroidRuntime(20858): at com.android.webview.chromium.WebViewChromium.initForReal(WebViewChromium.java:312)

01-07 16:46:14.206 E/AndroidRuntime(20858): at com.android.webview.chromium.WebViewChromium.access$100(WebViewChromium.java:96)

01-07 16:46:14.206 E/AndroidRuntime(20858): at com.android.webview.chromium.WebViewChromium$1.run(WebViewChromium.java:264)

01-07 16:46:14.206 E/AndroidRuntime(20858): at com.android.webview.chromium.WebViewChromium$WebViewChromiumRunQue

shwenzhang commented 7 years ago

tinker版本是?

balizhuang2012 commented 7 years ago

我的是1.7.5

balizhuang2012 commented 7 years ago

是个别资源(即使该资源没被修改)才有问题(但必现),大部分资源是ok的。我没有观察出有问题的资源有何特征

shwenzhang commented 7 years ago

try with dev