Interpreting the Dalvik bytecode

You may know by now that the Dalvik VM is slightly different in structure and operation as compared to the Java VM; its file and instruction formats are different. The Java VM is stack-based, meaning bytecode (the code format is named this way because instructions are each a byte long) works by push and popping instruction on and off a stack. The Dalvik bytecode is designed to resemble the x86 instructions sets; it also uses a somewhat C-style calling convention. You'll see in a moment how each calling method is responsible for setting up the arguments before making calls to another method. For more details on the design and general caveats of the Dalvik code format, refer to the entry named General Design—Bytecode ...

Get Android Security Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.