Set the location checksum in vdex.
The checksum we check against at runtime isn't the dex checksum
if we are compiling a jar/apk, but the crc32 of the entry.
This is to optimize the check at startup and avoid reading the
contents of the zip file.
Because with vdex we do not want to open the zip file, (the test
has been done already in getDexOptNeeded), and cannot rely
on the .oat file for fetching it, put the location checksum in
the vdex directly.
Note for later refactorings: the dex checksum location is now
in the vdex file, but also in the oat file. This can be revisited
after we eventually cleanup OatDexFile.
Test: 629-vdex
bug: 30937355
Change-Id: I7af8ca63b889370c660d694dd4eb95e78f566a1c
8 files changed