Sunday, November 20, 2011

smali/baksmali 1.3.0

smali/baksmali 1.3.0 is out! This version now supports Honeycomb and Ice Cream Sandwich

There are a few changes and new features you should be aware of. 

--api-level/-a option

Both smali and baksmali have a new --api-level/-a option. For smali, this ensures that the dex file that smali generates will be compatible with the specified platform. For baksmali, this is primarily needed while deodexing.

Specifically, when deodexing a Honeycomb or earlier odex file, you must specify an api level.

New ICS opcodes

ICS brings a slew of new "jumbo" opcodes. These opcodes accept a 32-bit method/field/class reference, rather than the 16-bit reference that is used everywhere else. This eliminates the earlier restriction of 64k method or field references. However, there can still only be 64k referenced classes, due to other constraints in the dex file format.

A list of the new jumbo opcodes can be found in the dalvik-bytecode.html document in the dalvik project in aosp (dalvik/docs/dalvik-bytecode.html). Unfortunately, the online document at has not been updated for ICS yet.

Custom inline tables for deodexing

baksmali now allows you to specify a custom inline method table to use while deodexing. There have been some reports of versions of dalvik that are using a non-standard inline table. This will allow baksmali to be able to deodex odex files from these platforms.

In order to use this feature, you must first dump the inline table from the device. I have written a small native utility to do this. You can find the source here. (I am not planning on distributing a prebuilt binary of this tool)

You can dump the results of this tool to a file and then use the -T option to tell baksmali to use the custom inline table.

As always, you can find the latest versions at


  1. Thank you very much for the update! Works great!

  2. Great! Glad it worked for you. Thanks for the feedback :)

  3. Eagerly awaited!
    Thanks very much for this wonderful tool! :-)

  4. hi JesusFreke , where could I contact you, do you have an email?

  5. It's fairly easy to find my email. Look on, or smali -v ;)


Note: Only a member of this blog may post a comment.