vaginessa / smali

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

framework.odex problem #195

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What seems to be the problem?
I pull out the /system/framework/ directory and try to use baksmali with it.

What is the exact smali/baksmali command that you ran?
#java -jar baksmali-1.4.1.jar -c :core-junit.odex -x framework.odex

Please provide any additional information below: error messages, symptoms,
etc.
Error while disassembling method 
Landroid/webkit/AccessibilityInjector$1;->run()V. Continuing.
org.jf.dexlib.Code.Analysis.ValidationException: class 
Landroid/widget/AbsoluteLayout; cannot be resolved.
    at org.jf.dexlib.Code.Analysis.ClassPath$UnresolvedClassDef.unresolvedValidationException(ClassPath.java:536)
    at org.jf.dexlib.Code.Analysis.ClassPath$UnresolvedClassDef.getSuperclass(ClassPath.java:540)
    at org.jf.dexlib.Code.Analysis.DeodexUtil.parseAndResolveMethod(DeodexUtil.java:212)
    at org.jf.dexlib.Code.Analysis.DeodexUtil.lookupVirtualMethod(DeodexUtil.java:103)
    at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyzeInvokeVirtualQuick(MethodAnalyzer.java:3640)
    at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyzeInstruction(MethodAnalyzer.java:1106)
    at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyze(MethodAnalyzer.java:213)
    at org.jf.baksmali.Adaptors.MethodDefinition.addAnalyzedInstructionMethodItems(MethodDefinition.java:389)
    at org.jf.baksmali.Adaptors.MethodDefinition.getMethodItems(MethodDefinition.java:311)
    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.writeVirtualMethods(ClassDefinition.java:310)
    at org.jf.baksmali.Adaptors.ClassDefinition.writeTo(ClassDefinition.java:117)
    at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:186)
    at org.jf.baksmali.main.main(main.java:308)
opcode: invoke-virtual-quick
CodeAddress: 27

Original issue reported on code.google.com by sungzheg...@gmail.com on 17 Dec 2013 at 9:12

GoogleCodeExporter commented 9 years ago
Please try again with the latest version of baksmali. Also, you probably want 
to use the -a option with the appropriate api level.

Original comment by jesusfreke@jesusfreke.com on 17 Dec 2013 at 8:00

GoogleCodeExporter commented 9 years ago
If I use the latest baksmali(which is ver.2.0.2 from what I saw), I got error 
for boot class path files. 

#java -jar baksmali-2.0.2.jar -a 18 -c :core-junit.odex -x framework.odex

Error occured while loading boot class path files. Aborting.
org.jf.util.ExceptionWithContext: Cannot locate boot class path file 
/system/framework/core.odex
    at org.jf.dexlib2.analysis.ClassPath.loadClassPathEntry(ClassPath.java:217)
    at org.jf.dexlib2.analysis.ClassPath.fromClassPath(ClassPath.java:161)
    at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:59)
    at org.jf.baksmali.main.main(main.java:274)

Original comment by sungzheg...@gmail.com on 18 Dec 2013 at 2:37

GoogleCodeExporter commented 9 years ago
In addition, here's the file list inside the folder:
system/framework$ ls
abt-persistence.jar                    com.samsung.device.jar  mms-common.jar   
                   secvision.jar
abt-persistence.odex                   ContainerProxies.jar    mms-common.odex  
                   secvision.odex
allshare.jar                           ContainerProxies.odex   monkey.jar       
                   services.jar
allshareJmDNS.jar                      content.jar             monkey.odex      
                   services.odex
allshareJmDNS.odex                     content.odex            multiwindow.jar  
                   settings.jar
allshare.odex                          core.jar                multiwindow.odex 
                   settings.odex
am.jar                                 core-junit.jar          
nfc_hci_services.jar                smali-2.0.2.jar
am.odex                                core-junit.odex         
nfc_hci_services.odex               smali-512m
android.policy.jar                     core.odex               oem-services.jar 
                   smartfaceserviceapi.jar
android.policy.odex                    CustFeature.jar         
oem-services.odex                   smartfaceserviceapi.odex
android.test.runner.jar                CustFeature.odex        
org.codeaurora.Performance.jar      smartfaceservice.jar
android.test.runner.odex               digitalpensdk.jar       
org.codeaurora.Performance.odex     smartfaceservice.odex
apache-xml.jar                         digitalpensdk.odex      
org.simalliance.openmobileapi.jar   smatlib.jar
apache-xml.odex                        digitalpenutil.jar      
org.simalliance.openmobileapi.odex  smatlib.odex
apa.jar                                digitalpenutil.odex     out              
                   ssrm.jar
apa.odex                               ext.jar                 pm.jar           
                   ssrm.odex
baksmali                               ext.odex                pm.odex          
                   sstream_lib.jar
baksmali-1.4.1.jar                     framework2.jar          
qcmediaplayer.jar                   sstream_lib.odex
baksmali-2.0.2.jar                     framework2.odex         
qcmediaplayer.odex                  stayrotation.jar
bmgr.jar                               framework2-out          requestsync.jar  
                   stayrotation.odex
bmgr.odex                              framework.jar           requestsync.odex 
                   svc.jar
bouncycastle.jar                       framework.odex          
samsung_library_music.jar           svc.odex
bouncycastle.odex                      framework-res.apk       
samsung_library_music.odex          svi.jar
bu.jar                                 GlobalConfig.jar        sc.jar           
                   svi.odex
bu.odex                                GlobalConfig.odex       sc.odex          
                   sws.jar
com.android.future.usb.accessory.jar   ime.jar                 scrollpause.jar  
                   sws.odex
com.android.future.usb.accessory.odex  ime.odex                scrollpause.odex 
                   telephony-common.jar
com.android.location.provider.jar      input.jar               seccamera.jar    
                   telephony-common.odex
com.android.location.provider.odex     input.odex              seccamera.odex   
                   twframework.jar
com.android.nfc_extras.jar             javax.obex.jar          sec_edm.jar      
                   twframework.odex
com.android.nfc_extras.odex            javax.obex.odex         sec_edm.odex     
                   twframework-res.apk
com.broadcom.bt.jar                    kies_feature.jar        sec_feature.jar  
                   uiautomator.jar
com.broadcom.bt.odex                   kies_feature.odex       sec_feature.odex 
                   uiautomator.odex
com.broadcom.nfc.jar                   libvtmanagerjar.jar     sechardware.jar  
                   videowall.jar
com.broadcom.nfc.odex                  libvtmanagerjar.odex    sechardware.odex 
                   videowall.odex
com.dsi.ant.antradio_library.jar       media_cmd.jar           
secmediarecorder.jar                voip-common.jar
com.dsi.ant.antradio_library.odex      media_cmd.odex          
secmediarecorder.odex               voip-common.odex
com.google.widevine.software.drm.jar   minimode.jar            secocsp.jar      
                   wm.jar
com.google.widevine.software.drm.odex  minimode.odex           secocsp.odex     
                   wm.odex
commonimsinterface.jar                 mmappframeworklib.jar   
sec_platform_library.jar
commonimsinterface.odex                mmappframeworklib.odex  
sec_platform_library.odex

Original comment by sungzheg...@gmail.com on 18 Dec 2013 at 3:02

GoogleCodeExporter commented 9 years ago
You probably don't need to use -c, and pass the system/framework directory via 
the -d option.

java -jar baksmali-2.0.2.jar -x -a 18 -d <framework_dir> framework.odex

Original comment by jesusfreke@jesusfreke.com on 18 Dec 2013 at 5:09

GoogleCodeExporter commented 9 years ago
I tried the following command, 
#java -jar baksmali-2.0.2.jar -x -a 18 -d out framework.odex

and still have the same problem ...

Error occured while loading boot class path files. Aborting.
org.jf.util.ExceptionWithContext: Cannot locate boot class path file 
/system/framework/core.odex
    at org.jf.dexlib2.analysis.ClassPath.loadClassPathEntry(ClassPath.java:217)
    at org.jf.dexlib2.analysis.ClassPath.fromClassPath(ClassPath.java:161)
    at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:59)
    at org.jf.baksmali.main.main(main.java:274)

Original comment by sungzheg...@gmail.com on 18 Dec 2013 at 5:25

GoogleCodeExporter commented 9 years ago
Is "out" the directory containing all the framework files? I'm going to guess 
no :). You need to pass the directory that you provided a listing for, in 
comment #3

Original comment by jesusfreke@jesusfreke.com on 18 Dec 2013 at 6:21

GoogleCodeExporter commented 9 years ago
Thank you very much, jf. It works now. 

Original comment by Shanwust...@gmail.com on 18 Dec 2013 at 9:33

GoogleCodeExporter commented 9 years ago

Original comment by bgruv@google.com on 7 Jan 2014 at 12:40

GoogleCodeExporter commented 9 years ago
Thank you :)

Original comment by wafiazmi...@gmail.com on 29 Sep 2014 at 5:00