Method for loading patches based on class files in Android system
An Android system and file loading technology, applied in the direction of program loading/starting, program control design, instruments, etc., can solve the problems of reducing APP application performance, crashes, errors, etc.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0053] Embodiment 1 of the present invention provides a method for loading patches based on class files in an Android system, such as figure 1 As shown, the method includes the following steps:
[0054] A method for loading patches based on class files in an Android system, characterized in that the method comprises the steps of:
[0055] S1: Obtain the patch package;
[0056] S2: Obtain the first dex file where the class to be patched is located, and mark the class to be patched in the first dex file;
[0057] S3: subpackage the first dex file found in step S2, and obtain a second dex file composed of classes related to the class to be patched and a third dex file composed of other classes in the first dex file;
[0058] S4: the patch package is loaded into a patch class through the class loader and inserted into the second dex file obtained in step S3 to form a fourth dex file, and the class in the fourth dex file is assigned back to the third dex file by reflection;
[0...
Embodiment 2
[0062] Embodiment 2 of the present invention provides a method for loading patches based on class files in an Android system, which is basically the same as that of Embodiment 1, the difference is that, as figure 2 As shown, the method also includes:
[0063] S6: Receive the silent message pushed by the push server at all times, the silent message includes the patch parameters of the latest patch version of the application, and the patch parameters include the unique identifier of the patch;
[0064] S7: Compare the patch data corresponding to the patch unique identifier obtained in step S6 with the patch data of the patch package obtained in step S1, and if the comparison is consistent, proceed to steps S2-S5;
[0065] S8: When the comparison in step S7 is inconsistent, judge whether the patch data corresponding to the patch unique identifier obtained in step S6 is the update data of the patch data in the patch package obtained in step S1, if yes, go to step S9, if not, reac...
Embodiment 3
[0074] Embodiment 3 of the present invention provides a method for loading patches based on class files in an Android system, which is basically the same as that of Embodiment 1, the difference is that, as image 3 As shown, the following steps are performed before step S1:
[0075] S0: Determine whether the application program is running on the client for the first time, if yes, go to step S01:
[0076] S01: Determine whether the client has locally stored a patch package of the application program, if yes, perform steps S2-5 for the patch package in the application program, and if not, perform steps S1-S5;
[0077] S02: When step S0 judges no, count the number G of patch versions released by the application, and compare it with the number G1 of the number of times the client updates the application patch version, if 3 / 5G<G1≤G, go to step S1- 5. If G1≤3 / 5G, go to step S03;
[0078] S03: Determine whether to obtain the patch package according to the patch package weight value...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com