Closed GoogleCodeExporter closed 9 years ago
The data that the dex file represents should be exactly the same as the
original dex file. However, the actual binary representation may be different.
This is due to a couple of different factors, that, when taken together,
compound each other to cause significant differences in the dex file.
A dex file is made up of a number of different sections, which contain items of
a particular type. Some sections are indexed sections, in which the items have
a consistent size are referred to by an index, and in which the order of the
items is completely specified. In addition, there are a number of sections
where the item size is variable, and items within the section are referred to
by an absolute offset from the start of the file.
One possible difference is that the non-indexed sections may be in any order.
In addition, the items in these sections may also be in any order typically.
And then, to exacerbate the problem, wherever an item is referenced by an
absolute offset from the start of the file, this offset is encoded with a
variable size encoding. So the length of equivalent items in the 2 dex files
might be different, depending on the number of bytes required to encode the
absolute offsets that are used in that item.
Original comment by jesusfreke@jesusfreke.com
on 11 Oct 2011 at 5:44
Original issue reported on code.google.com by
zhengmin...@gmail.com
on 11 Oct 2011 at 4:19