Giter Site home page Giter Site logo

smali's People

Contributors

a4vision avatar agampe avatar agorski3 avatar allight avatar andvgal avatar calebfenton avatar erichetti avatar friederbluemle avatar furniel avatar fuzion24 avatar gnanet avatar huaxin-gg avatar iam avatar ibotpeaches avatar jesusfreke avatar kanzure avatar lanchon avatar marcmil avatar mikaelpeltier avatar narayank avatar neonorbit avatar ohodson avatar psm14 avatar regisd avatar rover12421 avatar shivang1989 avatar whydoubt avatar wojtek-kalicinski avatar yirkha avatar yyjdelete avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

smali's Issues

The offset/label is out of range

Original issue 9 created by JesusFreke on 2009-12-18T04:56:12.000Z:

After deodex services.odex then redex I get this error.

java -Xmx512M -jar smali.jar -o classes.dex out

C:\Android\tools\out\com\android\server\WindowManagerService
[.smali31955,4] The offset/label is out of range. The offset is -133 and
the range for this opcode is [128, 127].

The service.odex is from Droid 2.01

I have attached the deodexed services.odex

Thanks,

-Matt

Error running baksmail agains Mail.apk

Original issue 22 created by JesusFreke on 2010-03-23T23:27:31.000Z:

What seems to be the problem? Cannot baksmali Mail.apk application from
Android 2.1 running on HTC Hero (Eris Leak):
http://forum.xda-developers.com/showthread.php?t=644079

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

java -Xmx512m -jar c:\temp\android\sdk\tools\baksmali-1.2.1.jar -x
Mail.odex -o Mail_out -d ../origi_frame -c
:com.htc.framework.jar:com.google.android.maps.jar:com.htc.android.pimlib.jar:javax.obex.jar

What version are you using?

baksmali-1.2.1
java version "1.6.0_18"

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

Receive the following error message when attempting to baksmail:

UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.NullPointerException
at java.util.regex.Matcher.getTextLength(Unknown Source)
at java.util.regex.Matcher.reset(Unknown Source)
at java.util.regex.Matcher.<init>(Unknown Source)
at java.util.regex.Pattern.matcher(Unknown Source)
at
org.jf.dexlib.Code.Analysis.DeodexUtil.lookupVirtualMethod(DeodexUtil
.java:87)
at
org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyzeInvokeVirtualQuick(
MethodAnalyzer.java:3488)
at
org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyzeInstruction(MethodA
nalyzer.java:1047)
at
org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyze(MethodAnalyzer.jav
a:202)
at
org.jf.baksmali.Adaptors.MethodDefinition.getMethodItems(MethodDefini
tion.java:284)
at
org.jf.baksmali.Adaptors.MethodDefinition.createTemplate(MethodDefini
tion.java:126)
at
org.jf.baksmali.Adaptors.ClassDefinition.getTemplatesForMethods(Class
Definition.java:279)
at
org.jf.baksmali.Adaptors.ClassDefinition.getDirectMethods(ClassDefini
tion.java:259)
at
org.jf.baksmali.Adaptors.ClassDefinition.createTemplate(ClassDefiniti
on.java:75)
at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:137)
at org.jf.baksmali.main.main(main.java:268)

smali compile problem

Original issue 7 created by JesusFreke on 2009-10-17T14:51:42.000Z:

What steps will reproduce the problem?

  1. use backsmali to decompile a dex from a apk
  2. use smali compile it back, and put the dex back to the apk
  3. adb install recompiled.apk

What is the expected output? What do you see instead?
I only get this message.
Failure [INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION]
What version of the product are you using? On what operating system?
0.94 & 0.96

Please provide any additional information below.

Error deodexing

Original issue 8 created by JesusFreke on 2009-10-21T03:12:20.000Z:

What steps will reproduce the problem?

  1. Exactly following DeodexInstructions
  2. Tried deodexing Weather.odex from HTC Hero
  3. out folder created with some files but I get that error:

UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: java.lang.RuntimeException: class
Lcom/htc/elroy/Weather/MyLocation; could not be found for common superclass
lookup
at org.jf.dexlib.Util.Deodexerant.sendCommand(Deodexerant.java:210)
at org.jf.dexlib.Util.Deodexerant.lookupCommonSuperclass(Deodexerant.java:184)
at
org.jf.dexlib.Util.DeodexUtil$insn.findCommonSuperclass(DeodexUtil.java:1259)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1430)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil$insn.propogateRegisters(DeodexUtil.java:1484)
at org.jf.dexlib.Util.DeodexUtil.makeInsnList(DeodexUtil.java:190)
at org.jf.dexlib.Util.DeodexUtil.deodexerizeCode(DeodexUtil.java:196)
at
org.jf.baksmali.Adaptors.MethodDefinition$MethodItemList.generateMethodItemList(MethodDefinition.java:183)
at
org.jf.baksmali.Adaptors.MethodDefinition.getMethodItems(MethodDefinition.java:144)
at
org.jf.baksmali.Adaptors.MethodDefinition.makeTemplate(MethodDefinition.java:61)
at
org.jf.baksmali.Adaptors.ClassDefinition.getVirtualMethods(ClassDefinition.java:221)
at
org.jf.baksmali.Adaptors.ClassDefinition.makeTemplate(ClassDefinition.java:67)
at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:112)
at org.jf.baksmali.main.main(main.java:183)
Caused by: java.lang.RuntimeException: class
Lcom/htc/elroy/Weather/MyLocation; could not be found for common superclass
lookup
at org.jf.dexlib.Util.Deodexerant.sendCommand(Deodexerant.java:206)
... 73 more

typo in output

Original issue 4 created by JesusFreke on 2009-07-27T10:45:49.000Z:

typo example:

[0x0]
| encedod_method:
016925: bd03 | method_idx_diff: 0x1bd (method_id_item:
Lcom/alk/copilot/licensing/EnterpriseKey$1;-><in
| it>(Landroid/app/Activity;)V)
016927: 8080 04 | access_flags: 0x10000
01692a: e0f8 02 | code_off: 0xbc60 (code_item @0xbc60)

baksmali doesn't handle certain cases with try/catch blocks correctly when deodexing unresolvable instructions.

Original issue 33 created by JesusFreke on 2010-06-10T14:34:33.000Z:

There are 2 main issues - the first is that if all the code within a try block is commented out due to an unresolvable instruction, baksmali should remove the try block (but it doesn't currently). An alternate fix might be to introduce a single nop within the try block in these cases.

The second issue is that in some cases baksmali will replace an unresolvable instruction with an invoke, and the following dead code extends up to an exception handler, and the goto/jump/branch just before the exception handler is commented out, causing dalvik to think that execution could continue on from the replaced invoke instruction directly to the move-exception instruction, which is illegal. Always replacing these instructions with a throw instead should fix this issue, by preventing dalvik from thinking that execution could continue past the replaced instruction.

This will be fixed in the next release :)

ValidationException when deodexing RunKeeper app

Original issue 26 created by JesusFreke on 2010-04-20T10:09:25.000Z:

What seems to be the problem?
I got ValidationException when deodexing RunKeeper's classes.dex file.

What is the exact smali/baksmali command that you ran?
baksmali -x classes.dex -o out

What version are you using?
1.2.2

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

org.jf.dexlib.Code.Analysis.ValidationException: Invalid register type
(Reference,Lcom/fitnesskeeper/runkeeper/ActivityActivity;) for parameter 1
(Reference,Landroid/content/Context;).
at
org.jf.dexlib.Code.Analysis.MethodAnalyzer.handleInvokeCommon(MethodAnalyze
r.java:2557)
at
org.jf.dexlib.Code.Analysis.MethodAnalyzer.handleInvoke(MethodAnalyzer.java
:2382)
at
org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyzeInstruction(MethodAnalyze
r.java:883)
at
org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyze(MethodAnalyzer.java:184)
at
org.jf.baksmali.Adaptors.MethodDefinition.getMethodItems(MethodDefinition.j
ava:253)
at
org.jf.baksmali.Adaptors.MethodDefinition.createTemplate(MethodDefinition.j
ava:118)
at
org.jf.baksmali.Adaptors.ClassDefinition.getTemplatesForMethods(ClassDefini
tion.java:279)
at
org.jf.baksmali.Adaptors.ClassDefinition.getVirtualMethods(ClassDefinition.
java:267)
at
org.jf.baksmali.Adaptors.ClassDefinition.createTemplate(ClassDefinition.jav
a:76)
at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:133)
at org.jf.baksmali.main.main(main.java:263)
opcode: invoke-static
CodeAddress: 10
Method: Lcom/fitnesskeeper/runkeeper/ActivityActivity$2;-
>onClick(Landroid/content/DialogInterface;I)V

I'm attaching classes.dex and my BOOTCLASSPATH files.

Java 5 JVMs not suppored

Original issue 1 created by JesusFreke on 2009-06-24T21:37:42.000Z:

What steps will reproduce the problem?

  1. Try running smali-0.9.1.jar on Java 5

What is the expected output? What do you see instead?
It's supposed to work, but I get missing class errors (java.util.ArrayQueue
is one)

What version of the product are you using? On what operating system?
0.9.1, on Mac OS X. On Max OS X, Java 5 is the default so this is basically
blocking out most Mac users.

Please provide any additional information below.
I think this should be fixed as most of these problems can be fixed (swap
LinkedList for ArrayQueue for example) and it stops especially Mac users
from using the software (you can work around it, but this is hard).

Smali error with FRF83

Original issue 36 created by JesusFreke on 2010-06-25T09:22:21.000Z:

What seems to be the problem? Getting issues rebuilding classes.dex file with smali v1.2.3.. Classes.dex is deodoxed from FRF83 Froyo 2.2. services.jar.

What is the exact smali/baksmali command that you ran?
java -Xmx512M -jar smali.jar classout/ -o new-classes.dex

What version are you using? v.1.2.3.

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

"Error occured while loading boot class path files"

Original issue 16 created by JesusFreke on 2010-03-04T02:00:23.000Z:

What steps will reproduce the problem?
1.java -jar baksmali-1.2.jar -x services.odex
2.
3.

What is the expected output? What do you see instead?
.odex files should deodex.

What version of the product are you using? On what operating system?
baksmali-1.2 on Ubuntu 9.10

Please provide any additional information below.
Error im getting when I deodex services.odex.
This is what I get when I rename, or delete the framework jar files.

java -jar baksmali-1.2.jar -x services.odex

Error occured while loading boot class path files. Aborting.
org.jf.dexlib.Code.Analysis.ValidationException: class
Landroid/content/DialogInterface$OnCancelListener; cannot be resolved.
at
org.jf.dexlib.Code.Analysis.ClassPath$UnresolvedClassDef.unresolvedValidationException(ClassPath.java:391)
at
org.jf.dexlib.Code.Analysis.ClassPath$UnresolvedClassDef.getSuperclass(ClassPath.java:395)
at
org.jf.dexlib.Code.Analysis.ClassPath$ClassDef.loadAllImplementedInterfaces(ClassPath.java:676)
at org.jf.dexlib.Code.Analysis.ClassPath$ClassDef.<init>(ClassPath.java:532)
at org.jf.dexlib.Code.Analysis.ClassPath.loadDexFile(ClassPath.java:127)
at org.jf.dexlib.Code.Analysis.ClassPath.loadBootClassPath(ClassPath.java:118)
at org.jf.dexlib.Code.Analysis.ClassPath.initClassPath(ClassPath.java:64)
at
org.jf.dexlib.Code.Analysis.ClassPath.InitializeClassPath(ClassPath.java:54)
at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:68)
at org.jf.baksmali.main.main(main.java:263)

Error running smali against HTC_IME.apk

Original issue 21 created by JesusFreke on 2010-03-23T23:20:26.000Z:

What seems to be the problem? I can baksmali this apk fine, however,
attempting to recompile with smali fails (see output below).

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

java -Xmx512m -jar c:\android\sdk\tools\smali-1.2.1.jar -o
HTC_IME_out\classes.dex HTC_IME_out

What version are you using?

Smali-1.2.1
java version "1.6.0_18"

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

Am return a ton of errors when attempting to recompile with smali. See
attached.

Thanks.

SMALI - Missing Library?

Original issue 3 created by JesusFreke on 2009-07-26T00:13:51.000Z:

I Just tried to recompile a smali to a dex. Tried it also with the whole Folder.
In both cases i get the following Exception:

MAC:Downloads firefart$ java -Xms32m -Xmx500m -jar smali.jar
./out/com/android/setupwizard/Constants.smali

UNEXPECTED TOP-LEVEL ERROR:
java.lang.NoClassDefFoundError: java/util/ArrayDeque
at org.jf.smali.smaliLexer.<init>(smaliLexer.java:285)
at org.jf.smali.smaliLexer.<init>(smaliLexer.java:370)
at org.jf.smali.main.assembleSmaliFile(main.java:206)
at org.jf.smali.main.main(main.java:138)

I tried this under Mac OSX.

Unexpected top-level exception

Original issue 5 created by JesusFreke on 2009-08-24T22:54:02.000Z:

baksmali version 0.94 fails with:

UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IndexOutOfBoundsException: The provided cursor value is not
within the bounds of this instance's data array
at org.jf.dexlib.Util.ByteArrayInput.setCursor(ByteArrayInput.java:78)
at org.jf.dexlib.DexFile.<init>(DexFile.java:266)
at org.jf.baksmali.main.main(main.java:142)

on an attached optimized dex file (it is a HTC IME from Hero phone).

R$string.smali file values

Original issue 34 created by JesusFreke on 2010-06-10T20:26:16.000Z:

What seems to be the problem?
First of all, I would like to thank you guys so much for developing and releasing such and excellent and useful tool. That being said, I was wondering what format is used to encode the R$string.smali file, or for that matter, any of the .smali files. I wished to be able to see the string values for the strings I added to my .apk file but I currently only see the string names. For ex., if I entered the string:
"DrNick" with value "Hi Everybody" in Java, once the .dex file has been de-assembled, the R$string.smali file shows:
".field public static final DrNick:I = 0x7f040002". Is there a way to get the value "Hi Everybody" to show up in the .smali file or what is the encoding method used so I can try to return the string to it's original value?

What version are you using?
1.2.2

Please provide any additional information below: error messages, symptoms,
etc.
If at all possible, I would really appreciate it if I could get to take a look at the source code to edit and figure out the encoding issue.
Thank you so much in advance for this program and all your help!

Cannot deodex when both jar and odex files are present

Original issue 15 created by JesusFreke on 2010-03-03T04:52:56.000Z:

What steps will reproduce the problem?

Attempt to de-odex framework from OpenX2 ROM for DSTL1*:

  1. java -jar baksmali.jar -x core.odex

What is the expected output? What do you see instead?

Not sure because APKs require framework jars containing classes.dex and I
can't de-odex framework because of same reason:

Error occured while loading boot class path files. Aborting.
org.jf.dexlib.Util.ExceptionWithContext: zip file core.jar does not contain
a classes.dex file
at
org.jf.dexlib.Util.ExceptionWithContext.withContext(ExceptionWithContext.java:58)
at
org.jf.dexlib.Code.Analysis.ClassPath.loadBootClassPath(ClassPath.java:114)
at
org.jf.dexlib.Code.Analysis.ClassPath.initClassPath(ClassPath.java:64)
at
org.jf.dexlib.Code.Analysis.ClassPath.InitializeClassPath(ClassPath.java:54)
at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:68)
at org.jf.baksmali.main.main(main.java:263)
Caused by: java.lang.RuntimeException: zip file core.jar does not contain a
classes.dex file
at org.jf.dexlib.DexFile.<init>(DexFile.java:308)
at
org.jf.dexlib.Code.Analysis.ClassPath.loadBootClassPath(ClassPath.java:112)
... 4 more
Error while reading boot class path entry "core.jar".

What version of the product are you using? On what operating system?
baksmali v1.2 on Windows 7 x64 Ultimate

Please provide any additional information below.

java version "1.6.0_18"
Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
Java HotSpot(TM) Client VM (build 16.0-b13, mixed mode, sharing)

Do I need to use baksmali v1.1 on framework before I can use v1.2 on APKs?
Maybe I need to set some kind of argument to look for odex instead of
classes.dex?

*http://hotfile.com/links/28900370/78f3196/OpenX2_v1.3.1.4.zip

Fails to work at all (Version 0.92)

Original issue 2 created by JesusFreke on 2009-07-03T16:45:33.000Z:

In the Hello World example the command line parameters are said to be as
such:
java -jar smali.jar --dex HelloWorld.smali

The above fails to do anything, just outputs the help screen

It seems that in version 0.92, the command line parameter has changed so
that it's this instead:
java -jar smali.jar -- HelloWorld.smali
or
java -jar smali.jar HelloWorld.smali

In this case, the above seems to be doing something, but it crashes with
this error:

UNEXPECTED TOP-LEVEL ERROR:
java.lang.OutOfMemoryError: Java heap space
at org.antlr.runtime.DFA.unpackEncodedString(DFA.java:191)
at org.jf.smali.smaliLexer.<clinit>(smaliLexer.java:20013)
at org.jf.smali.main.assembleSmaliFile(main.java:206)
at org.jf.smali.main.main(main.java:138)

DeodexUtil StackOverflowError when deodex Google maps odex file

Original issue 11 created by JesusFreke on 2009-12-31T04:32:27.000Z:

What steps will reproduce the problem?

  1. following the instruction to de-
    odex /system/framework/com.google.android.maps.odex from a Sapphire/ADP2
    phone

What is the expected output? What do you see instead?

It shoud have no errors to deodex, but it got the errors as they are shown
below in the additional info section.

What version of the product are you using? On what operating system?

Android ADP2/Sapphire phone, host is Windows Vista 32bit.

Please provide any additional information below.

I am trying to deodex
ADP2/Sapphire's /system/framework/com.google.android.maps.odex, but got
the error below when I ran this command:

"java -Xss1m -Xmx512M -jar baksmali.jar -x :1234
com.google.android.maps.odex"

I have also tried the following commands, but the errors are the same:

"java -Xss1m -Xmx512M"

"java -Xss10m -Xmx512M"

"java -Xss16m -Xmx512M"

"java -Xss64m -Xmx512M"

"java -Xss32m -Xmx1024M"

"java -Xss64m -Xmx1024M"

Errors:



UNEXPECTED TOP-LEVEL ERROR: java.lang.StackOverflowError?
at java.util.LinkedList?.listIterator(Unknown Source) at
java.util.AbstractList?.listIterator(Unknown Source) at
java.util.AbstractSequentialList?.iterator(Unknown Source) at
org.jf.dexlib.Util.DeodexUtil?$insn.propagateRegisters
(DeodexUtil?.java:1396) at org.jf.dexlib.Util.DeodexUtil?
$insn.propagateRegisters(DeodexUtil?.java:1466) at
org.jf.dexlib.Util.DeodexUtil?$insn.propagateRegisters
(DeodexUtil?.java:1466) at org.jf.dexlib.Util.DeodexUtil?
$insn.propagateRegisters(DeodexUtil?.java:1466) at
org.jf.dexlib.Util.DeodexUtil?$insn.propagateRegisters
(DeodexUtil?.java:1466) at org.jf.dexlib.Util.DeodexUtil?
$insn.propagateRegisters(DeodexUtil?.java:1466) at
org.jf.dexlib.Util.DeodexUtil?$insn.propagateRegisters
(DeodexUtil?.java:1466) at org.jf.dexlib.Util.DeodexUtil?
$insn.propagateRegisters(DeodexUtil?.java:1466) at
org.jf.dexlib.Util.DeodexUtil?$insn.propagateRegisters
(DeodexUtil?.java:1466) at org.jf.dexlib.Util.DeodexUtil?
$insn.propagateRegisters(DeodexUtil?.java:1466) at
org.jf.dexlib.Util.DeodexUtil?$insn.propagateRegisters
(DeodexUtil?.java:1466) at org.jf.dexlib.Util.DeodexUtil?
$insn.propagateRegisters(DeodexUtil?.java:1466) at
org.jf.dexlib.Util.DeodexUtil?$insn.propagateRegisters
(DeodexUtil?.java:1466) at org.jf.dexlib.Util.DeodexUtil?
$insn.propagateRegisters(DeodexUtil?.java:1466) at
org.jf.dexlib.Util.DeodexUtil?$insn.propagateRegisters
(DeodexUtil?.java:1466) at org.jf.dexlib.Util.DeodexUtil?
$insn.propagateRegisters(DeodexUtil?.java:1466) at
org.jf.dexlib.Util.DeodexUtil?$insn.propagateRegisters
(DeodexUtil?.java:1466) at org.jf.dexlib.Util.DeodexUtil?
$insn.propagateRegisters(DeodexUtil?.java:1466) at
org.jf.dexlib.Util.DeodexUtil?$insn.propagateRegisters
(DeodexUtil?.java:1466) at org.jf.dexlib.Util.DeodexUtil?
$insn.propagateRegisters(DeodexUtil?.java:1466) at
org.jf.dexlib.Util.DeodexUtil?$insn.propagateRegisters
(DeodexUtil?.java:1466) at org.jf.dexlib.Util.DeodexUtil?
$insn.propagateRegisters(DeodexUtil?.java:1466) at
org.jf.dexlib.Util.DeodexUtil?$insn.propagateRegisters
(DeodexUtil?.java:1466) at org.jf.dexlib.Util.DeodexUtil?
$insn.propagateRegisters(DeodexUtil?.java:1466)
.................

However, "/system/framework/com.google.android.gtalkservice.odex" has no
problem with "java -Xss1m -Xmx512M", and worked.
Just that "/system/framework/com.google.android.maps.odex" had probelms at
point when 2/3 of work is done.

This is from a Sapphire/ADP2 phone. I am running the smali from Windows
Vista 32bit.

smali-1.2.jar does not reassemble .odex into a classes.dex properly.

Original issue 17 created by JesusFreke on 2010-03-04T16:14:43.000Z:

What steps will reproduce the problem?

  1. java -jar smali-1.2.jar out -o classes.dex
    2.
    3.

What is the expected output? What do you see instead?
smali should reassemble the .odex file into a .dex file

java -jar smali-1.2.jar out -o classes.dex
/home/vince/Android/services/out/com/android/server/WindowManagerService.smali[25847,4]
[smali_file, method, statements_and_directives, instruction]
invoke-virtual-quick is an odexed instruction. You cannot reassemble a
disassembled odex file unless it has been deodexed.
/home/vince/Android/services/out/com/android/server/WindowManagerService.smali[25854,4]
[smali_file, method, statements_and_directives, instruction]
invoke-virtual-quick is an odexed instruction. You cannot reassemble a
disassembled odex file unless it has been deodexed.
/home/vince/Android/services/out/com/android/server/LocationManagerService.smali[7271,4]
[smali_file, method, statements_and_directives, instruction]
invoke-virtual-quick is an odexed instruction. You cannot reassemble a
disassembled odex file unless it has been deodexed.
What version of the product are you using? On what operating system?
smali-1.2 Ubuntu 9.10

Please provide any additional information below.

Smali-1.1 throwing errors when attempting to re-dex smali files

Original issue 10 created by JesusFreke on 2009-12-28T18:59:28.000Z:

What steps will reproduce the problem?

  1. java -Xmx512m -jar smali 1.1 /launcher2-smali files/ -o classes.dex
  2. java -Xmx512m -jar smali 1.1 /wallpaperpicker-smali files/ -0
    classes.dex
    3.

What is the expected output? What do you see instead?

expected output is to generate a new classes.dex for the launcher2.apk &
wallpaperpicker.apk from the nexus ROM, instead smali throws loads of
"no viable alternative to character x" errors

What version of the product are you using? On what operating system?
smali 1.1, windows 7

Please provide any additional information below.

Cannot be resolved

Original issue 19 created by JesusFreke on 2010-03-06T11:23:49.000Z:

What is the expected output? What do you see instead?
Deodexing JAR...
org.jf.dexlib.Code.Analysis.ValidationException: class
Lcom/htc/app/HtcProgressD
ialog; cannot be resolved.
at
org.jf.dexlib.Code.Analysis.ClassPath$UnresolvedClassDef.unresolvedVa
lidationException(ClassPath.java:442)
at
org.jf.dexlib.Code.Analysis.ClassPath$UnresolvedClassDef.getClassDept
h(ClassPath.java:450)
at
org.jf.dexlib.Code.Analysis.ClassPath.getCommonSuperclass(ClassPath.j
ava:290)
at
org.jf.dexlib.Code.Analysis.RegisterType.merge(RegisterType.java:261)

    at

org.jf.dexlib.Code.Analysis.AnalyzedInstruction.mergeRegister(Analyze
dInstruction.java:199)
at
org.jf.dexlib.Code.Analysis.MethodAnalyzer.propagateRegisterToSuccess
ors(MethodAnalyzer.java:475)
at
org.jf.dexlib.Code.Analysis.MethodAnalyzer.setPostRegisterTypeAndProp
agateChanges(MethodAnalyzer.java:455)
at
org.jf.dexlib.Code.Analysis.MethodAnalyzer.setDestinationRegisterType
AndPropagateChanges(MethodAnalyzer.java:386)
at
org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyzeIgetWideObject(Meth
odAnalyzer.java:2599)
at
org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyzeInstruction(MethodA
nalyzer.java:803)
at
org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyze(MethodAnalyzer.jav
a:202)
at
org.jf.baksmali.Adaptors.MethodDefinition.getMethodItems(MethodDefini
tion.java:284)
at
org.jf.baksmali.Adaptors.MethodDefinition.createTemplate(MethodDefini
tion.java:126)
at
org.jf.baksmali.Adaptors.ClassDefinition.getTemplatesForMethods(Class
Definition.java:279)
at
org.jf.baksmali.Adaptors.ClassDefinition.getVirtualMethods(ClassDefin
ition.java:267)
at
org.jf.baksmali.Adaptors.ClassDefinition.createTemplate(ClassDefiniti
on.java:76)
at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:137)
at org.jf.baksmali.main.main(main.java:268)
opcode: iget-object
CodeAddress: 26
Method:
Lcom/android/internal/policy/impl/NetworkUnlockScreen$1;->onNetworkLockC
hangedResponse(Z)V

What version of the product are you using? On what operating system?
Baksmali 1.2.1 smali 1.2.1

Windows 7 (administrator mode)

Please provide any additional information below.

Error running under Windows (cr/lf issue)

Original issue 25 created by JesusFreke on 2010-04-20T01:16:21.000Z:

What seems to be the problem?
Getting error when running under Windows.

UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: bad magic value: 64 65 79 0d 0a 30 33 35
at org.jf.dexlib.DexFile.<init>(DexFile.java:382)
at org.jf.baksmali.main.main(main.java:249)

What is the exact smali/baksmali command that you ran?
java -jar baksmali-1.2.2.jar -x file.odex

What version are you using?
1.2.2

Please provide any additional information below: error messages, symptoms,
etc.
Looks like under Windows it's generating crlf (0d 0a) instead of just lf (0a).

NPE when analyzing non-resolvable method.

Original issue 29 created by JesusFreke on 2010-05-14T08:26:25.000Z:

What seems to be the problem?
NPE when analyzing non-resolvable method. Should be ValidationException.

What is the exact smali/baksmali command that you ran?
java -jar baksmali-1.2.2.jar -x CheckinProvider.odex -c
core.odex:framework.odex:ext.odex:services.odex:android.policy.odex

What version are you using?
1.2.2

Fail to deodex services.odex

Original issue 28 created by JesusFreke on 2010-05-12T13:28:12.000Z:

What seems to be the problem?
baksmali errors out while deodexing services.odex

What is the exact smali/baksmali command that you ran?
java -Xmx512m -jar baksmali.jar -x services.odex

What version are you using?
1.2.2

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

Error while disassembling method
Lcom/android/server/ConnectivityService;-><init>(Landroid/content/ContextV.
Continuing.
org.jf.dexlib.Code.Analysis.ValidationException: class
Lcom/htc/connectivity/DummyStateTracker; cannot be resolved.
at org.jf.dexlib.Code.Analysis.ClassPath$UnresolvedCl
assDef.unresolvedValidationException(ClassPath.jav a:535)
at org.jf.dexlib.Code.Analysis.ClassPath$UnresolvedCl
assDef.getClassDepth(ClassPath.java:543)
at org.jf.dexlib.Code.Analysis.ClassPath.getCommonSup
erclass(ClassPath.java:383)
at org.jf.dexlib.Code.Analysis.RegisterType.merge(Reg isterType.java:274)
at org.jf.dexlib.Code.Analysis.AnalyzedInstruction.me
rgeRegister(AnalyzedInstruction.java:199)
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.propaga
teRegisterToSuccessors(MethodAnalyzer.java:479)
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.setPost
RegisterTypeAndPropagateChanges(MethodAnalyzer.jav a:459)
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyze
InvokeDirectCommon(MethodAnalyzer.java:2968)
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyze
InvokeDirectRange(MethodAnalyzer.java:2927)
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyze
Instruction(MethodAnalyzer.java:856)
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyze (MethodAnalyzer.java:202)
at org.jf.baksmali.Adaptors.MethodDefinition.getMetho
dItems(MethodDefinition.java:290)
at org.jf.baksmali.Adaptors.MethodDefinition.writeTo(
MethodDefinition.java:130)
at org.jf.baksmali.Adaptors.ClassDefinition.writeMeth
ods(ClassDefinition.java:322)
at org.jf.baksmali.Adaptors.ClassDefinition.writeDire
ctMethods(ClassDefinition.java:291)
at org.jf.baksmali.Adaptors.ClassDefinition.writeTo(C lassDefinition.java:135)
at org.jf.baksmali.baksmali.disassembleDexFile(baksma li.java:187)
at org.jf.baksmali.main.main(main.java:277)
opcode: invoke-direct/range
CodeAddress: 811
Method:
Lcom/android/server/ConnectivityService;-><init>(Landroid/content/Context;)V

unable to de-odex com.htc.rss.odex

Original issue 31 created by JesusFreke on 2010-06-07T04:21:36.000Z:

What seems to be the problem?
Can't de-odex com.htc.rss.odex

What is the exact smali/baksmali command that you ran?
java -Xmx256m -jar ~/bin/baksmali-1.2.2.jar -x com.htc.rss.odex -o
com.htc.rss.odex.files

What version are you using?
1.22

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

I have tried to include all files within the framework folder and this file
will still not de-odex, I have managed to de-odex all files except this
one,

Error occured while loading boot class path files. Aborting.
org.jf.dexlib.Code.Analysis.ClassPath$ClassNotFoundException: Could not
find interface Lcom/sun/msv/datatype/SerializationContext;
at
org.jf.dexlib.Code.Analysis.ClassPath$ClassDef.loadAllImplementedInterfaces
(ClassPath.java:819)
at
org.jf.dexlib.Code.Analysis.ClassPath$ClassDef.<init>(ClassPath.java:675)
at
org.jf.dexlib.Code.Analysis.ClassPath.loadClassDef(ClassPath.java:280)
at
org.jf.dexlib.Code.Analysis.ClassPath.initClassPath(ClassPath.java:163)
at
org.jf.dexlib.Code.Analysis.ClassPath.InitializeClassPathFromOdex(ClassPath
.java:110)
at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:93)
at org.jf.baksmali.main.main(main.java:277)
Error while loading class Lorg/dom4j/datatype/DatatypeAttribute; from file
com.htc.rss.odex
Error while loading ClassPath class Lorg/dom4j/datatype/DatatypeAttribute;

any help would be appreciated.

Standard Translation Framework

Original issue 27 created by JesusFreke on 2010-04-25T01:49:29.000Z:

Smali/BakSmali, ApkTool, and related systems need to establish a
comprehensive standard data format so that version dependent and host
dependent issues such as android sdk failing to be stable do not effect
the recoverability and portability of existing and future tools. Their
interdependency is obvious and should be merged/standardized, but inline
trace and runtime verification should be handled on-board as should an
api/interface to standard data for visualization and editing. There is no
reason a client wishing to use (restrict) only one application should have
anything else running or accessable on the machine, full decomp-inline-rip-
optimize and rewrite core with tool is an easy target for these projects.

I am more concerned with code audit and on-board compiler and system
visualization especially when the host changes so severely due to
Google/etc's incompetence.

-d, --no-debug-info donesn't work properly

Original issue 37 created by JesusFreke on 2010-06-26T10:36:12.000Z:

This option disables only .parameter info. Doesn't disable .line/.local

$ java -jar baksmali.jar --no-debug-info -d system/framework -o 1 -x system/framework/am.odex
$ java -jar ../bin/baksmali.jar -d system/framework -o 2 -x system/framework/am.odex
$ diff -r 1 2
diff -r 1/com/android/commands/am/Am$InstrumentationWatcher.smali 2/com/android/commands/am/Am$InstrumentationWatcher.smali
27a28
> .parameter
47a49,50
> .parameter "x0"
> .parameter "x1"
59a63,65
> .parameter "name"
> .parameter "resultCode"
> .parameter "results"
218a225,227
> .parameter "name"
> .parameter "resultCode"
> .parameter "results"
372a382
> .parameter "rawMode"
diff -r 1/com/android/commands/am/Am$IntentReceiver.smali 2/com/android/commands/am/Am$IntentReceiver.smali
25a26
> .parameter
42a44,45
> .parameter "x0"
> .parameter "x1"
54a58,63
> .parameter "intent"
> .parameter "rc"
> .parameter "data"
> .parameter "ext"
> .parameter "ord"
> .parameter "sticky"
diff -r 1/com/android/commands/am/Am.smali 2/com/android/commands/am/Am.smali
54a55
> .parameter "x0"
64a66
> .parameter "args"
1046a1049
> .parameter "args"

difficulties de-odexing 1 file

Original issue 20 created by JesusFreke on 2010-03-15T18:13:05.000Z:

I am having issues trying to de-odex one .apk for the Cliq. I run the
following command and get the error at the bottom. i know this is a
bootclass issue. any advice would be greatly appreciated.

command: java -jar baksmali-1.2.1.jar -c :com.motorola.obex.jar -x
blur-services.odex

What version are you using? v1.2.1

Error occured while loading boot class path files. Aborting.
org.jf.dexlib.Util.ExceptionWithContext: Could not find class
Ljavax/servlet/htt
p/HttpServlet;
at
org.jf.dexlib.Code.Analysis.ClassPath.loadClassDef(ClassPath.java:183
)
at org.jf.dexlib.Code.Analysis.ClassPath.access$700(ClassPath.java:42)
at
org.jf.dexlib.Code.Analysis.ClassPath$ClassDef.loadSuperclass(ClassPa
th.java:689)
at
org.jf.dexlib.Code.Analysis.ClassPath$ClassDef.<init>(ClassPath.java:
575)
at
org.jf.dexlib.Code.Analysis.ClassPath.loadClassDef(ClassPath.java:187
)
at
org.jf.dexlib.Code.Analysis.ClassPath.initClassPath(ClassPath.java:80
)
at
org.jf.dexlib.Code.Analysis.ClassPath.InitializeClassPath(ClassPath.j
ava:58)
at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:71)
at org.jf.baksmali.main.main(main.java:268)
Error while loading class Lnet/oauth/signature/Echo; from file
blur-services.ode
x

Problem during smali of Froyo odexes

Original issue 32 created by JesusFreke on 2010-06-09T12:00:41.000Z:

What seems to be the problem?

When recompiling some baksmali'd odexes from Froyo, I get an error as shown below (from Browser odex)

out/com/android/browser/AddBookmarkPage.smali[396,24] mismatched input '..' expecting CLOSE_BRACE/Volumes/ROMraid/working.r16/system/app/out/com/android/browser/AddBookmarkPage.smali[583,24] mismatched input '..' expecting CLOSE_BRACE
out/com/android/browser/BrowserActivity.smali[5673,24] mismatched input '..' expecting CLOSE_BRACE
out/com/android/browser/BrowserProvider.smali[856,23] mismatched input '..' expecting CLOSE_BRACE
com/android/browser/BrowserProvider.smali[2053,23] mismatched input '..' expecting CLOSE_BRACE
com/android/browser/BrowserProvider.smali[2262,23] mismatched input '..' expecting CLOSE_BRACE

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

java -Xmx512m -smali-1.2.3-jar-with-dependencies.jar out -o classes.dex

What version are you using?

r726

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

Build errors on Windows Vista

Original issue 12 created by JesusFreke on 2009-12-31T09:11:06.000Z:

What steps will reproduce the problem?

  1. Install SVN and Maven
  2. Get source code
  3. Do the build

What is the expected output? What do you see instead?

It came out build errors as they are shown in the additional info section.

What version of the product are you using? On what operating system?

Windows Vista 32bit, Java 1.5.22-b3

Please provide any additional information below.

[INFO] [antlr3:antlr {execution: smaliLexer}]
[INFO] ANTLR: Processing source directory C:\android-sdk_r04
\smali\src\smali\src\m
ain\antlr3
ANTLR Parser Generator Version 3.1.3 Mar 17, 2009 19:23:44
org\jf\smali\smaliLexer.g
error(10): internal error: Can't get property javaCompressedTransition
using method get/isJavaCompr
essedTransition from org.antlr.analysis.DFA instance :
java.lang.OutOfMemoryError: Java heap space
java.util.ArrayList.<init>(ArrayList.java:113)
org.antlr.analysis.DFA.getRunLengthEncoding(DFA.java:357)
org.antlr.analysis.DFA.getJavaCompressedTransition(DFA.java:333)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:592)
org.antlr.stringtemplate.language.ASTExpr.invokeMethod(ASTExpr.java:563)
org.antlr.stringtemplate.language.ASTExpr.rawGetObjectProperty
(ASTExpr.java:514)
org.antlr.stringtemplate.language.ASTExpr.getObjectProperty
(ASTExpr.java:416)
org.antlr.stringtemplate.language.ActionEvaluator.attribute
(ActionEvaluator.java:351)
org.antlr.stringtemplate.language.ActionEvaluator.expr
(ActionEvaluator.java:136)
org.antlr.stringtemplate.language.ActionEvaluator.templateApplication
(ActionEvaluator.java:216)
org.antlr.stringtemplate.language.ActionEvaluator.expr
(ActionEvaluator.java:126)
org.antlr.stringtemplate.language.ActionEvaluator.action
(ActionEvaluator.java:84)
org.antlr.stringtemplate.language.ASTExpr.write(ASTExpr.java:148)
org.antlr.stringtemplate.StringTemplate.write(StringTemplate.java:700)
org.antlr.stringtemplate.language.ASTExpr.write(ASTExpr.java:722)
org.antlr.stringtemplate.language.ASTExpr.write(ASTExpr.java:742)
org.antlr.stringtemplate.language.ASTExpr.writeAttribute(ASTExpr.java:659)
org.antlr.stringtemplate.language.ActionEvaluator.action
(ActionEvaluator.java:86)
org.antlr.stringtemplate.language.ASTExpr.write(ASTExpr.java:148)
org.antlr.stringtemplate.StringTemplate.write(StringTemplate.java:700)
org.antlr.stringtemplate.language.ASTExpr.write(ASTExpr.java:722)
org.antlr.stringtemplate.language.ASTExpr.writeAttribute(ASTExpr.java:659)
org.antlr.stringtemplate.language.ActionEvaluator.action
(ActionEvaluator.java:86)
org.antlr.stringtemplate.language.ASTExpr.write(ASTExpr.java:148)
org.antlr.stringtemplate.StringTemplate.write(StringTemplate.java:700)
org.antlr.codegen.CodeGenerator.write(CodeGenerator.java:1278)
org.antlr.codegen.Target.genRecognizerFile(Target.java:94)
org.antlr.codegen.CodeGenerator.genRecognizer(CodeGenerator.java:463)
org.antlr.Tool.generateRecognizer(Tool.java:607)
error(10): internal error: Can't get property javaCompressedTransition
using method get/isJavaCompr
essedTransition from org.antlr.analysis.DFA instance :
java.lang.OutOfMemoryError: Java heap space
java.util.ArrayList.<init>(ArrayList.java:113)
org.antlr.analysis.DFA.getRunLengthEncoding(DFA.java:357)
org.antlr.analysis.DFA.getJavaCompressedTransition(DFA.java:333)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:592)
org.antlr.stringtemplate.language.ASTExpr.invokeMethod(ASTExpr.java:563)
org.antlr.stringtemplate.language.ASTExpr.rawGetObjectProperty
(ASTExpr.java:514)
org.antlr.stringtemplate.language.ASTExpr.getObjectProperty
(ASTExpr.java:416)
org.antlr.stringtemplate.language.ActionEvaluator.attribute
(ActionEvaluator.java:351)
org.antlr.stringtemplate.language.ActionEvaluator.expr
(ActionEvaluator.java:136)
org.antlr.stringtemplate.language.ActionEvaluator.templateApplication
(ActionEvaluator.java:216)
org.antlr.stringtemplate.language.ActionEvaluator.expr
(ActionEvaluator.java:126)
org.antlr.stringtemplate.language.ActionEvaluator.action
(ActionEvaluator.java:84)
org.antlr.stringtemplate.language.ASTExpr.write(ASTExpr.java:148)
org.antlr.stringtemplate.StringTemplate.write(StringTemplate.java:700)
org.antlr.stringtemplate.language.ASTExpr.write(ASTExpr.java:722)
org.antlr.stringtemplate.language.ASTExpr.write(ASTExpr.java:742)
org.antlr.stringtemplate.language.ASTExpr.writeAttribute(ASTExpr.java:659)
org.antlr.stringtemplate.language.ActionEvaluator.action
(ActionEvaluator.java:86)
org.antlr.stringtemplate.language.ASTExpr.write(ASTExpr.java:148)
org.antlr.stringtemplate.StringTemplate.write(StringTemplate.java:700)
org.antlr.stringtemplate.language.ASTExpr.write(ASTExpr.java:722)
org.antlr.stringtemplate.language.ASTExpr.writeAttribute(ASTExpr.java:659)
org.antlr.stringtemplate.language.ActionEvaluator.action
(ActionEvaluator.java:86)
org.antlr.stringtemplate.language.ASTExpr.write(ASTExpr.java:148)
org.antlr.stringtemplate.StringTemplate.write(StringTemplate.java:700)
org.antlr.codegen.CodeGenerator.write(CodeGenerator.java:1278)
org.antlr.codegen.Target.genRecognizerFile(Target.java:94)
org.antlr.codegen.CodeGenerator.genRecognizer(CodeGenerator.java:463)
org.antlr.Tool.generateRecognizer(Tool.java:607)

[INFO] --------------------------------------------------------------------

[ERROR] BUILD ERROR

[INFO] --------------------------------------------------------------------

[INFO] ANTLR caught 2 build errors.

[INFO] --------------------------------------------------------------------

[INFO] For more information, run Maven with the -e switch

[INFO] --------------------------------------------------------------------

[INFO] Total time: 34 seconds
[INFO] Finished at: Thu Dec 31 01:06:00 PST 2009
[INFO] Final Memory: 63M/63M

[INFO] --------------------------------------------------------------------

Lower/uppercase of files with very short names are not correctly handeled

Original issue 35 created by JesusFreke on 2010-06-21T00:26:25.000Z:

What seems to be the problem?

Lower/uppercase of files with very short names are not correctly handeled.

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

see below

What version are you using?

Java(TM) SE Runtime Environment (build 1.6.0_19-b04)
Java HotSpot(TM) Client VM (build 16.2-b04, mixed mode, sharing)

and smali/baksmali 1.2.3

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

I deodexed MediaUploader.odex from a desire rom:
java -jar baksmali-1.2.3.jar -d framework -x MediaUploader.odex

outdir:
21.06.2010 02:00 9.114 A.smali
21.06.2010 02:00 2.399 aa.smali
21.06.2010 02:00 6.399 aB.smali
21.06.2010 02:00 1.398 aC.smali
21.06.2010 02:00 223 aD.smali
21.06.2010 02:00 1.713 aE.smali
21.06.2010 02:00 192 aF.smali
21.06.2010 02:00 930 aG.smali
...

This is correct!

Then I smali´d the outdir to produce out.dex:
java -jar smali-1.2.3.jar out

Then I baksmali´d out.dex again, because it produced tons of java exceptions on my device:
java -jar baksmali-1.2.3.jar out.dex

outdir:
21.06.2010 01:56 9.114 a.smali
21.06.2010 01:56 2.399 aA.smali
21.06.2010 01:56 6.399 ab.smali
21.06.2010 01:56 1.398 ac.smali
21.06.2010 01:56 223 ad.smali
21.06.2010 01:56 1.713 ae.smali
21.06.2010 01:56 192 af.smali
21.06.2010 01:56 930 ag.smali

Files with longer names seem not affected (e.g. ConnectivityBroadcastReceiver.smali).

Warnings throwed on first boot

Original issue 38 created by JesusFreke on 2010-06-30T02:47:40.000Z:

After successfully had deodexed a full HTC Sense rom, it runs but throws warnings in logcat. I wonder if I have done something wrong, if the warnings can be safly ignored or anything. Here is a preview:

D/dalvikvm( 88): DEX prep '/system/framework/services.jar': unzip in 561ms, rewrite 3573ms

D/dalvikvm( 88): DexOpt: --- BEGIN 'com.htc.framework.jar' (bootstrap=1) ---

D/dalvikvm( 136): DexOpt: 'Lcom/htc/R$dimen;' has an earlier definition; blocking out

D/dalvikvm( 136): DexOpt: 'Lcom/htc/R$style;' has an earlier definition; blocking out

D/dalvikvm( 136): DexOpt: 'Lcom/htc/R$integer;' has an earlier definition; blocking out

D/dalvikvm( 136): DexOpt: 'Lcom/htc/R$styleable;' has an earlier definition; blocking out

D/dalvikvm( 136): DexOpt: 'Lcom/htc/R$layout;' has an earlier definition; blocking out

D/dalvikvm( 136): DexOpt: 'Lcom/htc/R$id;' has an earlier definition; blocking out

D/dalvikvm( 136): DexOpt: 'Lcom/htc/R$array;' has an earlier definition; blocking out

D/dalvikvm( 136): DexOpt: 'Lcom/htc/R;' has an earlier definition; blocking out

D/dalvikvm( 136): DexOpt: 'Lcom/htc/R$color;' has an earlier definition; blocking out

D/dalvikvm( 136): DexOpt: 'Lcom/htc/R$attr;' has an earlier definition; blocking out

D/dalvikvm( 136): DexOpt: 'Lcom/htc/R$drawable;' has an earlier definition; blocking out

D/dalvikvm( 136): DexOpt: 'Lcom/htc/R$raw;' has an earlier definition; blocking out

D/dalvikvm( 136): DexOpt: 'Lcom/htc/R$anim;' has an earlier definition; blocking out

D/dalvikvm( 136): DexOpt: 'Lcom/htc/R$string;' has an earlier definition; blocking out

D/dalvikvm( 136): DexOpt: not verifying 'Lcom/htc/R$dimen;': multiple definitions

D/dalvikvm( 136): DexOpt: not verifying 'Lcom/htc/R$style;': multiple definitions

D/dalvikvm( 136): DexOpt: not verifying 'Lcom/htc/R$integer;': multiple definitions

D/dalvikvm( 136): DexOpt: not verifying 'Lcom/htc/R$styleable;': multiple definitions

D/dalvikvm( 136): DexOpt: not verifying 'Lcom/htc/R$layout;': multiple definitions

I/dalvikvm( 136): DexOpt: not resolving ambiguous class 'Lcom/htc/R$styleable;'

I/dalvikvm( 136): DexOpt: not resolving ambiguous class 'Lcom/htc/R$styleable;'

D/dalvikvm( 136): DexOpt: not verifying 'Lcom/htc/R$id;': multiple definitions

D/dalvikvm( 136): DexOpt: not verifying 'Lcom/htc/R$array;': multiple definitions

D/dalvikvm( 136): DexOpt: not verifying 'Lcom/htc/R;': multiple definitions

D/dalvikvm( 136): DexOpt: not verifying 'Lcom/htc/R$color;': multiple definitions

D/dalvikvm( 136): DexOpt: not verifying 'Lcom/htc/R$attr;': multiple definitions

D/dalvikvm( 136): DexOpt: not verifying 'Lcom/htc/R$drawable;': multiple definitions

I/dalvikvm( 136): DexOpt: not resolving ambiguous class 'Lcom/htc/R$styleable;'

I/dalvikvm( 136): DexOpt: not resolving ambiguous class 'Lcom/htc/R$styleable;'

I/dalvikvm( 136): DexOpt: not resolving ambiguous class 'Lcom/htc/R$styleable;'

D/dalvikvm( 136): DexOpt: not verifying 'Lcom/htc/R$raw;': multiple definitions

D/dalvikvm( 136): DexOpt: not verifying 'Lcom/htc/R$anim;': multiple definitions

D/dalvikvm( 136): DexOpt: not verifying 'Lcom/htc/R$string;': multiple definitions

D/dalvikvm( 136): DexOpt: load 510ms, verify 3423ms, opt 187ms

D/dalvikvm( 88): DexOpt: --- END 'com.htc.framework.jar' (success) ---

D/installd( 91): DexInv: --- BEGIN '/system/framework/com.google.android.maps.jar' ---

I/Mp3HwPlayer( 89): result:0

E/Mp3HwPlayer( 89): seekTo() : position == 0

E/Mp3HwPlayer( 89): seekTo() : mMp3Type == MP3_CBR

E/Mp3HwPlayer( 89): Mp3HwPlayer::seekTo seekPointByte:0, result:0

E/Mp3HwPlayer( 89): render() : NO LOOP!

D/Mp3HwPlayer( 89): ID:1, close AudioStream

E/Mp3HwPlayer( 89): ID:1, close AudioStream Pass Mutex

E/Mp3HwPlayer( 89): ID:1, close AudioStream 1

I/AudioHardwareMSM72XX( 89): closeOutputStream. out->format()=16777216

I/AudioHardwareMSM72XX( 89): AudioHardware MP3 playback is going to standby.

E/Mp3HwPlayer( 89): render(): 1038, numread:0

I/AudioPolicyService( 89): stopOutput(): before lock

E/Mp3HwPlayer( 89): ~IsMusicActiveHandler: removeMusicActiveCounter()

D/dalvikvm( 162): DexOpt: 'Lcom/google/i18n/LineBreakingProperties;' has an earlier definition; blocking out

D/dalvikvm( 162): DexOpt: 'Lcom/google/debug/DebugUtil;' has an earlier definition; blocking out

D/dalvikvm( 162): DexOpt: not verifying 'Lcom/google/i18n/LineBreakingProperties;': multiple definitions

D/dalvikvm( 162): DexOpt: not verifying 'Lcom/google/debug/DebugUtil;': multiple definitions

D/dalvikvm( 162): DexOpt: load 425ms, verify 2292ms, opt 39ms

D/installd( 91): DexInv: --- END '/system/framework/com.google.android.maps.jar' (success) ---

Missing util artifact org.jf:util:jar:1.2.1

Original issue 23 created by JesusFreke on 2010-03-25T07:33:35.000Z:

Small addition to the maven build instructions is necessary:

[INFO] Building Unnamed - org.jf:smali:jar:1.2.1
[INFO] ------------------------------------------------------------------------
Downloading: http://repo1.maven.org/maven2/org/jf/util/1.2.1/util-1.2.1.pom
[INFO] Unable to find resource 'org.jf:util:pom:1.2.1' in repository
central (http://repo1.maven.org/maven2)
Downloading: http://repo1.maven.org/maven2/org/jf/util/1.2.1/util-1.2.1.jar
[INFO] Unable to find resource 'org.jf:util:jar:1.2.1' in repository
central (http://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

Missing:

  1. org.jf:util:jar:1.2.1

To find org.jf:util:jar:1.2.1 apply the following:

cd smali/util
mvn install

too.

bootclasspath - /system/app/gtalkservice.odex de-odex error

Original issue 13 created by JesusFreke on 2010-01-01T04:37:22.000Z:

What steps will reproduce the problem?

  1. De-odex /system/framework/com.google.android.gtalkservice.odex first
  2. De-odex /system/app/gtalkservice.odex, and got dependence errors even
    if "-Xbootclasspath/a:.\framework\gtalkservice" is used.

What is the expected output? What do you see instead?

Please see errors in the additional section below.

What version of the product are you using? On what operating system?
Windows Vista 32, JDK 1.6.17, ADP2/Sapphire phone.

Please provide any additional information below.

C:\android-sdk_r04\recovery\smali>java -
Xbootclasspath/a:.\framework\gtalkservice -Xss1m -X
mx512M -jar baksmali.jar -x :1234 app\gtalkservice\gtalkservice.odex

UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: java.lang.RuntimeException: class
Lcom/google/android/gtalkservice/Group
ChatInvitation; could not be found for common superclass lookup. This can
be caused if a library the
odex depends on is not in the BOOTCLASSPATH environment variable
at org.jf.dexlib.Util.Deodexerant.sendCommand(Deodexerant.java:193)
at org.jf.dexlib.Util.Deodexerant.lookupCommonSuperclass
(Deodexerant.java:167)
at org.jf.dexlib.Util.DeodexUtil$insn.findCommonSuperclass
(DeodexUtil.java:1241)
at org.jf.dexlib.Util.DeodexUtil$insn.propagateRegisters
(DeodexUtil.java:1412)
at org.jf.dexlib.Util.DeodexUtil$insn.propagateRegisters
(DeodexUtil.java:1466)
at org.jf.dexlib.Util.DeodexUtil$insn.propagateRegisters
(DeodexUtil.java:1466)
at org.jf.dexlib.Util.DeodexUtil$insn.propagateRegisters

.....................

(DeodexUtil.java:1466)
at org.jf.dexlib.Util.DeodexUtil$insn.propagateRegisters
(DeodexUtil.java:1466)
at org.jf.dexlib.Util.DeodexUtil.makeInsnList(DeodexUtil.java:188)
at org.jf.dexlib.Util.DeodexUtil.deodexerizeCode
(DeodexUtil.java:194)
at
org.jf.baksmali.Adaptors.MethodDefinition$MethodItemList.generateMethodItem
List(MethodDef
inition.java:207)
at org.jf.baksmali.Adaptors.MethodDefinition.getMethodItems
(MethodDefinition.java:158)
at org.jf.baksmali.Adaptors.MethodDefinition.makeTemplate
(MethodDefinition.java:62)
at org.jf.baksmali.Adaptors.ClassDefinition.getDirectMethods
(ClassDefinition.java:255)
at org.jf.baksmali.Adaptors.ClassDefinition.makeTemplate
(ClassDefinition.java:75)
at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:120)
at org.jf.baksmali.main.main(main.java:198)
Caused by: java.lang.RuntimeException: class
Lcom/google/android/gtalkservice/GroupChatInvitation; c
ould not be found for common superclass lookup. This can be caused if a
library the odex depends on
is not in the BOOTCLASSPATH environment variable
at org.jf.dexlib.Util.Deodexerant.sendCommand(Deodexerant.java:189)
... 104 more

Issue when using baksmali-1.2.1-beta.jar on the .odex files in the /app folder.

Original issue 18 created by JesusFreke on 2010-03-05T06:50:25.000Z:

What steps will reproduce the problem?
1.java -jar baksmali-1.2.1-beta.jar -o AccountManager/ -x AccountManager.odex
2.
3.

What is the expected output? What do you see instead?
Should create a folder with the odex output.

Error occured while loading boot class path files. Aborting.
org.jf.dexlib.Util.ExceptionWithContext: Could not find class
Lcom/htc/widget/HtcAdapterView$OnItemClickListener;
at org.jf.dexlib.Code.Analysis.ClassPath.loadClassDef(ClassPath.java:183)
at org.jf.dexlib.Code.Analysis.ClassPath.access$700(ClassPath.java:42)
at
org.jf.dexlib.Code.Analysis.ClassPath$ClassDef.loadAllImplementedInterfaces(ClassPath.java:721)
at org.jf.dexlib.Code.Analysis.ClassPath$ClassDef.<init>(ClassPath.java:582)
at org.jf.dexlib.Code.Analysis.ClassPath.loadClassDef(ClassPath.java:187)
at org.jf.dexlib.Code.Analysis.ClassPath.initClassPath(ClassPath.java:80)
at
org.jf.dexlib.Code.Analysis.ClassPath.InitializeClassPath(ClassPath.java:58)
at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:71)
at org.jf.baksmali.main.main(main.java:268)
Error while loading class
Lcom/htc/socialnetwork/accountmanager/AccountManager; from file
AccountManager.odex

What version of the product are you using? On what operating system?
baksmali-1.2.1-beta.jar on Ubuntu 9.10

Please provide any additional information below.

unexpected top level exception

Original issue 6 created by JesusFreke on 2009-09-01T16:52:47.000Z:

What steps will reproduce the problem?
mac os 10.4 java 5 //no java 6 for 10.4 :(//
use baksmali on the classes.dex from phone.apk

instead of output i get;

UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: The magic value is not the expected value
at org.jf.dexlib.HeaderItem.readItem(HeaderItem.java:72)
at org.jf.dexlib.Item.readFrom(Item.java:71)
at org.jf.dexlib.DexFile.<init>(DexFile.java:273)
at org.jf.baksmali.main.main(main.java:140)

using the latest version .95

i had used baksmali once before on the dex from mms.apk, i seem to feel
there was an issue then as well but it was overcome. unfortunately i can
not remember.

Does latest version support services.jar/odex in Donut-Ion builds?

Original issue 14 created by JesusFreke on 2010-01-27T02:46:28.000Z:

What steps will reproduce the problem?

  1. Use a Donut-Ion build (Example: Amon_RA's RAz build)
  2. adb pull both services.jar and services.odex from /framework
  3. DeOdex by the following:

adb shell /data/local/deodexerant /system/framework/services.odex 1234 &
java -jar baksmali.jar -o output/services.odex/out/ -x :1234 services.odex
java -Xmx512M -jar smali.jar output/services.odex/out/ -o
output/services.odex/classes.dex
adb shell killall deodexerant && clear && echo Done Processing services.odex

  1. open services.jar up and copy generated services classes.dex into root
    of jar
  2. adb shell mount -o remount,rw /system
    6, adb shell in and rm services.* from /framework
  3. adb push new services.jar
  4. adb shell mount -o remount,rw /system
    9 reboot phone
  5. Notice phone halts at boot screen
  6. Restart from scratch (hard reset) and same results

Things to note: /system/framework contains other odex files as well. Do
all of the odex files have to be deodexed?

The reason I ask this question is because my rom (Donut-Ion base) is 99%
themed except for the date and time text color which looks invisible
(black) on a black background:

http://i216.photobucket.com/albums/cc41/mynym/vogue-android/Warm%20Donut/HomeScreenGoogleClockWidgets.png

Thanks again

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.

Can't baksmali Froyo odexes

Original issue 30 created by JesusFreke on 2010-05-22T21:47:53.000Z:

$ baksmali core.odex

UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: bad magic value: 64 65 79 0a 30 33 36 00
at org.jf.dexlib.DexFile.<init>(DexFile.java:382)
at org.jf.baksmali.main.main(main.java:249)
$ baksmali -v
baksmali 1.2.2 (http://smali.googlecode.com)
Copyright (C) 2010 Ben Gruver ([email protected])
BSD license (http://www.opensource.org/licenses/bsd-license.php)

I've tried several odexes from Nexus's Froyo - exactly the same error for
every file. I'm attaching core.odex .

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.