Skip to content

加固后打开即崩溃,提示checksum不匹配 #9

@pingia

Description

@pingia

打开即奔溃,错误信息如下:
2021-01-20 14:49:19.265 2600-2600/cn.test.component.originalproject E/AndroidRuntime: FATAL EXCEPTION: main
Process: cn.test.component.originalproject, PID: 2600
java.lang.RuntimeException: Unable to instantiate application cn.test.component.hookjartest.HookJarApplication: java.lang.ClassNotFoundException: Didn't find class "cn.test.component.hookjartest.HookJarApplication" on path: DexPathList[[zip file "/data/app/cn.test.component.originalproject-NjuiEcEdctlZiJ0-ICUhKA==/base.apk"],nativeLibraryDirectories=[/data/app/cn.test.component.originalproject-NjuiEcEdctlZiJ0-ICUhKA==/lib/x86, /system/lib, /system/product/lib, /system/vendor/lib]]
at android.app.LoadedApk.makeApplication(LoadedApk.java:1226)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6431)
at android.app.ActivityThread.access$1300(ActivityThread.java:219)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1859)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
Caused by: java.lang.ClassNotFoundException: Didn't find class "cn.test.component.hookjartest.HookJarApplication" on path: DexPathList[[zip file "/data/app/cn.test.component.originalproject-NjuiEcEdctlZiJ0-ICUhKA==/base.apk"],nativeLibraryDirectories=[/data/app/cn.test.component.originalproject-NjuiEcEdctlZiJ0-ICUhKA==/lib/x86, /system/lib, /system/product/lib, /system/vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.app.AppComponentFactory.instantiateApplication(AppComponentFactory.java:76)
at android.app.Instrumentation.newApplication(Instrumentation.java:1155)
at android.app.LoadedApk.makeApplication(LoadedApk.java:1218)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6431) 
at android.app.ActivityThread.access$1300(ActivityThread.java:219) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1859) 
at android.os.Handler.dispatchMessage(Handler.java:107) 
at android.os.Looper.loop(Looper.java:214) 
at android.app.ActivityThread.main(ActivityThread.java:7356) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) 
Suppressed: java.io.IOException: Failed to open dex files from /data/app/cn.test.component.originalproject-NjuiEcEdctlZiJ0-ICUhKA==/base.apk because: Failure to verify dex file '/data/app/cn.test.component.originalproject-NjuiEcEdctlZiJ0-ICUhKA==/base.apk': Bad checksum (ed074c76, expected 29894b7c)
at dalvik.system.DexFile.openDexFileNative(Native Method)
at dalvik.system.DexFile.openDexFile(DexFile.java:365)
at dalvik.system.DexFile.(DexFile.java:107)
at dalvik.system.DexFile.(DexFile.java:80)
at dalvik.system.DexPathList.loadDexFile(DexPathList.java:444)
at dalvik.system.DexPathList.makeDexElements(DexPathList.java:403)
at dalvik.system.DexPathList.(DexPathList.java:164)
at dalvik.system.BaseDexClassLoader.(BaseDexClassLoader.java:126)
at dalvik.system.BaseDexClassLoader.(BaseDexClassLoader.java:101)
at dalvik.system.PathClassLoader.(PathClassLoader.java:74)
at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:87)
at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:116)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:114)
at android.app.ApplicationLoaders.getClassLoaderWithSharedLibraries(ApplicationLoaders.java:60)
at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:851)
at android.app.LoadedApk.getClassLoader(LoadedApk.java:950)
at android.app.LoadedApk.getResources(LoadedApk.java:1188)
at android.app.ContextImpl.createAppContext(ContextImpl.java:2462)
at android.app.ContextImpl.createAppContext(ContextImpl.java:2454)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6343)

加粗部分提示checksum不对,但是我通过模拟器,找到baseapk后,解压dex文件,发现是吻合的。
懵逼了。
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions