Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

dalvik bytecode optimization method based on memory loading

A technology of memory loading and optimization methods, which is applied in the direction of program loading/starting, code compiling, program code conversion, etc., which can solve the problems of increasing the risk of being cracked and reducing the efficiency of program startup, so as to improve the attack resistance and startup efficiency effect

Active Publication Date: 2020-04-28
SICHUAN CHANGHONG ELECTRIC CO LTD
View PDF3 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

First of all, the decrypted dex file needs to be stored in a specific directory, which increases the risk of being cracked
Secondly, first decrypt the dex of the source program, and then use DexClassLoader to load it, which is equivalent to loading the dex into the memory twice when decrypting and loading the original dex, which greatly reduces the startup efficiency of the program

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • dalvik bytecode optimization method based on memory loading
  • dalvik bytecode optimization method based on memory loading

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0030] The present invention will be further elaborated below in conjunction with the accompanying drawings.

[0031] A dalvik bytecode optimization method based on memory loading, which includes the following steps:

[0032] Step 1, read the encrypted DEX file, decrypt and decompress it, and save the decrypted and decompressed DEX file in the stack memory in the form of bytecode;

[0033] In step 1, the local method is called at the java layer to decrypt and decompress the DEX file.

[0034] Step 2: Use reflection to call the openDexFile method of DexFile, parse the DEX file bytecode in step 1 to obtain a DexOrJar structure, load the content of the DexOrJar structure into the hash table of the userDexFile structure in gDvm, and finally return to store the DEX file The pointer to the DexOrJar structure of the information, recorded as the cookie value;

[0035] The cookie value obtained in step 2 is the value corresponding to the loaded dex, which can be used later to access ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method for optimizing dalvik byte codes on the basis of memory loading. The method includes steps of 1, decrypting and decompressing read encrypted DEX (developing excellence) files and then storing the decrypted and decompressed DEX files in stack memories in byte code forms; 2, parsing byte codes of the DEX files obtained at the step 1 by the aid of openDexFile processes for reflecting and invoking DexFile to obtain a DexOrJar structures, loading contents of the DexOrJar structure into hash tables of userDexFile structures in gDvm, returning DexOrJar structure pointers with stored DEX file information and denoting the DexOrJar structure pointers as cookie values; 3, defining local processes loadDex and transmitting byte arrays and byte sizes of the DEX files; 4, rewriting class loaders and loading specified classes. The method has the advantages that the DEX files are decrypted, decompressed, stored and loaded in the memories in the byte code forms all along after being read, encrypted and compressed, and can be protected to a great extent, and accordingly the anti-attack performance of reinforced APK (Android packages) can be improved.

Description

technical field [0001] The invention relates to the field of mobile terminal application security, in particular to a dalvik bytecode optimization method based on memory loading. Background technique [0002] According to the latest sales statistics of smart terminals, China's Android system has occupied more than 73% of the mobile terminal market share, and various Android applications are also growing exponentially and involving more and more businesses, covering entertainment, payment, life, etc. each field. Since the language used by the android platform software is JAVA, and the binary code compiled from the JAVA source code is very easy to be decompiled, the android application program is easily damaged by hackers through secondary packaging, tampering, malicious injection and other means. Therefore, application security issues have become a hot spot for developers / publishers / users. [0003] At present, the mainstream application software hardening measures in the ma...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F9/445G06F8/41G06F8/30
CPCG06F8/315G06F8/443G06F9/44521
Inventor 翟栋谭源泉康红娟邓密密
Owner SICHUAN CHANGHONG ELECTRIC CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products