While the application is started, the dex file will be parsed
to binary code and mapped to memory which can be executed
by Dalvik. First the parse program will check magic bytes, if it
is not same to “dex” or “dey”, it will regard it is an illegal file
and exit parse. Secondly it will re-calculate checksum and
compare with the original one, only they are the same the
process will continue, if not exit parse. After validate, the parse
process will compute class’s address and load them to
corresponding memory location, then generate an index table
of classes.