Method, device and computer-readable storage medium for verifying Android installation package

By obtaining and comparing the hash values ​​of the core directory structure data of the Android installation package, the wasted bandwidth and time problems of Android installation package verification in the existing technology are solved, and efficient repetitive checksum accuracy is achieved.

CN113342636BActive Publication Date: 2024-12-31CHINA TELECOM CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010137614.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-03-02
Publication Date
2024-12-31
Estimated Expiration
2040-03-02

AI Technical Summary

Technical Problem

The prior art has the problem of wasting bandwidth and time when verifying Android installation packages, and the accuracy of repeated downloads is not high, making it difficult to efficiently determine whether the target Android installation package is the same as the local Android installation package.

Method used

By obtaining the total length of the target Android installation package, downloading the structure data of its core directory, and determining whether its hash value is the same as the hash value of the local Android installation package. If the same is, it is determined to be the same. If it is different, it will be downloaded in full And store the hash value. If the file is less than a certain threshold, download and compare the hash value, package name or signature.

Benefits of technology

It realizes rapid and efficient verification of Android installation packages when only partial data is transmitted, saving download time, bandwidth and computing resources, improving the accuracy of verification and reducing the misjudgment rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113342636B_ABST
    Figure CN113342636B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method, device and computer-readable storage medium for verifying an Android installation package, and relates to the field of information technology. The method for verifying an Android installation package includes: obtaining the total file length of the target Android installation package; when the total file length is greater than a first threshold, downloading the structural data of the core directory of the target Android installation package; determining whether the structural data of the core directory of the target Android installation package and the structural data of the core directory of the local Android installation package have the same hash value; when they have the same hash value, determining that the target installation package is the same as the local Android installation package; when they have different hash values, determining that the target installation package is different from the local Android installation package. The present disclosure can more efficiently verify whether the target Android installation package is the same as the local Android installation package, saving download time, download bandwidth and computing resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of information technology, and in particular to a method, device and computer-readable storage medium for verifying an Android installation package. Background Art

[0002] With the rapid development of APK (Android Package) development technology, the development threshold of APK is gradually lowering, which makes the total amount of APK on the market increase rapidly. At the same time, the shortening of APK iteration cycle also speeds up its version update. In addition, since the same APK is often released on different channels and redistributed in different ways, there are many duplications in APK. Collecting and analyzing APK requires downloading a large number of different APKs.

[0003] At present, the main methods for determining APK duplication are: downloading the APK locally and comparing it with the hash value or package name and signature information calculated by the existing local APK; if they are consistent, it is a duplicate APK that needs to be deleted, otherwise it is a new APK that needs to be retained; or, first save the URL (Uniform Resource Locator) information of each downloaded APK, and before downloading a new APK, compare the URL of the APK to be downloaded with the local URL library to see if there is any duplication. If there is a duplication, skip the URL and do not download the new APK, otherwise download the new APK according to the URL. Summary of the invention

[0004] A technical problem solved by the present disclosure is how to more efficiently check whether a target Android installation package is identical to a local Android installation package.

[0005] According to one aspect of an embodiment of the present disclosure, a method for verifying an Android installation package is provided, comprising: obtaining the total file length of a target Android installation package; downloading structural data of a core directory of the target Android installation package when the total file length is greater than a first threshold; determining whether the structural data of the core directory of the target Android installation package and the structural data of the core directory of a local Android installation package have the same hash value; determining that the target installation package is the same as the local Android installation package when they have the same hash value; and determining that the target installation package is different from the local Android installation package when they have different hash values.

[0006] In some embodiments, the structural data of the core directory of the target Android installation package is downloaded, including: downloading the tail data of the target installation package, the file length of the tail data is a second threshold, and the second threshold is less than the first threshold; determining the core directory end mark from the tail data, and determining the starting offset of the core directory of the target Android installation package relative to the target Android installation package according to the core directory end mark; obtaining the core directory starting mark of the target Android installation package according to the starting offset; obtaining the structural data of the core directory of the target Android installation package according to the core directory starting mark and the core directory end mark.

[0007] In some embodiments, obtaining the structural data of the core directory of the target Android installation package according to the core directory start mark and the core directory end mark includes: when the starting offset is not less than the difference between the total file length and a second threshold, obtaining the structural data of the core directory of the target Android installation package from the package tail data according to the core directory start mark and the core directory end mark; when the starting offset is less than the difference between the total file length and the second threshold, continuing to download file data from the target installation package, and obtaining the structural data of the core directory of the target Android installation package from the file data and the package tail data according to the core directory start mark and the core directory end mark; wherein, the file data starts from the core directory start mark and ends at the starting position of the package tail data.

[0008] In some embodiments, the second threshold is 65558 bytes.

[0009] In some embodiments, determining the starting offset of the core directory of the target Android installation package relative to the target Android installation package according to the core directory end marker includes: determining the starting offset from data from the 16th byte to the 20th byte after the core directory end marker.

[0010] In some embodiments, obtaining the total file length of the target Android installation package includes: sending a Hypertext Transfer Protocol HTTP request to the server where the target Android installation package is located; receiving an HTTP response returned by the server, and determining the total file length of the target Android installation package based on the content length field in the HTTP response.

[0011] In some embodiments, it also includes: when it is determined that the target Android installation package is different from the local Android installation package, the target Android installation package is completely downloaded to the local, and the hash value of the structural data of the core directory of the target Android installation package is stored locally.

[0012] In some embodiments, it also includes: when the total file length is not greater than a first threshold, downloading the target Android installation package to the local, and verifying whether the target installation package is the same as the local Android installation package based on the hash value, package name or signature of the target Android installation package.

[0013] According to another aspect of an embodiment of the present disclosure, there is provided a device for verifying an Android installation package, comprising: a file length acquisition module, configured to obtain the total file length of a target Android installation package; a structure data downloading module, configured to download structure data of a core directory of the target Android installation package when the total file length is greater than a first threshold; a hash value judgment module, configured to judge whether the structure data of the core directory of the target Android installation package and the structure data of the core directory of a local Android installation package have the same hash value; in case of having the same hash value, determining that the target installation package is the same as the local Android installation package; in case of having different hash values, determining that the target installation package is different from the local Android installation package.

[0014] In some embodiments, the structural data download module is configured to: download the tail data of the target installation package, the file length of the tail data is a second threshold, and the second threshold is less than the first threshold; determine the core directory end mark from the tail data, and determine the starting offset of the core directory of the target Android installation package relative to the target Android installation package based on the core directory end mark; obtain the core directory starting mark of the target Android installation package based on the starting offset; obtain the structural data of the core directory of the target Android installation package based on the core directory starting mark and the core directory end mark.

[0015] In some embodiments, the structural data download module is configured to: when the starting offset is not less than the difference between the total file length and a second threshold, obtain the structural data of the core directory of the target Android installation package from the package tail data according to the core directory start mark and the core directory end mark; when the starting offset is less than the difference between the total file length and the second threshold, continue to download file data from the target installation package, and obtain the structural data of the core directory of the target Android installation package from the file data and the package tail data according to the core directory start mark and the core directory end mark; wherein, the file data starts from the core directory start mark and ends at the starting position of the package tail data.

[0016] In some embodiments, the structure data download module is configured to determine the starting offset from the data from the 16th byte to the 20th byte after the core directory end marker.

[0017] In some embodiments, the second threshold is 65558 bytes.

[0018] In some embodiments, the file length acquisition module is configured to: send an HTTP request to the server where the target Android installation package is located; receive an HTTP response returned by the server, and determine the total file length of the target Android installation package based on the content length field in the HTTP response.

[0019] In some embodiments, the structural data download module is further configured to: when it is determined that the target Android installation package is different from the local Android installation package, download the target Android installation package in its entirety to the local, and store the hash value of the structural data of the core directory of the target Android installation package locally.

[0020] In some embodiments, the structure data download module is also configured to: download the target Android installation package to the local computer when the total file length is not greater than a first threshold; the hash value judgment module is also configured to: check whether the target installation package is the same as the local Android installation package based on the hash value, package name or signature of the target Android installation package.

[0021] According to another aspect of an embodiment of the present disclosure, there is provided a device for verifying an Android installation package, comprising: a memory; and a processor coupled to the memory, wherein the processor is configured to execute the aforementioned method for verifying an Android installation package based on instructions stored in the memory.

[0022] According to another aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and when the instructions are executed by a processor, the aforementioned method for verifying an Android installation package is implemented.

[0023] The present disclosure can more efficiently check whether the target Android installation package is the same as the local Android installation package, saving download time, download bandwidth and computing resources.

[0024] Other features and advantages of the present disclosure will become apparent from the following detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0026] Figure 1 A flowchart of a method for verifying an Android installation package according to some embodiments of the present disclosure is shown.

[0027] Figure 2 A flowchart diagram of some embodiments of downloading structural data of a core directory of a target Android installation package is shown.

[0028] Figure 3 A schematic diagram of the structure of an apparatus for verifying an Android installation package according to some embodiments of the present disclosure is shown.

[0029] Figure 4 A schematic diagram of the structure of an apparatus for verifying an Android installation package according to some other embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0030] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and is by no means intended to limit the present disclosure and its application or use. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0031] Currently, the total amount of APK is huge and there are duplicates. The existing method of verifying APK has the problem of wasting bandwidth and time, and the accuracy of the existing method of verifying APK to avoid duplicate downloads is not high. In view of this, the present disclosure proposes a method for verifying an Android installation package.

[0032] First combine Figure 1 Some embodiments of the method for verifying an Android installation package disclosed in the present invention are described.

[0033] Figure 1 A schematic diagram of a method for verifying an Android installation package in some embodiments of the present disclosure is shown. Figure 1 As shown, this embodiment includes steps S101 to S107.

[0034] In step S101, the total file length of the target Android installation package is obtained.

[0035] In some embodiments, a Hypertext Transfer Protocol (HTTP) request may be sent to a server where the target Android installation package is located, and then an HTTP response returned by the server is received, and the total file length of the target Android installation package is determined according to a Content-Length field in the HTTP response.

[0036] In step S102, it is determined whether the total file length of the target Android installation package is greater than a first threshold, wherein the first threshold can be set to be no less than 65558 bytes.

[0037] When the total length of the file is not greater than the first threshold, step S103 is executed; when the total length of the file is greater than the first threshold, step S104 is executed.

[0038] In step S103, the target Android installation package is downloaded to the local computer, and a check is made to see whether the target installation package is identical to the local Android installation package based on the hash value, package name or signature of the target Android installation package.

[0039] In step S104, the structural data of the core directory of the target Android installation package is downloaded.

[0040] The structural data of the core directory includes the last modification time, the last modification date of the file, the CRC-32 checksum, etc.

[0041] In step S105, it is determined whether the structural data of the core directory of the target Android installation package and the structural data of the core directory of the local Android installation package have the same hash value.

[0042] For example, for an existing APK locally, search for its core directory end marker (0x06054b50) from the end of the file, start with this marker, and query the 4 bytes from the 16th byte onwards to get the offset of the core directory of the local APK relative to the start of the entire APK file. Based on this offset, the core directory start marker (0x02014b50) and the core directory end marker (0x06054b50) of the local APK can be found, thereby obtaining the structural data of the core directory of the local APK. After calculating the hash value of the structural data of the core directory of the local APK, the hash value is saved to the local database for the judgment process of step S105.

[0043] If they have the same hash value, execute step S106 ; if they have different hash values, execute step S107 .

[0044] In step S106, it is determined that the target installation package is the same as the local Android installation package.

[0045] In step S107, it is determined that the target installation package is different from the local Android installation package.

[0046] In some embodiments, this embodiment also includes step S108.

[0047] In step S108, the target Android installation package is completely downloaded to the local computer, and the hash value of the structural data of the core directory of the target Android installation package is stored locally.

[0048] Those skilled in the art should understand that if there are other target APKs to be downloaded, the process may return to step S101 ; if there are no other target APKs to be downloaded, the process may end.

[0049] This embodiment can more quickly and efficiently verify whether the target Android installation package is the same as the local Android installation package when only part of the data of the target Android installation package is transmitted (without downloading the complete APK file), avoiding repeated downloads of the Android installation package, thereby saving download time, download bandwidth and computing resources. By accurately using the additional information of the APK file, this embodiment can also improve the accuracy of verification and reduce the misjudgment rate.

[0050] Combine the following Figure 2 Describes how to download the structure of the core directory of the target Android installation package.

[0051] Figure 2 A schematic diagram of some embodiments of downloading the structural data of the core directory of the target Android installation package is shown. Figure 2 As shown, this embodiment includes steps S2041 to S2044.

[0052] In step S2041, the tail data of the target installation package is downloaded, and the file length of the tail data is a second threshold value, which is smaller than the first threshold value.

[0053] In some embodiments, the second threshold is 65558 bytes. The last 65558 bytes of data of the target APK file are downloaded through the Range parameter (Bytes: total length of APK minus 65558 bytes) carried in the HTTP request header.

[0054] In step S2042, a core directory end marker is determined from the package tail data, and a starting offset of the core directory of the target Android installation package relative to the target Android installation package is determined based on the core directory end marker.

[0055] In some embodiments, the starting offset is determined from data from the 16th byte to the 20th byte after the core directory end marker.

[0056] In step S2043, the core directory start mark of the target Android installation package is obtained according to the start offset.

[0057] In step S2044, the structural data of the core directory of the target Android installation package is obtained according to the core directory start mark and the core directory end mark.

[0058] When the starting offset is not less than the difference between the total file length and the second threshold, the structural data of the core directory of the target Android installation package can be obtained from the package tail data according to the core directory start mark and the core directory end mark.

[0059] When the starting offset is less than the difference between the total file length and the second threshold, the file data is continued to be downloaded from the target installation package, and the structure data of the core directory of the target Android installation package is obtained from the file data and the package tail data according to the core directory start mark and the core directory end mark. The file data starts from the core directory start mark and ends at the starting position of the package tail data.

[0060] In this embodiment, the inventors consider that APK modification will cause changes in the structural data of the core directory such as the last modification time, the last modification date of the file, and the CRC-32 checksum, thereby changing the hash value of the structural data of the entire core directory. Therefore, in this embodiment, only part of the data can be downloaded, and the hash value of the structural data of the core directory of the target Android installation package contained in the partial data can be used to distinguish whether the APK is the same.

[0061] Combine the following Figure 3 Some embodiments of the apparatus for verifying an Android installation package disclosed herein are described.

[0062] Figure 3 The schematic diagram of the structure of the device for verifying the Android installation package in some embodiments of the present disclosure is shown. Figure 3 As shown, the device 30 for verifying the Android installation package in this embodiment includes:

[0063] The file length acquisition module 301 is configured to obtain the total file length of the target Android installation package; the structure data download module 302 is configured to download the structure data of the core directory of the target Android installation package when the total file length is greater than a first threshold; the hash value judgment module 303 is configured to judge whether the structure data of the core directory of the target Android installation package and the structure data of the core directory of the local Android installation package have the same hash value; in the case of the same hash value, it is determined that the target installation package is the same as the local Android installation package; in the case of different hash values, it is determined that the target installation package is different from the local Android installation package.

[0064] This embodiment can more quickly and efficiently verify whether the target Android installation package is the same as the local Android installation package when only part of the data of the target Android installation package is transmitted (without downloading the complete APK file), avoiding repeated downloads of the Android installation package, thereby saving download time, download bandwidth and computing resources. By accurately using the additional information of the APK file, this embodiment can also improve the accuracy of verification and reduce the misjudgment rate.

[0065] In some embodiments, the structural data download module 302 is configured to: download the tail data of the target installation package, the file length of the tail data is a second threshold, and the second threshold is less than the first threshold; determine the core directory end mark from the tail data, and determine the starting offset of the core directory of the target Android installation package relative to the target Android installation package based on the core directory end mark; obtain the core directory starting mark of the target Android installation package based on the starting offset; obtain the structural data of the core directory of the target Android installation package based on the core directory starting mark and the core directory end mark.

[0066] In some embodiments, the structural data download module 302 is configured to: when the starting offset is not less than the difference between the total file length and the second threshold, obtain the structural data of the core directory of the target Android installation package from the package tail data according to the core directory start mark and the core directory end mark; when the starting offset is less than the difference between the total file length and the second threshold, continue to download file data from the target installation package, and obtain the structural data of the core directory of the target Android installation package from the file data and the package tail data according to the core directory start mark and the core directory end mark; wherein, the file data starts from the core directory start mark and ends at the starting position of the package tail data.

[0067] In some embodiments, the structure data download module 302 is configured to determine the starting offset from the data from the 16th byte to the 20th byte after the core directory end marker.

[0068] In some embodiments, the second threshold is 65558 bytes.

[0069] In some embodiments, the file length acquisition module 301 is configured to: send an HTTP request to the server where the target Android installation package is located; receive an HTTP response returned by the server, and determine the total file length of the target Android installation package based on the content length field in the HTTP response.

[0070] In some embodiments, the structure data download module 302 is further configured to: when it is determined that the target Android installation package is different from the local Android installation package, download the target Android installation package in its entirety to the local, and store the hash value of the structure data of the core directory of the target Android installation package locally.

[0071] In some embodiments, the structure data download module 302 is also configured to: download the target Android installation package to the local when the total file length is not greater than the first threshold; the hash value judgment module 303 is also configured to: check whether the target installation package is the same as the local Android installation package based on the hash value, package name or signature of the target Android installation package.

[0072] In the above embodiment, the inventors consider that the modification of APK will cause the structural data of the core directory such as the last modification time, the last modification date of the file and the CRC-32 checksum to change, thereby changing the hash value of the structural data of the entire core directory. Therefore, this embodiment can only download part of the data, and distinguish whether the APK is the same by the hash value of the structural data of the core directory of the target Android installation package contained in the part of the data.

[0073] Combine the following Figure 4 Other embodiments of the apparatus for verifying an Android installation package disclosed herein are described.

[0074] Figure 4 The schematic diagram of the structure of the device for verifying the Android installation package in some other embodiments of the present disclosure is shown. Figure 4 As shown, the device 40 for verifying an Android installation package of this embodiment includes: a memory 410 and a processor 420 coupled to the memory 410, and the processor 420 is configured to execute the method for verifying an Android installation package in any of the aforementioned embodiments based on instructions stored in the memory 410.

[0075] The memory 410 may include, for example, a system memory, a fixed non-volatile storage medium, etc. The system memory may store, for example, an operating system, an application program, a boot loader, and other programs.

[0076] The device 40 for verifying the Android installation package may also include an input / output interface 430, a network interface 440, a storage interface 450, etc. These interfaces 430, 440, 450 and the memory 410 and the processor 420 may be connected, for example, via a bus 460. Among them, the input / output interface 430 provides a connection interface for input / output devices such as a display, a mouse, a keyboard, and a touch screen. The network interface 440 provides a connection interface for various networked devices. The storage interface 450 provides a connection interface for external storage devices such as SD cards and USB flash drives.

[0077] The present disclosure also includes a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the method for verifying an Android installation package in any of the aforementioned embodiments.

[0078] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0079] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1A function specified in one or more boxes.

[0080] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0081] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure should be included in the protection scope of the present disclosure.

Claims

1. A method for verifying an Android installation package, comprising: Get the total file length of the target Android installation package; If the total length of the file is greater than the first threshold, downloading the structural data of the core directory of the target Android installation package; Determine whether the structure data of the core directory of the target Android installation package and the structure data of the core directory of the local Android installation package have the same hash value; In the case of having the same hash value, it is determined that the target installation package is the same as the local Android installation package; In the case of different hash values, it is determined that the target installation package is different from the local Android installation package. The structural data of the core directory of the download target Android installation package includes: Downloading the tail data of the target installation package, where the file length of the tail data is a second threshold value, and the second threshold value is less than the first threshold value; Determine a core directory end mark from the package tail data, and determine a starting offset of the core directory of the target Android installation package relative to the target Android installation package according to the core directory end mark; According to the starting offset, obtain the core directory starting mark of the target Android installation package; When the starting offset is less than the difference between the total file length and the second threshold, continue to download file data from the target installation package, and obtain the structural data of the core directory of the target Android installation package from the file data and the package tail data based on the core directory start mark and the core directory end mark.

2. The method according to claim 1, further comprising: When the starting offset is not less than the difference between the total file length and the second threshold, the structural data of the core directory of the target Android installation package is obtained from the package tail data according to the core directory start marker and the core directory end marker, wherein the file data starts from the core directory start marker and ends at the starting position of the package tail data.

3. The method according to claim 1 or 2, wherein: The second threshold is 65558 bytes.

4. The method according to claim 1, wherein: Determining the starting offset of the core directory of the target Android installation package relative to the target Android installation package according to the core directory end mark includes: The starting offset is determined from the data from the 16th byte to the 20th byte after the end mark of the core directory.

5. The method according to claim 1, wherein: The total file length of the target Android installation package is obtained as follows: Send a Hypertext Transfer Protocol (HTTP) request to the server where the target Android installation package is located; Receive an HTTP response returned by the server, and determine the total file length of the target Android installation package according to the content length field in the HTTP response.

6. The method according to claim 1, further comprising: When it is determined that the target Android installation package is different from the local Android installation package, the target Android installation package is completely downloaded to the local computer, and a hash value of the structural data of the core directory of the target Android installation package is stored locally.

7. The method according to claim 1, further comprising: When the total length of the file is not greater than the first threshold, the target Android installation package is downloaded locally, and the target installation package is verified to be identical to the local Android installation package based on the hash value, package name or signature of the target Android installation package.

8. A device for verifying an Android installation package, comprising: A file length acquisition module, configured to acquire the total file length of the target Android installation package; a structure data downloading module, configured to download the structure data of the core directory of the target Android installation package when the total length of the file is greater than a first threshold; The hash value judgment module is configured to judge whether the structure data of the core directory of the target Android installation package and the structure data of the core directory of the local Android installation package have the same hash value; if they have the same hash value, it is determined that the target installation package is the same as the local Android installation package; if they have different hash values, it is determined that the target installation package is different from the local Android installation package. Among them, the structural data download module is also configured to download the tail data of the target installation package, the file length of the tail data is a second threshold, and the second threshold is less than the first threshold; determine the core directory end mark from the tail data, and determine the starting offset of the core directory of the target Android installation package relative to the target Android installation package based on the core directory end mark; obtain the core directory starting mark of the target Android installation package based on the starting offset; when the starting offset is less than the difference between the total file length and the second threshold, continue to download file data from the target installation package, and obtain the structural data of the core directory of the target Android installation package from the file data and the tail data based on the core directory starting mark and the core directory end mark.

9. The device according to claim 8, wherein: The structure data download module is further configured to: When the starting offset is not less than the difference between the total file length and the second threshold, the structural data of the core directory of the target Android installation package is obtained from the package tail data according to the core directory start marker and the core directory end marker, wherein the file data starts from the core directory start marker and ends at the starting position of the package tail data.

10. The device according to claim 8, wherein: The structure data download module is configured to determine the starting offset from the data from the 16th byte to the 20th byte after the end mark of the core directory.

11. The device according to claim 8 or 9, wherein: The second threshold is 65558 bytes.

12. The device according to claim 8, wherein: The file length acquisition module is configured as follows: An HTTP request is sent to the server where the target Android installation package is located; an HTTP response returned by the server is received, and the total file length of the target Android installation package is determined according to the content length field in the HTTP response.

13. The device according to claim 8, wherein: The structure data download module is further configured to: When it is determined that the target Android installation package is different from the local Android installation package, the target Android installation package is completely downloaded to the local computer, and a hash value of the structural data of the core directory of the target Android installation package is stored locally.

14. The device according to claim 8, wherein: The structure data download module is further configured to: download the target Android installation package to the local computer if the total length of the file is not greater than a first threshold; The hash value judgment module is further configured to: verify whether the target installation package is identical to the local Android installation package according to the hash value, package name or signature of the target Android installation package.

15. A verification device for an Android installation package, comprising: Memory; as well as A processor coupled to the memory, the processor being configured to execute the method for verifying an Android installation package according to any one of claims 1 to 7 based on instructions stored in the memory.

16. A computer-readable storage medium, wherein: The computer-readable storage medium stores computer instructions, and when the instructions are executed by a processor, the method for verifying an Android installation package according to any one of claims 1 to 7 is implemented.