commit | 49ecdb334b1eddaa8d8d8be123b322da56caf65e | [log] [tgz] |
---|---|---|
author | Albert Gorski <sagorski@ncsu.edu> | Fri Jul 06 15:28:57 2018 -0400 |
committer | Ben Gruver <jesusfreke@jesusfreke.com> | Wed Jul 11 13:43:01 2018 -0700 |
tree | 14ae3d532ac1f2eca490a24316e81c8ab07c6740 | |
parent | 5a6b891ef0fd909d5cbde705cfb323fa6c497c78 [diff] |
Fix instructions 45cc and 4rcc (invoke-polymorphic) Previously the offset of the method prototype was 3 bytes from the instruction start for both instructions. This would put it somewhere in the middle of the register values and method reference. Changed it to the correct offset which is 6 bytes in both cases. 45cc Instruction Format op(8 bits) number_of_regs(4 bits) reg_g(4 bits) method_reference(16 bits) reg_d(4 bits) reg_c(4 bits) reg_f(4 bits) ref_e(4 bits) method_prototype(16 bits) Example of invoke-polymorphic using 45cc Instruction: fa302f0021030800 DexDump: invoke-polymorphic {v1, v2, v3}, Ljava/lang/invoke/MethodHandle; .invoke:([Ljava/lang/Object;)Ljava/lang/Object;, (II)Ljava/lang/Object; // method@002f, proto@0008 4rcc Instruction Format op(8 bits) number_of_regs(8 bits) method_reference(16 bits) start_register(16 bits) method_prototype(16 bits) Example of invoke-polymorphic using 4rcc Instruction: fb092f0000000800 DexDump: invoke-polymorphic/range {v0, v1, v2, v3, v4, v5, v6, v7, v8}, Ljava/lang/invoke/MethodHandle;.invoke:([Ljava/lang/Object;) Ljava/lang/Object;, (IIIIIIILjava/lang/String;)Ljava/lang/Object; // method@002f, proto@0008
smali/baksmali is an assembler/disassembler for the dex format used by dalvik, Android's Java VM implementation. The syntax is loosely based on Jasmin's/dedexer's syntax, and supports the full functionality of the dex format (annotations, debug info, line info, etc.)
Downloads are at https://bitbucket.org/JesusFreke/smali/downloads/. If you are interested in submitting a patch, feel free to send me a pull request here.
See the wiki for more info/news/release notes/etc.