android-classyshark icon indicating copy to clipboard operation
android-classyshark copied to clipboard

error loading archive

Open stevenwsg opened this issue 4 years ago • 4 comments

When i was decompiling douban.apk, I can not see Classes. ClassyShark hint "error loading archive".

stevenwsg avatar Dec 26 '19 08:12 stevenwsg

Please make sure that the APK runs on the device, as it could be some formatting issue ... In addition please copy paste ClassyShark error (you can see the error from command line activation)

borisf avatar Dec 26 '19 09:12 borisf

Please make sure that the APK runs on the device, as it could be some formatting issue ... In addition please copy paste ClassyShark error (you can see the error from command line activation)

Thank for your replay! I am sure the apk can run on the devices. This is app website :https://www.douban.com/。 I download apk in here.

This is ClassyShark error :

`Parsing assets/37CF018B.dex Error parsing Dexfile: classyshark6841995660682917133dex: C:\Users\wsg\AppData\Local\Temp\classyshark6841995660682917133dex is not an apk, dex, odex or oat file. org.jf.dexlib2.DexFileFactory$UnsupportedFileTypeException: C:\Users\wsg\AppData\Local\Temp\classyshark6841995660682917133dex is not an apk, dex, odex or oat file. at org.jf.dexlib2.DexFileFactory.loadDexFile(DexFileFactory.java:135) at com.google.classyshark.silverghost.contentreader.dex.DexlibLoader.loadDexFile(DexlibLoader.java:11) at com.google.classyshark.silverghost.methodscounter.RootBuilder.fillFromDex(RootBuilder.java:138) at com.google.classyshark.silverghost.methodscounter.RootBuilder.fillFromApk(RootBuilder.java:184) at com.google.classyshark.silverghost.methodscounter.RootBuilder.fillClassesWithMethods(RootBuilder.java:50) at com.google.classyshark.gui.panel.methodscount.MethodsCountPanel$NodeWorker.doInBackground(MethodsCountPanel.java:120) at com.google.classyshark.gui.panel.methodscount.MethodsCountPanel$NodeWorker.doInBackground(MethodsCountPanel.java:110) at javax.swing.SwingWorker$1.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at javax.swing.SwingWorker.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)

org.jf.dexlib2.DexFileFactory$UnsupportedFileTypeException: C:\Users\wsg\AppData\Local\Temp\37CF018B814426813791186223dex is not an apk, dex, odex or oat file. at org.jf.dexlib2.DexFileFactory.loadDexFile(DexFileFactory.java:135) at com.google.classyshark.silverghost.contentreader.dex.DexlibLoader.loadDexFile(DexlibLoader.java:11) at com.google.classyshark.silverghost.contentreader.dex.DexReader.readClassNamesFromDex(DexReader.java:59) at com.google.classyshark.silverghost.translator.java.dex.MultidexReader.readClassNamesFromMultidex(MultidexReader.java:175) at com.google.classyshark.silverghost.contentreader.apk.ApkReader.read(ApkReader.java:39) at com.google.classyshark.silverghost.contentreader.ContentReader.load(ContentReader.java:77) at com.google.classyshark.silverghost.SilverGhost.readContents(SilverGhost.java:63) at com.google.classyshark.gui.panel.ClassySharkPanel$5.doInBackground(ClassySharkPanel.java:368) at com.google.classyshark.gui.panel.ClassySharkPanel$5.doInBackground(ClassySharkPanel.java:365) at javax.swing.SwingWorker$1.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at javax.swing.SwingWorker.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)

Archive Reading 192 ms Parsing classes.dex Parsing classes2.dex Parsing classes3.dex Parsing classes4.dex Parsing classes5.dex`

The ClassyShark Methods Count is runing normally.

stevenwsg avatar Dec 30 '19 13:12 stevenwsg

@borisf

stevenwsg avatar Dec 30 '19 13:12 stevenwsg

It seems an issue with assets/37CF018B.dex file inside the APK. Dexlib2 that ClassyShark uses as the dex reader dependency can't parse that specific file

borisf avatar Dec 30 '19 13:12 borisf