xychix / smali

Automatically exported from code.google.com/p/smali
0 stars 0 forks source link

Baksmali doesn't see class files in dependency #126

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What seems to be the problem?
When I try to generate smali for either DataCollection.odex or 
OMAPPowerMeter.odex it generates an error(see below). I have found the class 
file it is talking about, which is in the com.zecter.droid.service_lib.jar whis 
IS in the bootclasspath. Other files have depended on it too and they worked...

What is the exact smali/baksmali command that you ran?

java -Xmx512M -jar 
C:\Users\Noah\Documents\Utilities\Android\Deodex\baksmali\app\..\baksmali.jar 
-c 
core.jar:core-junit.jar:bouncycastle.jar:ext.jar:framework.jar:framework-ext.jar
:android.policy.jar:services.jar:apache-xml.jar:filterfw.jar:com.motorola.androi
d.frameworks.jar:com.motorola.android.widget.jar:com.motorola.frameworks.core.ad
don.jar:com.zecter.droid.services_lib.jar:android.test.runner.jar -d 
C:\Users\Noah\Documents\Utilities\Android\Deodex\baksmali\app\..\..\..\deodexcle
an\system\framework\ -x 
C:\Users\Noah\Documents\Utilities\Android\Deodex\baksmali\app\..\..\..\deodexcle
an\system\app\OMAPPowerMeter.odex -o 
C:\Users\Noah\Documents\Utilities\Android\Deodex\baksmali\app\..\..\te
mp\OMAPPowerMeter

What version of smali/baksmali are you using? What rom are you working
from?
1.3.3
Stock Motoblur ICS Leak for Droid 4

Please provide any additional information below: error messages, symptoms,
etc.

Error while disassembling method 
Lcom/google/gson/RecursiveFieldNamingPolicy;->translateName(Lcom/google/gson/Fie
ldAttributes;)Ljava/lang/String;. Continuing.
org.jf.dexlib.Code.Analysis.ValidationException: Could not resolve the method 
in class Lcom/google/gson/FieldAttributes; at index 18
    at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyzeInvokeVirtualQuick(MethodAnalyzer.java:3606)
    at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyzeInstruction(MethodAnalyzer.java:1086)
    at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyze(MethodAnalyzer.java:213)
    at org.jf.baksmali.Adaptors.MethodDefinition.addAnalyzedInstructionMethodItems(MethodDefinition.java:379)
    at org.jf.baksmali.Adaptors.MethodDefinition.writeTo(MethodDefinition.java:132)
    at org.jf.baksmali.Adaptors.ClassDefinition.writeMethods(ClassDefinition.java:338)
    at org.jf.baksmali.Adaptors.ClassDefinition.writeTo(ClassDefinition.java:117)
    at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:205)
    at org.jf.baksmali.main.main(main.java:297)
opcode: invoke-virtual-quick
CodeAddress: 3
Method: 
Lcom/google/gson/RecursiveFieldNamingPolicy;->translateName(Lcom/google/gson/Fie
ldAttributes;)Ljava/lang/String;

(Same for both)

Original issue reported on code.google.com by moah...@gmail.com on 2 Jul 2012 at 12:10

GoogleCodeExporter commented 9 years ago
The problem here isn't that it can't find a class, but rather, that the class 
doesn't have enough methods. It's trying to access the method at vtable index 
18, but there apparently aren't that many virtual methods in the class.

My initial thought is that there could be different versions of the 
com/google/gson/FieldAttributes class, and that the one from the zector service 
lib is the wrong one. Can you check if there is a 
Lcom/google/gson/FieldAttributes; class in either of the odexs that are giving 
you a problem, or anywhere else in framework.

Original comment by jesusfreke@jesusfreke.com on 2 Jul 2012 at 8:55

GoogleCodeExporter commented 9 years ago
I have a similar issue with some apks of the I9300 roms.
I can manage deodex them fine with 1.3.2 but with 1.3.3 i get dependency issues 
even if the dependencies are there

Original comment by shauli.b...@gmail.com on 9 Jul 2012 at 7:53

GoogleCodeExporter commented 9 years ago
shauli.bracha: you might want to take a look at issue 124

Original comment by bgruv@google.com on 9 Jul 2012 at 8:17

GoogleCodeExporter commented 9 years ago
thank you, missed that one

Original comment by shauli.b...@gmail.com on 9 Jul 2012 at 8:22

GoogleCodeExporter commented 9 years ago

Original comment by jesusfreke@jesusfreke.com on 14 Feb 2013 at 11:36