markcox / smali

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

MIUI (4.2.2) error deodexing apk #174

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What seems to be the problem?
Errors deodexing a single apk out of miuirom

What version of smali/baksmali are you using? What rom are you working
from?
2.0b5 miui 3.6.14 4.2.2

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

processing app/Browser.apk

Error occured while disassembling class Lcom.android.browser.UrlInputView; - 
skipping class
org.jf.util.ExceptionWithContext: Invalid type: V
    at org.jf.dexlib2.analysis.RegisterType.getRegisterType(RegisterType.java:238)
    at org.jf.dexlib2.analysis.MethodAnalyzer.analyzeMoveResult(MethodAnalyzer.java:1028)
    at org.jf.dexlib2.analysis.MethodAnalyzer.analyzeInstruction(MethodAnalyzer.java:570)
    at org.jf.dexlib2.analysis.MethodAnalyzer.analyze(MethodAnalyzer.java:202)
    at org.jf.dexlib2.analysis.MethodAnalyzer.<init>(MethodAnalyzer.java:137)
    at org.jf.baksmali.Adaptors.MethodDefinition.addAnalyzedInstructionMethodItems(MethodDefinition.java:355)
    at org.jf.baksmali.Adaptors.MethodDefinition.getMethodItems(MethodDefinition.java:270)
    at org.jf.baksmali.Adaptors.MethodDefinition.writeTo(MethodDefinition.java:178)
    at org.jf.baksmali.Adaptors.ClassDefinition.writeVirtualMethods(ClassDefinition.java:314)
    at org.jf.baksmali.Adaptors.ClassDefinition.writeTo(ClassDefinition.java:105)
    at org.jf.baksmali.baksmali.disassembleClass(baksmali.java:169)
    at org.jf.baksmali.baksmali.access$000(baksmali.java:47)
    at org.jf.baksmali.baksmali$1.call(baksmali.java:95)
    at org.jf.baksmali.baksmali$1.call(baksmali.java:93)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:636)

Error occured while disassembling class Lcom.android.browser.bl; - skipping 
class
org.jf.util.ExceptionWithContext: Invalid type: V
    at org.jf.dexlib2.analysis.RegisterType.getRegisterType(RegisterType.java:238)
    at org.jf.dexlib2.analysis.MethodAnalyzer.analyzeMoveResult(MethodAnalyzer.java:1028)
    at org.jf.dexlib2.analysis.MethodAnalyzer.analyzeInstruction(MethodAnalyzer.java:570)
    at org.jf.dexlib2.analysis.MethodAnalyzer.analyze(MethodAnalyzer.java:202)
    at org.jf.dexlib2.analysis.MethodAnalyzer.<init>(MethodAnalyzer.java:137)
    at org.jf.baksmali.Adaptors.MethodDefinition.addAnalyzedInstructionMethodItems(MethodDefinition.java:355)
    at org.jf.baksmali.Adaptors.MethodDefinition.getMethodItems(MethodDefinition.java:270)
    at org.jf.baksmali.Adaptors.MethodDefinition.writeTo(MethodDefinition.java:178)
    at org.jf.baksmali.Adaptors.ClassDefinition.writeVirtualMethods(ClassDefinition.java:314)
    at org.jf.baksmali.Adaptors.ClassDefinition.writeTo(ClassDefinition.java:105)
    at org.jf.baksmali.baksmali.disassembleClass(baksmali.java:169)
    at org.jf.baksmali.baksmali.access$000(baksmali.java:47)
    at org.jf.baksmali.baksmali$1.call(baksmali.java:95)
    at org.jf.baksmali.baksmali$1.call(baksmali.java:93)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:636)

Error occured while disassembling class Lcom.android.browser.cZ; - skipping 
class
org.jf.util.ExceptionWithContext: Invalid type: V
    at org.jf.dexlib2.analysis.RegisterType.getRegisterType(RegisterType.java:238)
    at org.jf.dexlib2.analysis.MethodAnalyzer.analyzeMoveResult(MethodAnalyzer.java:1028)
    at org.jf.dexlib2.analysis.MethodAnalyzer.analyzeInstruction(MethodAnalyzer.java:570)
    at org.jf.dexlib2.analysis.MethodAnalyzer.analyze(MethodAnalyzer.java:202)
    at org.jf.dexlib2.analysis.MethodAnalyzer.<init>(MethodAnalyzer.java:137)
    at org.jf.baksmali.Adaptors.MethodDefinition.addAnalyzedInstructionMethodItems(MethodDefinition.java:355)
    at org.jf.baksmali.Adaptors.MethodDefinition.getMethodItems(MethodDefinition.java:270)
    at org.jf.baksmali.Adaptors.MethodDefinition.writeTo(MethodDefinition.java:178)
    at org.jf.baksmali.Adaptors.ClassDefinition.writeVirtualMethods(ClassDefinition.java:314)
    at org.jf.baksmali.Adaptors.ClassDefinition.writeTo(ClassDefinition.java:105)
    at org.jf.baksmali.baksmali.disassembleClass(baksmali.java:169)
    at org.jf.baksmali.baksmali.access$000(baksmali.java:47)
    at org.jf.baksmali.baksmali$1.call(baksmali.java:95)
    at org.jf.baksmali.baksmali$1.call(baksmali.java:93)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:636)

Original issue reported on code.google.com by mattez...@gmail.com on 17 Jun 2013 at 3:15

GoogleCodeExporter commented 9 years ago
Are you using -a 17?

Original comment by jesusfreke@jesusfreke.com on 17 Jun 2013 at 7:40

GoogleCodeExporter commented 9 years ago
yes, baksmali -a 17 -d framework -x Backup.odex

Original comment by mattez...@gmail.com on 17 Jun 2013 at 2:08

GoogleCodeExporter commented 9 years ago
I don't know if this helps you in any way, but if I use the command without the 
API switch, it does the job just fine.

Original comment by mattez...@gmail.com on 17 Jun 2013 at 10:24

GoogleCodeExporter commented 9 years ago
Great, thanks. Definitely helpful. I suspect maybe MIUI is using an older 
version of dalvik. I'll take a more in-depth look at it this evening.

Original comment by bgruv@google.com on 17 Jun 2013 at 10:33

GoogleCodeExporter commented 9 years ago
I can't reproduce this issue. Can you provide a link of the rom you are trying 
to deodex, and double-check the version of baksmali from baksmali --version

Original comment by jesusfreke@jesusfreke.com on 18 Jun 2013 at 3:10

GoogleCodeExporter commented 9 years ago
Trying with baksmali 2.0b5.
Latest MIUI 3.6.14 downloaded directly from MIUI's website, ROM intended
for maguro (Galaxy Nexus) with android version 4.2.2

Tried also with a MI-2 ROM, that game me that exact error, but on
framework_ext.jar. Also solved when I removed the API switch from the
command.

http://bigota.d.miui.com/3.6.14/miui_GalaxyNexus_3.6.14_9550cc9e49_4.2.zip-
Error deodexing ONLY Browser.jar
http://bigota.d.miui.com/3.6.14/miui_MI2_3.6.14_da15ffba62_4.1.zip - Error
deodexing ONLY framework_ext.jar

Original comment by mattez...@gmail.com on 18 Jun 2013 at 3:14

GoogleCodeExporter commented 9 years ago
Trying with baksmali 2.0b5.
Latest MIUI 3.6.14 downloaded directly from MIUI's website, ROM intended for 
maguro (Galaxy Nexus) with android version 4.2.2

Tried also with a MI-2 ROM, that game me that exact error, but on 
framework_ext.jar. Also solved when I removed the API switch from the command.

http://bigota.d.miui.com/3.6.14/miui_GalaxyNexus_3.6.14_9550cc9e49_4.2.zip - 
Error deodexing ONLY Browser.jar
http://bigota.d.miui.com/3.6.14/miui_MI2_3.6.14_da15ffba62_4.1.zip - Error 
deodexing ONLY framework_ext.jar

Original comment by mattez...@gmail.com on 18 Jun 2013 at 3:14

GoogleCodeExporter commented 9 years ago
I can reproduce the issue now. Thanks!

Original comment by jesusfreke@jesusfreke.com on 18 Jun 2013 at 4:17

GoogleCodeExporter commented 9 years ago
As far as I can tell, that MIUI rom is using an api 15/16 version of dalvik, 
and you should just use -a 15 (which is the default) when deodexing.

Original comment by jesusfreke@jesusfreke.com on 18 Jun 2013 at 5:04