Skip to content

JMUATANTUM/SourceCodeValidation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SourceCodeValidation

Integrity checking of android classes.dex and APK Package

How to use:

Check the integrity of classes.dex file with crc32 with checkDexCrcValue() (1) First, the code of calculating its own hash value in apk is implemented. (2) Calculate the hash value of our apk with the sha1sum command under ( for example) Linux. The commands are as follows: shasum verification.apk

Save the hash value generated in (2) to the blockchain, and then get the integrity comparison from the blockchain in our code.

We use checkDexCrcValue() method of calculating crc32 and hash value to check the classes.dex file and the integrity of the whole apk respectively. Of course, the two methods can also be used interchangeably.

Integrity check is that we use various algorithms to calculate the integrity of a file to prevent the file from being modified. The common method is to calculate the CRC32 value of a file or the hash value of a file. We can also use this method to prevent APK from being decompiled. We know that classes.dex generated by APK is mainly generated by Java files. It is the logical implementation of the whole apk. So we can check the integrity of the classes.dex file to ensure that the logic of the whole program is not modified. If we want to ensure the integrity of the entire apk file, we can also check the integrity of the entire apk file. Next, we implement the integrity checking of classes.dex file and APK file respectively.

About

Integrity checking of android classes.dex and APK Package

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages