The invention discloses an
Android application program protection method based on Dex2C and LLVM. The method comprises the following steps: decompressing an APK to obtain and analyze a Dex file, obtaining all necessary information, capable of recovering C codes, of each
assembly instruction; selecting whether to carry out Dex2C conversion or not according to the evaluation model, and if the Dex2C conversion exceeds a threshold value, carrying out Dex2C conversion: carrying out conversion preprocessing operation, including searching a to-be-protected method, inserting
assembly instruction statements, establishing an
adjacency relation of instructions and the like, and selecting one of the three sets of conversion logics one by one according to the type of the
assembly instruction to carry out conversion; achieving
virtualization during compiling based on the LLVM, and if the threshold value is not exceeded, executing an LLVM compiling
virtualization module directly; after the So file is generated through the framework,
repackaging and signing are carried out, and generating the APK with the
equivalent function. According to the invention, the protection methods of the Dex layer and the local layer are combined, on one hand, the execution efficiency of the APK can be improved, and on the other hand, the
attack difficulty and cost of malicious attackers are greatly improved.