JesusFreke / smali

smali/baksmali
6.29k stars 1.07k forks source link

Support Android 11 (dex 039) #798

Open kiber-io opened 3 years ago

kiber-io commented 3 years ago

Hi! I'm trying to disassemble framework.jar, but got a lot of errors:

On the disassemble stage: (java -jar baksmali.jar d -a 30 classes.dex)

java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1 at org.jf.dexlib2.HiddenApiRestriction.getAllFlags(HiddenApiRestriction.java:111) at org.jf.dexlib2.dexbacked.DexBackedMethod.getHiddenApiRestrictions(DexBackedMethod.java:204) at org.jf.baksmali.Adaptors.MethodDefinition.writeTo(MethodDefinition.java:196) at org.jf.baksmali.Adaptors.ClassDefinition.writeVirtualMethods(ClassDefinition.java:327) at org.jf.baksmali.Adaptors.ClassDefinition.writeTo(ClassDefinition.java:113) at org.jf.baksmali.Baksmali.disassembleClass(Baksmali.java:152) at org.jf.baksmali.Baksmali.access$000(Baksmali.java:46) at org.jf.baksmali.Baksmali$1.call(Baksmali.java:76) at org.jf.baksmali.Baksmali$1.call(Baksmali.java:74) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) at java.base/java.lang.Thread.run(Thread.java:832)

And this on assemble stage: _(java -jar smali.jar a -a 30 out -o classesnew.dex)

out\com\android\internal\widget\EditableInputConnection.smali[36,8] no viable alternative at input ''

Here is ALL disassembled file:

EditableInputConnection.txt

Also, sometimes there are such errors: out\org\chromium\arc\EventLogTags.smali[11,28] Hidden API restrictions are only supported on api 29 and above

out\com\google\android\util\SmileyParser.smali[12,15] mismatched tree node: I_ORDERED_METHOD_ITEMS expecting I_FIELDS

In general, it is unrealistic to work like this. It is simply unrealistic to build a working dex. Please, PLEASE, fix it! :c

kiber-io commented 3 years ago

classes.dex -> classes.zip

JesusFreke commented 3 years ago

I think this should all be working now in v2.5.2

behind80 commented 2 years ago

I think this should all be working now in v2.5.2

java -jar smali-2.5.2.jar as out2 -o classes2.dex error: Hidden API restrictions are only supported on api 29 and above. dex file is not create......... :(
android10