CN112445487A - Dex optimization method, system, intelligent terminal and storage medium - Google Patents
Dex optimization method, system, intelligent terminal and storage medium Download PDFInfo
- Publication number
- CN112445487A CN112445487A CN201910822792.3A CN201910822792A CN112445487A CN 112445487 A CN112445487 A CN 112445487A CN 201910822792 A CN201910822792 A CN 201910822792A CN 112445487 A CN112445487 A CN 112445487A
- Authority
- CN
- China
- Prior art keywords
- check code
- target
- dex
- optimized
- optimization
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000005457 optimization Methods 0.000 title claims abstract description 134
- 238000000034 method Methods 0.000 title claims abstract description 55
- 238000009434 installation Methods 0.000 claims abstract description 83
- 238000012795 verification Methods 0.000 claims abstract description 43
- 230000008569 process Effects 0.000 claims description 9
- 238000012545 processing Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 4
- 230000006835 compression Effects 0.000 description 3
- 238000007906 compression Methods 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 230000006854 communication Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000003672 processing method Methods 0.000 description 2
- TVZRAEYQIKYCPH-UHFFFAOYSA-N 3-(trimethylsilyl)propane-1-sulfonic acid Chemical compound C[Si](C)(C)CCCS(O)(=O)=O TVZRAEYQIKYCPH-UHFFFAOYSA-N 0.000 description 1
- 230000007175 bidirectional communication Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004883 computer application Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/44—Encoding
- G06F8/443—Optimisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/50—Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
- G06F21/51—Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems at application loading time, e.g. accepting, rejecting, starting or inhibiting executable software based on integrity or source reliability
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/64—Protecting data integrity, e.g. using checksums, certificates or signatures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- General Health & Medical Sciences (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a dex optimization method, a dex optimization system, an intelligent terminal and a storage medium, wherein the method comprises the following steps: acquiring a target package name corresponding to an installation package to be optimized; if the target check code corresponding to the target package name is stored in a pre-stored record file, reading the target check code corresponding to the target package name in the record file; calculating a verification check code of the installation package to be optimized; and if the verification check code is the same as the target check code, performing dex optimization on the installation package to be optimized. The invention records the information of the failure of dex optimization, avoids the recorded dex optimization again before next suboptimum, improves the dex optimization efficiency and avoids the overlong waiting time of users.
Description
Technical Field
The invention relates to the technical field of computer application, in particular to a processing method and system for optimizing byte codes, an intelligent terminal and a storage medium.
Background
The Android (Android) system is an operating system based on a virtual machine, and the development of the virtual machine has undergone a process from Dalvik (Dalvik is a virtual machine for an Android platform designed by Google corporation) to ART (ART is a virtual machine for an Android platform designed by Google corporation, is an abbreviation of Android Runtime, and can be understood as an Android Runtime system). In order to enable the APK (Android package) to run on all virtual machines without changing, Google adopts an adapter-like mode, that is, one more process is required before the virtual running, that is, dex (byte code) optimization is performed, and the goal of the dex optimization on the ART virtual machine is to enable the virtual machine to execute various APKs more efficiently.
At present, most Android versions need to perform dex optimization action after the APK is installed, and if the dex optimization is not successful, the dex optimization action is performed again every time the system is restarted or when the background is idle. APK on the market is various in types and uneven in quality, and if dex optimization fails due to the problem of the APK, occupation of system resources is large. Under the mechanism of Android, if one dex optimization is not completed for more than 10 minutes, the dex optimization is considered to fail, and the system cannot do anything within the 10 minutes; that is, if the dex optimization of one APK fails, it needs to wait for 10 minutes each time the system is restarted, and if several APKs fail to optimize, the system may take longer time to start, which causes great inconvenience to the user.
Accordingly, the prior art is yet to be improved and developed.
Disclosure of Invention
The invention mainly aims to provide a processing method, a system, an intelligent terminal and a storage medium for optimizing byte codes, and aims to solve the problems that in the prior art, the starting time of a system is too long and a user needs to wait for starting for a long time after dex optimization fails.
In order to achieve the above object, the present invention provides a dex optimization method, which includes the following steps:
acquiring a target package name corresponding to an installation package to be optimized;
if the target check code corresponding to the target package name is stored in a pre-stored record file, reading the target check code corresponding to the target package name in the record file;
calculating a verification check code of the installation package to be optimized;
and if the verification check code is the same as the target check code, performing dex optimization on the installation package to be optimized.
The dex optimization method includes the following steps of calculating a verification check code of the installation package to be optimized:
and if the verification check code is different from the target check code, performing dex optimization on the installation package to be optimized.
The dex optimization method includes the following steps of obtaining a target package name corresponding to an installation package to be optimized:
and if the target check code corresponding to the target package name is not stored in the pre-stored record file, performing dex optimization on the installation package to be optimized.
The dex optimization method includes the following steps:
and if the dex optimization of the installation package to be optimized fails, taking the verification check code as a target check code of the installation package to be optimized, and recording the corresponding relation between the target check code of the installation package to be optimized and the target package name into the record file.
The dex optimization method, wherein the failure of dex optimization comprises: optimization timeout and optimization error.
The dex optimization method comprises the following steps: the bytecode of the dex file is optimized to a machine code recognizable by a machine.
The dex optimization method, wherein the verification check code comprises: MD5 value, hash value, and installation package signature information.
In addition, to achieve the above object, the present invention further provides a dex optimizing system, wherein the system includes:
the acquisition unit is used for acquiring a target package name corresponding to the installation package to be optimized;
the reading unit is used for reading the target check code corresponding to the target package name in the record file if the target check code corresponding to the target package name is stored in the record file stored in advance;
the computing unit is used for computing the verification check code of the installation package to be optimized;
and the execution unit is used for not performing dex optimization on the installation package to be optimized if the verification check code is the same as the target check code.
In order to achieve the above object, the present invention further provides an intelligent terminal, wherein the intelligent terminal includes: a memory, a processor and a dex optimizer stored on said memory and executable on said processor, said dex optimizer when executed by said processor implementing the steps of the dex optimization method as described above.
In addition, to achieve the above object, the present invention further provides a storage medium, wherein the storage medium stores a dex optimization program, and the dex optimization program implements the steps of the dex optimization method as described above when executed by a processor.
The method comprises the steps of obtaining a target package name corresponding to an installation package to be optimized; if the target check code corresponding to the target package name is stored in a pre-stored record file, reading the target check code corresponding to the target package name in the record file; calculating a verification check code of the installation package to be optimized; and if the verification check code is the same as the target check code, performing dex optimization on the installation package to be optimized. The invention records the information of the failure of dex optimization, avoids the recorded dex optimization again before next suboptimum, improves the dex optimization efficiency and avoids the overlong waiting time of users.
Drawings
FIG. 1 is a flow chart of a preferred embodiment of the dex optimization method of the present invention;
FIG. 2 is a flow chart of the whole optimization process of the preferred embodiment of the dex optimization method of the present invention;
FIG. 3 is a schematic diagram of a preferred embodiment of the dex optimization system of the present invention;
fig. 4 is a schematic operating environment diagram of an intelligent terminal according to a preferred embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, the dex optimization method according to the preferred embodiment of the present invention includes the following steps:
and step S10, acquiring the target package name corresponding to the installation package to be optimized.
Specifically, dex optimization (i.e., bytecode optimization) in the APK (installation package) can accelerate the software boot speed, and reduce the occupation of a RAM (Random Access Memory, also called a main Memory, which is an internal Memory directly exchanging data with the CPU).
The method comprises the steps that the aim of dex optimization on an ART virtual machine is to optimize byte codes of a dex file into machine codes which can be directly recognized by a machine (the machine codes refer to a series of serial numbers formed by carrying out series encryption and hashing on a hardware serial number), and the dex file is a byte code file type which is executed on a terminal and can be operated only by being converted into the machine codes through one-layer compiling; the dex file is divided into 3 areas, including a header file, an index area and a data area, wherein the header file includes a file header (header); the index area comprises an index of a character string, an index of a type, an index of a method prototype, an index of a domain and an index of a method (besides the file information of the dex file, indexes of other areas in the file); the data area includes a class definition area, a data area, and a link data area.
The optimized dex file is converted into an odex file, wherein the odex is an abbreviation of OptimizedDEX and represents the optimized dex file and is stored in a/data/dalvik-cache directory. Because the APK file of the Android program is in a zip compressed package format, the Dalvik virtual machine needs to read class.
Further, the dex optimization is initiated by a PMS (Package manager service, which is one of core services in an Android system), the PMS manages all tasks related to Package (Package, when a large program is developed by a plurality of different programmers, it is very likely that the same class name is used, in java program development, in order to avoid the above events, a Package concept is provided, the use method is simple, and only a Package keyword is used for declaring a Package in the first line of a written program, such as installing and uninstalling applications in common; the PMS is a handle of a communication chain and can be used to implement communication between different virtual machines or different computers through a socket (socket is used to describe an IP address and a port), two programs on a network implement data exchange through a bidirectional communication connection, one end of the connection is called a socket) to transmit a command to an install (a background resident service of an Android system management installation upgrade package), that is, the PMS accesses an install service process through a socket.
In the Android system, the PMS is used for managing all installation package information and installation and uninstallation of applications in the system, but installation and uninstallation of applications are not completed by the PMS, but are performed by accessing an installd service through the PMS.
When the PMS transmits a command to the installd through the socket, the installd starts a dex2oat program (a program used by an Android system to convert a dex file into a machine code), and converts a target APK into an odex file.
Before deciding whether to perform dex optimization, firstly reading whether a record file which fails in previous optimization exists, and executing different operations according to whether the record file exists, wherein the record file records the target package name.
The target package name is unique and only represents the name of an APK file, the target package name adopts a reverse domain name naming rule, namely com.xx.xxx.xxxx form, all uses lowercase letters, the first-level package name is com, the second-level package name is xx (generally a company or personal domain name), the third-level package name is named according to application, and the fourth-level package name is a function module name; for example, "mobile QQ", the package name is com. tencent. mobileqq, and after the software is installed, the package name of the software is in the/data/app (not/system/data/app) directory.
Before deciding whether to perform dex optimization, a target package name corresponding to an installation package to be optimized (APK to be optimized) is obtained.
Step S20, if the pre-stored record file stores the target check code corresponding to the target package name, reading the target check code corresponding to the target package name in the record file.
Specifically, the check code (e.g., target check code and verification check code) in the present invention is an MD5 value in one implementation, MD5 represents MD5 Message Digest Algorithm (MD5 Message-Digest Algorithm), a widely used cryptographic hash function, which can generate a 128-bit (16-byte) hash value to ensure the integrity and consistency of information transmission.
Specifically, the MD5 value of a file is like a "digital fingerprint" of the file, and the MD5 value of each file is different, so if anyone makes any changes to the file, the MD5 value of the file, i.e., the corresponding "digital fingerprint", changes. For example, the download server provides an MD5 value in advance for a file, and after the user downloads the file, the MD5 value of the downloaded file is recalculated through an algorithm, and by comparing whether the two values are the same, it can be determined whether the downloaded file is erroneous or whether the downloaded file is tampered. The MD5 is actually a lossy compression technique, and the files before compression have the same MD5 value, whereas the same MD5 value cannot guarantee that the data before compression are the same. The scheme of file verification by using the MD5 algorithm is widely applied to software download stations, forum databases, system file security and the like.
Of course, the check code in the present invention may also be a Hash value (Hash value, also called Hash function or Hash Algorithm, also called Hash function, is a method for creating a small Digital "fingerprint" from any kind of data, for example, sha 1: Secure Hash Algorithm, which is mainly applicable to Digital Signature Standard, Digital Signature Standard DSS, the Digital Signature Algorithm defined therein, Digital Signature Algorithm DSA, for a message with a length less than 2^64 bits, sha1 may generate a 160-bit message digest, which may be used to verify the integrity of data) or install package Signature information, that is, as long as a check code capable of determining the uniqueness of a file may be used.
In the invention, after the target package name corresponding to the installation package to be optimized is obtained, whether the target check code corresponding to the target package name is stored in a pre-stored record file or not is judged, and if the target check code corresponding to the target package name is stored in the record file, the target check code corresponding to the target package name in the record file is read.
Further, if the target check code corresponding to the target package name is not stored in the pre-stored record file, the to-be-optimized installation package is subjected to dex optimization, a command can be sent to the install d, bytecode optimization is directly started through a dex2oat program, then optimization is executed, when the optimization fails, the dex2oat program notifies the install d, then the install d notifies the PMS, and the check code (such as an MD5 value) after the to-be-optimized installation package is optimized is calculated through the PMS.
And step S30, calculating the verification check code of the installation package to be optimized.
Specifically, when the target check code corresponding to the target package name is stored in the record file, and after the target check code corresponding to the target package name in the record file is read, the verification check code of the installation package to be optimized is calculated, whether the verification check code is the same as the target check code is judged, and whether dex optimization is executed is selected according to a judgment result.
And step S40, if the verification check code is the same as the target check code, not performing dex optimization on the installation package to be optimized.
Specifically, as can be seen from the above description, in step S30, it is necessary to determine whether the verification check code is the same as the target check code, and when it is determined that the verification check code is the same as the target check code, the to-be-optimized installation package is not subjected to dex optimization, that is, it indicates that the to-be-optimized installation package has failed in the previous dex optimization, then it is not necessary to perform dex optimization again, that is, it is no longer performed with dex optimization this time.
Further, when the verification check code is judged to be different from the target check code, performing dex optimization on the installation package to be optimized, wherein the dex optimization aims at (or is a process of): the bytecode of the dex file is optimized to a machine code recognizable by a machine.
When the dex optimization needs to be executed, a command can be sent to an install program, the dex optimization is directly started through a dex2 at program, then the dex optimization is executed, when the optimization fails, the dex2 at program notifies the install program, then the install program notifies the PMS, and then the PMS calculates the check code (such as an MD5 value) of the installation package to be optimized after being optimized, because the record file already exists, the check code of the installation package to be optimized after being optimized and the target package name of the installation package to be optimized are directly recorded into the last line of the record file.
When the dex2 root program executes optimization, the reason for failure of dex optimization includes: optimization timeout (e.g., optimization time greater than ten minutes) and optimization error (e.g., optimization failure when the terminal's cache space is insufficient, i.e., optimization error).
When the recording file records information, the information such as the package name may be transferred by adding a parameter in the dex2oat program or the installd program.
And run dex optimization once every time of starting, and judge the previously written record file when starting next time, so that the optimization failure is avoided, and the starting time is avoided to be too long.
Further, before starting the dex optimization, when judging that there is no record file of which the dex optimization fails, sending a command to an install, directly starting the dex optimization through a dex2 at program, then executing the dex optimization, when the optimization fails, notifying the install by the dex2 at program, then notifying the install to a PMS through the install, and then calculating a check code (for example, an MD5 value) of the installation package to be optimized after being optimized through the PMS.
To further illustrate the processing procedure of the dex optimization method in the present invention, the following is explained by a specific flowchart, as shown in fig. 2, the specific implementation procedure of the dex optimization processing procedure in the present invention is as follows:
step S101, the PMS prepares to start dex optimization (just before starting dex optimization);
step S102, judging whether a recording file with failed dex optimization exists, if so, executing step S103, and if not, executing step S108; the recording file records a first package name and a target check code;
step S103, reading the first package name and the target check code in the record file;
step S104, judging whether the target package name of the installation package to be optimized is consistent with the first package name, if so, executing step S105, and if not, executing step S108;
step S105, calculating a verification check code of the installation package to be optimized;
step S106, judging whether the verification check code of the installation package to be optimized is consistent with the target check code, if so, executing step S107, and if not, executing step S108;
step S107, when the verification check code of the installation package to be optimized is consistent with the target check code, the last optimization of the installation package to be optimized is failed, and then the optimization is stopped, namely the optimization is not carried out at this time;
step S108, when no recording file failing in dex optimization exists, when the target package name of the installation package to be optimized is inconsistent with the first package name, or when the verification check code of the installation package to be optimized is inconsistent with the target check code, sending a command to an install;
step S109, directly starting dex optimization through a dex2oat program;
step S110, executing dex optimization, returning to step S109 when the dex optimization fails, and continuing to execute step S111;
step S111, notifying installd by a dex2oat program;
step S112, informing the PMS of installd;
step S113, calculating the optimized check code of the installation package to be optimized through a PMS;
and step S114, recording the optimized check code of the installation package to be optimized and the package name of the installation package to be optimized into an existing record file or a newly-built record file.
Further, based on the above dex optimization method, the present invention also provides a dex optimization system, as shown in fig. 3, where the dex optimization system includes:
an obtaining unit 100, configured to obtain a target package name corresponding to an installation package to be optimized;
a reading unit 200, configured to read a target check code corresponding to the target package name in a pre-stored record file if the target check code corresponding to the target package name is stored in the record file;
the calculating unit 300 is configured to calculate a verification check code of the installation package to be optimized;
and the execution unit 400 is configured to not perform dex optimization on the to-be-optimized installation package if the verification check code is the same as the target check code.
Further, as shown in fig. 4, based on the above dex optimization method and system, the present invention further provides an intelligent terminal, where the intelligent terminal further includes: a processor 10, a memory 20, and a display 30. Fig. 4 shows only some of the components of the smart terminal, but it should be understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead.
The memory 20 may be an internal storage unit of the intelligent terminal in some embodiments, such as a hard disk or a memory of the intelligent terminal. The memory 20 may also be an external storage device of the Smart terminal in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the Smart terminal. Further, the memory 20 may also include both an internal storage unit and an external storage device of the smart terminal. The memory 20 is used for storing application software installed in the intelligent terminal and various data, such as program codes of the installed intelligent terminal. The memory 20 may also be used to temporarily store data that has been output or is to be output. In one embodiment, the memory 20 stores a smart terminal control program 40, and the smart terminal control program 40 can be executed by the processor 10 to implement the smart terminal control method of the present application.
The processor 10 may be a Central Processing Unit (CPU), a microprocessor or other data Processing chip in some embodiments, and is used for running the program codes stored in the memory 20 or Processing data, such as executing the intelligent terminal control method.
The display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch panel, or the like in some embodiments. The display 30 is used for displaying information at the intelligent terminal and for displaying a visual user interface. The components 10-30 of the intelligent terminal communicate with each other via a system bus.
In one embodiment, the following steps are implemented when the processor 10 executes the smart terminal control program 40 in the memory 20:
acquiring a target package name corresponding to an installation package to be optimized;
if the target check code corresponding to the target package name is stored in a pre-stored record file, reading the target check code corresponding to the target package name in the record file;
calculating a verification check code of the installation package to be optimized;
and if the verification check code is the same as the target check code, performing dex optimization on the installation package to be optimized.
The calculating the verification check code of the installation package to be optimized further comprises:
and if the verification check code is different from the target check code, performing dex optimization on the installation package to be optimized.
The obtaining of the target package name corresponding to the installation package to be optimized further includes:
and if the target check code corresponding to the target package name is not stored in the pre-stored record file, performing dex optimization on the installation package to be optimized.
Performing dex optimization on the installation package to be optimized, and then further comprising:
and if the dex optimization of the installation package to be optimized fails, taking the verification check code as a target check code of the installation package to be optimized, and recording the corresponding relation between the target check code of the installation package to be optimized and the target package name into the record file.
Wherein the dex optimization failure comprises: optimization timeout and optimization error.
Wherein, the dex optimization process comprises the following steps: the bytecode of the dex file is optimized to a machine code recognizable by a machine.
Wherein the verification check code comprises: MD5 value, hash value, and installation package signature information.
The present invention also provides a storage medium, wherein the storage medium stores a dex optimization program, and the dex optimization program implements the steps of the dex optimization method as described above when executed by a processor.
In summary, the present invention provides a dex optimization method, a dex optimization system, an intelligent terminal and a storage medium, where the method includes: acquiring a target package name corresponding to an installation package to be optimized; if the target check code corresponding to the target package name is stored in a pre-stored record file, reading the target check code corresponding to the target package name in the record file; calculating a verification check code of the installation package to be optimized; and if the verification check code is the same as the target check code, performing dex optimization on the installation package to be optimized. The invention records the information of the failure of dex optimization, avoids the recorded dex optimization again before next suboptimum, improves the dex optimization efficiency and avoids the overlong waiting time of users.
Of course, it will be understood by those skilled in the art that all or part of the processes of the methods of the above embodiments may be implemented by a computer program instructing relevant hardware (such as a processor, a controller, etc.), and the program may be stored in a computer readable storage medium, and when executed, the program may include the processes of the above method embodiments. The storage medium may be a memory, a magnetic disk, an optical disk, etc.
It is to be understood that the invention is not limited to the examples described above, but that modifications and variations may be effected thereto by those of ordinary skill in the art in light of the foregoing description, and that all such modifications and variations are intended to be within the scope of the invention as defined by the appended claims.
Claims (10)
1. A dex optimization method, characterized in that the method comprises:
acquiring a target package name corresponding to an installation package to be optimized;
if the target check code corresponding to the target package name is stored in a pre-stored record file, reading the target check code corresponding to the target package name in the record file;
calculating a verification check code of the installation package to be optimized;
and if the verification check code is the same as the target check code, performing dex optimization on the installation package to be optimized.
2. The dex optimization method of claim 1, wherein the calculating of the verification check code of the installation package to be optimized further comprises:
and if the verification check code is different from the target check code, performing dex optimization on the installation package to be optimized.
3. The dex optimization method of claim 1, wherein the obtaining of the target package name corresponding to the installation package to be optimized further comprises:
and if the target check code corresponding to the target package name is not stored in the pre-stored record file, performing dex optimization on the installation package to be optimized.
4. The dex optimization method according to claim 2 or 3, wherein the dex optimization of the installation package to be optimized further comprises:
and if the dex optimization of the installation package to be optimized fails, taking the verification check code as a target check code of the installation package to be optimized, and recording the corresponding relation between the target check code of the installation package to be optimized and the target package name into the record file.
5. The dex optimization method of claim 4, wherein the dex optimization failure comprises: optimization timeout and optimization error.
6. The dex optimization method according to claim 4, wherein the dex optimization process is: the bytecode of the dex file is optimized to a machine code recognizable by a machine.
7. The dex optimization method of claim 1, wherein the verification check code comprises: MD5 value, hash value, and installation package signature information.
8. A dex optimization system, characterized in that the system comprises:
the acquisition unit is used for acquiring a target package name corresponding to the installation package to be optimized;
the reading unit is used for reading the target check code corresponding to the target package name in the record file if the target check code corresponding to the target package name is stored in the record file stored in advance;
the computing unit is used for computing the verification check code of the installation package to be optimized;
and the execution unit is used for not performing dex optimization on the installation package to be optimized if the verification check code is the same as the target check code.
9. An intelligent terminal, characterized in that, intelligent terminal includes: memory, a processor and a dex optimizer stored on said memory and executable on said processor, said dex optimizer realizing the steps of the dex optimization method according to any of claims 1 to 7 when executed by said processor.
10. A storage medium, characterized in that the storage medium stores a dex optimization program, which when executed by a processor implements the steps of the dex optimization method according to any of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910822792.3A CN112445487A (en) | 2019-09-02 | 2019-09-02 | Dex optimization method, system, intelligent terminal and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910822792.3A CN112445487A (en) | 2019-09-02 | 2019-09-02 | Dex optimization method, system, intelligent terminal and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112445487A true CN112445487A (en) | 2021-03-05 |
Family
ID=74735196
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910822792.3A Pending CN112445487A (en) | 2019-09-02 | 2019-09-02 | Dex optimization method, system, intelligent terminal and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112445487A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114691358A (en) * | 2022-03-21 | 2022-07-01 | 珠海全志科技股份有限公司 | Android system performance optimization method, system, device and storage medium |
Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140298305A1 (en) * | 2013-03-26 | 2014-10-02 | Fujitsu Limited | Method for controlling program execution |
CN104375872A (en) * | 2014-12-08 | 2015-02-25 | 福州瑞芯微电子有限公司 | Quick startup method and device of Android system |
CN104573490A (en) * | 2013-10-29 | 2015-04-29 | 桂林电子科技大学 | Method for protecting installed software on Android platform |
CN105100191A (en) * | 2015-05-22 | 2015-11-25 | 华为技术有限公司 | Method, device and system for realizing Java application installation via cloud compilation |
CN105528229A (en) * | 2015-12-16 | 2016-04-27 | 广东欧珀移动通信有限公司 | Method and device for improving first starting speed of mobile terminal |
CN105808300A (en) * | 2016-03-09 | 2016-07-27 | 广东欧珀移动通信有限公司 | Terminal power-on method and apparatus |
US20160246580A1 (en) * | 2015-02-23 | 2016-08-25 | Qualcomm Incorporated | Whole-program optimization using data from previous compilation runs |
CN106775843A (en) * | 2016-11-30 | 2017-05-31 | 四川长虹电器股份有限公司 | The bytecode-optimized methods of dalvik based on internal memory loading |
CN106775893A (en) * | 2016-12-30 | 2017-05-31 | 北京小米移动软件有限公司 | To the method and device of program precompile |
CN107003918A (en) * | 2014-11-28 | 2017-08-01 | 汤姆逊许可公司 | Method and apparatus for providing checking application integrity |
CN107015816A (en) * | 2017-05-25 | 2017-08-04 | 微鲸科技有限公司 | Operating system update method, device and a kind of intelligent terminal |
CN107085613A (en) * | 2017-05-17 | 2017-08-22 | 广州四三九九信息科技有限公司 | Enter the filter method and device of library file |
CN107423093A (en) * | 2017-07-21 | 2017-12-01 | 珠海市魅族科技有限公司 | Control method and device, computer installation and computer-readable recording medium |
CN110162479A (en) * | 2019-05-29 | 2019-08-23 | Oppo广东移动通信有限公司 | It is abnormal to apply detection method, device and terminal device |
-
2019
- 2019-09-02 CN CN201910822792.3A patent/CN112445487A/en active Pending
Patent Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140298305A1 (en) * | 2013-03-26 | 2014-10-02 | Fujitsu Limited | Method for controlling program execution |
CN104573490A (en) * | 2013-10-29 | 2015-04-29 | 桂林电子科技大学 | Method for protecting installed software on Android platform |
CN107003918A (en) * | 2014-11-28 | 2017-08-01 | 汤姆逊许可公司 | Method and apparatus for providing checking application integrity |
CN104375872A (en) * | 2014-12-08 | 2015-02-25 | 福州瑞芯微电子有限公司 | Quick startup method and device of Android system |
US20160246580A1 (en) * | 2015-02-23 | 2016-08-25 | Qualcomm Incorporated | Whole-program optimization using data from previous compilation runs |
CN105100191A (en) * | 2015-05-22 | 2015-11-25 | 华为技术有限公司 | Method, device and system for realizing Java application installation via cloud compilation |
CN105528229A (en) * | 2015-12-16 | 2016-04-27 | 广东欧珀移动通信有限公司 | Method and device for improving first starting speed of mobile terminal |
CN105808300A (en) * | 2016-03-09 | 2016-07-27 | 广东欧珀移动通信有限公司 | Terminal power-on method and apparatus |
CN106775843A (en) * | 2016-11-30 | 2017-05-31 | 四川长虹电器股份有限公司 | The bytecode-optimized methods of dalvik based on internal memory loading |
CN106775893A (en) * | 2016-12-30 | 2017-05-31 | 北京小米移动软件有限公司 | To the method and device of program precompile |
CN107085613A (en) * | 2017-05-17 | 2017-08-22 | 广州四三九九信息科技有限公司 | Enter the filter method and device of library file |
CN107015816A (en) * | 2017-05-25 | 2017-08-04 | 微鲸科技有限公司 | Operating system update method, device and a kind of intelligent terminal |
CN107423093A (en) * | 2017-07-21 | 2017-12-01 | 珠海市魅族科技有限公司 | Control method and device, computer installation and computer-readable recording medium |
CN110162479A (en) * | 2019-05-29 | 2019-08-23 | Oppo广东移动通信有限公司 | It is abnormal to apply detection method, device and terminal device |
Non-Patent Citations (1)
Title |
---|
AMYTAN小小燕: "Android开启odex,优化开机速度", Retrieved from the Internet <URL:https://blog.csdn.net/xiaoyantan/article/details/80001656> * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114691358A (en) * | 2022-03-21 | 2022-07-01 | 珠海全志科技股份有限公司 | Android system performance optimization method, system, device and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7062750B2 (en) | Accessing remote stores of source and symbol data for use by computing tools | |
US20190235990A1 (en) | Computer-implemented methods and systems for determining application matching status | |
US20070226715A1 (en) | Application server system and computer product | |
CN111930489B (en) | Task scheduling method, device, equipment and storage medium | |
CN105205401A (en) | Trusted computer system based on safe password chip and trusted guiding method thereof | |
CN111914303B (en) | Security measurement and security verification method for Linux system running state | |
CN102760068B (en) | Loading method of Active X plugin and device | |
CN111008034B (en) | Patch generation method and device | |
WO2021115177A1 (en) | Application installation method and apparatus, terminal device, server and storage medium | |
US20240295412A1 (en) | Method for operating and maintaining an electronic map, method for using electronic map data and service system | |
US8516448B2 (en) | Identifying interpreted programs through class loading sequences | |
CN111240772A (en) | Data processing method and device based on block chain and storage medium | |
CN112445487A (en) | Dex optimization method, system, intelligent terminal and storage medium | |
CN107844360B (en) | Method and device for executing application code by hard disk | |
US12106079B2 (en) | Shared compilation cache verification system | |
CN113608742A (en) | Detection method, code packet processing method, operation control method and computing device | |
CN115086047B (en) | Interface authentication method and device, electronic equipment and storage medium | |
CN116850598A (en) | Game resource updating method, system, equipment and storage medium | |
CN115794821A (en) | Method, system, equipment and medium for converging information of same asset on different platforms | |
CN111460436B (en) | Unstructured data operation method and system based on blockchain | |
CN113553098A (en) | Method and device for submitting Flink SQL (structured query language) operation and computer equipment | |
CN110677378B (en) | Control method of MAC address, intelligent terminal and storage medium | |
CN113032019A (en) | Multi-factor-based android device identification method and device and storage medium | |
WO2024207848A1 (en) | Distributed management method and apparatus for artifact data, and computer device and medium | |
CN110413644B (en) | Data caching method, electronic device and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |