How to check if the Dalvik cache has changed

So there are some tools out there that fix the Dalvik app cache to remove copy protection - is there really a way to check the dalvik cache?

Is it just the DEX file that is being copied, and if so, does it still have a checksum? And is it possible for a non-root app to get a checksum?

+3


source to share


2 answers


The files in the dalvik cache are not dex source files - they are odex (dex optimized) files. When the application is installed, its dex file is extracted, and then dalvik runs an optimization package on it and stores the result in the dalvik cache.

The directory permissions in the dalvik cache directory will prevent a non-system application from listing the contents of the directory, but the execute permission is set and the odex files themselves are world readable, so the application can access them if it knows their filename.



However, it would be difficult to verify the integrity of the odex file because they are potentially different on each device. Thus, you won't be able to perform a simple checksum check.

I assume you will need to do a deep comparison of the dex file structures and compare them to the original dex file. If you want to be sure, you need to de-odex create an odex file first and then compare the result with the original dex file.

+4


source


I think you can call the dexopt

process (directly in the device) and compare the newly generated dex with the one in the dalvik cache, of course if your cached file is modified this change can disable the check. The author of the lucky patcher suggested loading external code from assets and then executing it, but this will not be 100% easy and efficient



+1


source







All Articles