Unlock instant, AI-driven research and patent intelligence for your innovation.

A method and device for dynamically loading dex in Android art environment

A technology of dynamic loading and environment, applied in the direction of program control device, program loading/starting, instrument, etc., can solve the problem of inapplicability of the dex file scheme, and achieve the effect of reducing workload and ensuring accuracy

Active Publication Date: 2020-02-25
BEIJING QIHOO TECH CO LTD +1
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, after the Android art environment came out, the original scheme of dynamically loading dex files in the Android Dalvik environment is no longer applicable, and a new scheme is needed to dynamically load dex files.

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
  • A method and device for dynamically loading dex in Android art environment
  • A method and device for dynamically loading dex in Android art environment
  • A method and device for dynamically loading dex in Android art environment

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0037]The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

[0038] figure 1 A schematic flow diagram of a method for dynamically loading dex in an Android art environment provided in an embodiment of the present invention is shown. It can be seen from the figure that the method includes the following steps:

[0039] Step S100: call the dex file parsing and loading function of the operating system in the art environment to complete the underlying parsing and loading of the dex file to be loaded, and obtain the memory add...

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 embodiment of the invention discloses a method and device for dynamically loading dex in an android art environment, and belongs to the technical field of mobile terminal applications. The method comprises the following steps of: calling a dex file analyzing and loading function DexFile::OpenMemory of an operating system in the android art environment, and completing underlying analyzing and loading of a dex file to be loaded, so that the memory address of the loaded dex file is obtained; newly creating an upper dex file object, assigning the memory address of the dex file completing underlying loading to a variable cookie of the upper dex file object, and inserting the upper dex file object in a dex file array dexElements by taking the upper dex file object as the element of the dex file array dexElements in a dex path information list object pathList of a dex-class loader BaseDexClassLoader; and completing dynamic loading of the dex file corresponding to the element in the dex file array dexElements through the dex-class loader BaseDexClassLoader. By means of the scheme provided in the embodiment of the invention, dynamic loading of the dex file in the android art environment can be realized; and the problem that a scheme for dynamically loading dex files in a dalvik environment currently is not suitable for an art environment can be solved.

Description

technical field [0001] The invention relates to the technical field of mobile terminal applications, in particular to a method and device for dynamically loading dex in an Android art environment. Background technique [0002] Dalvik is a virtual machine for the Android platform and is one of the core components of the Android mobile device platform. It can support the operation of Java applications that have been converted to .dex (the type of executable file on the Android platform) format. Before Android4.2, the applications of the Android mobile phone system were run on the Dalvik Java virtual machine. Every time the application was run, the code in the program needed to be converted into machine code in real time to run. One procedure, which results in relatively fast power consumption and large memory usage. [0003] In order to solve the above problems in the Dalvik operating environment, after Android4.4, a new Android operating environment ART (Android runtime) beg...

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/445
CPCG06F9/44521
Inventor 刘敏
Owner BEIJING QIHOO TECH CO LTD