CN106648770B - Generation method, loading method and device of application program installation package - Google Patents

Generation method, loading method and device of application program installation package Download PDF

Info

Publication number
CN106648770B
CN106648770B CN201611130406.7A CN201611130406A CN106648770B CN 106648770 B CN106648770 B CN 106648770B CN 201611130406 A CN201611130406 A CN 201611130406A CN 106648770 B CN106648770 B CN 106648770B
Authority
CN
China
Prior art keywords
resource
installation package
application program
installation
application
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.)
Active
Application number
CN201611130406.7A
Other languages
Chinese (zh)
Other versions
CN106648770A (en
Inventor
刘一琛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201611130406.7A priority Critical patent/CN106648770B/en
Publication of CN106648770A publication Critical patent/CN106648770A/en
Application granted granted Critical
Publication of CN106648770B publication Critical patent/CN106648770B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0478Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload applying multiple layers of encryption, e.g. nested tunnels or encrypting the content with a first key and then with at least a second key
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/14Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using a plurality of keys or algorithms

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to the technical field of information processing, in particular to a generation method, a loading method and a device of an application program installation package, wherein the method comprises the following steps: acquiring installation resources of an application program; analyzing a first resource for loading a main interface of an application program from the installation resource; and generating an application program installation package according to the first resource. According to the method and the device, the first resource used for loading the main interface of the application program is analyzed from the installation resource of the application program, the application program installation package is generated according to the first resource, the application program can be installed by using the application program installation package, the main interface can be loaded after the user opens the installed application program, and the resources except for the main interface are not packaged in the application program installation package, so that the occupation of the application program installation package on the storage space is reduced.

Description

Generation method, loading method and device of application program installation package
Technical Field
The invention relates to the technical field of information processing, in particular to a generation method, a loading method and a device of an application program installation package.
Background
An application installation package is a type of file used for installing an application in an operating system, and a user can install the application through the application installation package. In the development process of an Android (Android) system, along with the increasing abundance of functions and display modes of application programs, the storage space occupied by an application program installation package is also increased, so that how to reduce the storage space occupied by the application program installation package becomes a problem to be solved urgently.
Disclosure of Invention
In view of the above problems, the present invention is proposed to provide a generation method, a loading method and an apparatus for an application installation package, which overcome the above problems or at least partially solve the above problems.
The embodiment of the invention provides a method for generating an application program installation package, which comprises the following steps:
acquiring installation resources of an application program;
analyzing a first resource for loading a main interface of an application program from the installation resource;
and generating an application program installation package according to the first resource.
Preferably, after the parsing out the first resource for loading the main interface of the application from the installation resource, the method further includes:
and temporarily storing a second resource except the first resource in the installation resources into an asset directory.
Preferably, after the parsing out the first resource for loading the main interface of the application from the installation resource, the method further includes:
and generating a resource installation package according to a second resource except the first resource in the installation resources.
Preferably, after the resource installation package is generated according to a second resource except the first resource in the installation resources, the method includes:
storing a first public key in a first key pair into the application program installation package, and simultaneously encrypting the resource installation package for the first time by using a first private key in the first key pair;
and storing a second private key in the second key pair into the application program installation package, and simultaneously encrypting the resource installation package for the second time by using a second public key in the second key pair.
Preferably, after the generating a resource installation package according to a second resource, except the first resource, in the installation resources, the method further includes:
and sending the resource installation package to a server.
Based on the same inventive concept, an embodiment of the present invention further provides a method for loading an application program installation package, where the method includes:
acquiring an application program installation package generated according to a first resource, wherein the first resource is used for loading a main interface of an application program;
and installing the application program according to the application program installation package so that the main interface can be loaded when the user opens the application program.
Preferably, after the application program corresponding to the application program installation package is installed, the method further includes;
when the current display interface of the application program is the main interface, judging whether opening operation for opening a secondary interface of the main interface exists or not;
and when the opening operation exists, acquiring the resource installation package stored in the server, and loading the resource installation package.
Preferably, after the obtaining of the resource installation package stored in the server, the method further includes:
decrypting the resource installation package encrypted by the second public key in the second key pair for the first time by using a second private key in the second key pair stored in the application installation package;
and carrying out secondary decryption on the resource installation package encrypted by the first private key in the first key pair by using the first public key pair in the first key pair stored in the application program installation package.
Based on the same inventive concept, an embodiment of the present invention further provides a device for generating an application installation package, where the device includes:
the first acquisition module is used for acquiring installation resources of the application program;
the loading module is used for analyzing a first resource used for loading a main interface of an application program from the installation resource;
and the generating module is used for generating the application program installation package according to the first resource.
Based on the same inventive concept, an embodiment of the present invention further provides a device for loading an application installation package, where the device includes:
the second obtaining module is used for obtaining the application program installation package generated according to the first resource, wherein the first resource is used for loading the main interface of the application program;
and the installation module is used for installing the application program according to the application program installation package so that the main interface can be loaded when a user opens the application program.
One or more technical solutions in the embodiments of the present invention have at least the following technical effects or advantages:
according to the method and the device, the first resource used for loading the main interface of the application program is analyzed from the installation resource of the application program, the application program installation package is generated according to the first resource, the application program can be installed by using the application program installation package, the main interface can be loaded after the user opens the installed application program, and the resources except for the main interface are not packaged in the application program installation package, so that the occupation of the application program installation package on the storage space is reduced.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a flowchart illustrating a method for generating an application installation package according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for loading an application installation package according to an embodiment of the present invention;
FIG. 3 is a block diagram showing an apparatus for generating an application installation package according to an embodiment of the present invention;
fig. 4 is a block diagram illustrating a loading apparatus of an application installation package according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
An embodiment of the present invention provides a method for generating an application installation package, which is applied to an Android system, where an execution main body of the method for generating an application installation package may be an application development side client, as shown in fig. 1, and the method includes:
step 101: and acquiring installation resources of the application program.
Step 102: and analyzing the first resource for loading the main interface of the application program from the installation resource.
Specifically, after the application program is developed, the installation resources of the application program can be obtained according to the developed application program, and the installation resources of the application program include resources required for the direct operation of the application program and resources not required for the direct operation of the application program, where the resources required for the direct operation of the application program at least include resources for loading a main interface of the application program, and thus, in step 102, the resources for loading the main interface of the application program can be analyzed from the installation resources as the first resources. In a special case, the application program has a start page when running directly, and then, in step 102, the resources for loading the start page and the main interface of the application program can be analyzed from the installation resources as the first resources.
Step 103: and generating an application program installation package according to the first resource.
Specifically, the file format of the application installation package is apk (android package). After the application program installation package is generated according to the first resource, the application program can be installed according to the application program installation package, the main interface is loaded by the application program after the installed application program is opened, and when the application program has the start page, the start page and the main interface are sequentially loaded by the application program.
Further, after parsing out the first resource for loading the main interface of the application from the installation resource, the method further includes: and temporarily storing a second resource except the first resource in the installation resources into an asset directory.
Specifically, the resources other than the resources required for the direct running of the application are the resources that are not required for the direct running of the application, where the resources that are not required for the direct running of the application include resources for loading a secondary interface of the application. In the application, after the first resource is analyzed, the second resource except the first resource in the installation resource is temporarily stored in the asset directories (Assets directories), so that the problem of resource conflict caused by storing the second resource in the resource file directory (Res directory) can be avoided.
Specifically, the files in the Assets directory are accessed by file names, that is, the Resources object is obtained first, then the Assets directory is obtained by calling the getAssets method according to the Resources object, and then the open method is called to read the specified files.
Further, after parsing out the first resource for loading the main interface of the application from the installation resource, the method further includes: and generating a resource installation package according to a second resource except the first resource in the installation resources.
Specifically, in the present application, after a first resource for loading a main interface of an application is parsed from an installation resource, a second resource other than the first resource in the installation resource may be directly packaged into a resource installation package, or the second resource may be temporarily stored in an Assets directory and then packaged into the resource installation package. And the file format of the resource installation package is also APK. After the resource installation package is generated, the resource installation package is sent to a server.
Further, in order to improve the security of the resource installation package and prevent the resource installation package from being stolen or modified in the transmission process, in the application, file signatures can be carried out on the application program installation package and the resource installation package, so that the file signature of the application program installation package is consistent with the file signature of the resource installation package, and the resource installation package is guaranteed to be effective on the application program installation package only when the file signature of the resource installation package is consistent with the file signature of the application program installation package. In addition, the application installation package and the resource installation package can be encrypted, and the file signature process and the encryption process can be combined to ensure the safety of the resource installation package.
Further, the application executes two encryption processes when encrypting the application installation package and the resource installation package. The client at the application development side can be used for encrypting the application installation package and the resource installation package, and the server can be used for encrypting the application installation package and the resource installation package. In the present application, the installation package is encrypted using a key pair, one key pair comprising a public key and a private key. The first key pair and the second key pair used for encryption may be generated in the client on the application development side or in the server, and the first key pair and the second key pair may be mutually transmitted between the client on the application development side and the server.
In general, the asymmetric encryption algorithm is to encrypt and decrypt using a public key by using a private key, but there may be a case that a man-in-the-middle forges a server in a transmission process, the forged server provides a forged resource installation package to a client, and the forged resource installation package contains a malicious advertisement, so that in the present application, the encryption is performed in a reverse direction, that is, the encryption is performed using the private key and the decryption is performed using the public key, specifically:
when the client side of the application development side is used for encryption, firstly, the client side of the application development side stores a first public key in a first key pair into an application installation package, and simultaneously, a first private key in the first key pair is used for carrying out first encryption on a resource installation package, then, the client side of the application development side stores a second private key in a second key pair into the application installation package, and simultaneously, a second public key in the second key pair is used for carrying out second encryption on the resource installation package. After completing the encryption twice, the client on the application development side can send the resource installation package to the server.
When the resource installation package is encrypted by the server, the resource installation package is sent to the server after the resource installation package is generated, then the server end encrypts the resource installation package by using a first private key in a first key pair, and simultaneously a first public key in the first key pair is stored in the application program installation package, so that the resource installation package which can be decrypted by only the first public key in the application program installation package can be ensured to be transmitted by the server, as the first private key corresponding to the first public key is only held by the server and cannot be forged by a middleman, the resource installation package cannot be stolen by a third party, as the first public key is public, and further the resource installation package is encrypted for the second time, specifically, the server encrypts the resource installation package by using a second public key in a second key pair, meanwhile, the second private key in the second key pair is stored in the application program installation package, so that the resource installation package can be decrypted only by the application program installation package holding the second private key, and a third party can only encrypt and cannot decrypt even if holding the second public key.
Based on the same inventive concept, an embodiment of the present invention further provides a method for loading an application installation package, which is applied to an Android system, where an execution main body of the method for loading an application installation package may be an application user side client, as shown in fig. 2, and the method includes:
step 201: the method comprises the steps of obtaining an application program installation package generated according to a first resource, wherein the first resource is used for loading a main interface of an application program.
Specifically, the acquisition path of the application installation package may be an application development side client, or may be any software download website.
Step 202: and installing the application program according to the application program installation package so that the main interface can be loaded when the user opens the application program.
In the application, after the application is installed by using the application installation package generated according to the first resource, the user opens the installed application, and then the application use side client loads the main interface and displays the main interface of the application to the user.
Further, when the current display interface of the application program is a main interface, whether an opening operation for opening a secondary interface in the main interface exists is judged, and when the opening operation exists, a resource installation package stored in a server is obtained and loaded. Specifically, the client on the application program using side sends a resource obtaining request to the server, and the server sends the resource installation package to the client on the application program using side after receiving the resource obtaining request, and stores the resource installation package in a file directory of the application program.
Further, after the resource installation package stored in the server is obtained, the method further includes:
decrypting the resource installation package encrypted by the second public key in the second key pair for the first time by using a second private key in the second key pair stored in the application installation package;
and carrying out secondary decryption on the resource installation package encrypted by the first private key in the first key pair by using the first public key pair in the first key pair stored in the application program installation package.
Specifically, after the resource installation package is obtained, corresponding to the encryption process, first, the resource installation package is decrypted for the first time by using the second private key of the second key pair, after the decryption is successful, the resource installation package becomes a file encrypted by the first key pair, then, the resource installation package is decrypted for the second time by using the first public key of the first key pair, and finally, the resource installation package without the password is obtained.
In addition, after decrypting the resource installation package for the second time by using the first public key of the first key pair, the method may further include: and judging whether the file signature of the resource installation package is consistent with the file signature of the application program installation package, if so, loading the resource installation package, and otherwise, deleting the resource installation package.
Further, when acquiring a file signature, acquiring a package management service object of android by a context package manager method, acquiring an applied package info object by a getPackageInfo method of the object, acquiring signature information of an installation package by a signatures field of the object, directly acquiring a self-defined Resources object by a getAssesses method when an opening operation for opening a secondary interface exists, acquiring a management object of an Assets directory by calling the getAssesses method, and finally calling an open method to acquire a specified resource file, wherein a parameter of the open method is a resource file name, and finally setting Resources in an application program.
Further, the class for directly operating the resource in the android system is Resources, and the resource except the installation package cannot be loaded directly through the Resources class, because the Resources are verified, when the installation package is not an installed installation package, the resource is not read, and the Resources class finally loads the resource of the specified path installation package through addasstapath of an assetmager class, wherein the assetmager class is an android resource manager class, all the Resources in the android are realized through the addasstapath, and only an own Resources object can be created when the resource package which is not installed is read, but a construction method for creating the Resources class needs to introduce an assetmager object, and a construction function of the assetmager object is set to be hidden by the system, so that an assetmager object needs to be constructed through reflection.
The process of reflection creating an AssetManager object is as follows: firstly, obtaining a type object clazz of an AssetManager Class by a forName method of the Class, wherein the Class is a Class which represents all classes in java, it provides many functions for java class reflection, which accepts a string description of a class, the AssetManager class package name "android. Then calling the getConstructor method of clazz to obtain the construction method of the AssetManager class, finally calling the newInstance () method to create an AssetManager object, calling the addAssetPath method of the AssetManager object to specify the path of the loading resource after the AssetManager object is created, and the addesstop path is also a hidden method name and also needs to be called by reflection, firstly, a getDescaled method of clazz is called to obtain an object of the addasstop path method, a first parameter of the getDescaled method receives a method character string description needing reflection, i.e., addassetPath, the second parameter is the type of parameter that requires the reflection method, the parameter of the addassetPath method is the path name, the type is String, so the second parameter passes string class, and finally the invoke method of the addasspath method object is called to execute the addasspath method. Wherein invoke is a method calling step in reflection, and when a method is reflected, getDelaredMethod only gets the method object, so it also needs to call invoke the invoke method to actually execute the method to be reflected.
Further, the process of creating custom Resources objects is as follows: the resource class construction needs three parameters, the first is an AssetManager object, and simultaneously, a path of an installation package file is set to be a path of a resource by calling an addassetPath method, the second parameter is an object of a DisplayMetrics class, the DisplayMetrics class can obtain information such as a mobile phone screen size, so that a DisplayMetrics object is directly created, the third parameter is a Configuration object which controls a series of information such as a mobile phone horizontal screen and a mobile phone vertical screen, the DisplayMetrics object is directly obtained and transmitted through a context object in the installation package, namely, a getConfiguration () method is called, the context is a context environment representing an android application program, various environments in which the android program runs can be accessed through the context, and when the self-defined Resources are realized, the Resources are loaded and decrypted to call and read the resource in the resource installation package.
Based on the same inventive concept, an embodiment of the present invention further provides an apparatus for generating an application installation package, as shown in fig. 3, where the apparatus includes:
a first obtaining module 301, configured to obtain an installation resource of an application;
a loading module 302, configured to parse a first resource used for loading a main interface of an application from the installation resource;
a generating module 303, configured to generate an application installation package according to the first resource.
Based on the same inventive concept, an embodiment of the present invention further provides a loading apparatus for an application installation package, as shown in fig. 4, the apparatus includes:
a second obtaining module 401, configured to obtain an application installation package generated according to a first resource, where the first resource is a resource used for loading a main interface of an application;
an installation module 402, configured to install the application according to the application installation package, so that the main interface can be loaded when a user opens the application.
One or more technical solutions in the embodiments of the present invention have at least the following technical effects or advantages:
according to the method and the device, the first resource used for loading the main interface of the application program is analyzed from the installation resource of the application program, the application program installation package is generated according to the first resource, the application program can be installed by using the application program installation package, the main interface can be loaded after the user opens the installed application program, and the resources except for the main interface are not packaged in the application program installation package, so that the occupation of the application program installation package on the storage space is reduced.
Meanwhile, other resources except the first resource used for loading the main interface of the application program in the installation resources are packaged into a resource installation package, the resource installation package is placed in the server, and the resource installation package is acquired and loaded when needed, so that the resource distribution is effectively realized.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It will be appreciated by those skilled in the art that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in the application installation package generation apparatus and the application installation package loading apparatus according to embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.

Claims (6)

1. A method for generating an application installation package, the method comprising:
acquiring installation resources of an application program;
analyzing a first resource for loading a main interface of an application program from the installation resource;
generating an application program installation package according to the first resource;
generating a resource installation package according to a second resource except the first resource in the installation resources;
storing a first public key in a first key pair into the application program installation package, and simultaneously encrypting the resource installation package for the first time by using a first private key in the first key pair;
and storing a second private key in the second key pair into the application program installation package, and simultaneously encrypting the resource installation package for the second time by using a second public key in the second key pair.
2. The method for generating an application installation package according to claim 1, wherein after the parsing out the first resource for loading the main interface of the application from the installation resource, the method further comprises:
and temporarily storing a second resource except the first resource in the installation resources into an asset directory.
3. The method for generating an application installation package according to claim 1, wherein after said generating a resource installation package according to a second resource other than the first resource in the installation resources, the method further comprises:
and sending the resource installation package to a server.
4. A method for loading an application program installation package, the method comprising:
acquiring an application program installation package generated according to a first resource, wherein the first resource is used for loading a main interface of an application program;
installing the application program according to the application program installation package so that the main interface can be loaded when a user opens the application program;
when the current display interface of the application program is the main interface, judging whether opening operation for opening a secondary interface of the main interface exists or not;
when the opening operation exists, acquiring a resource installation package stored in a server, and loading the resource installation package;
decrypting the resource installation package encrypted by the second public key in the second key pair for the first time by using a second private key in the second key pair stored in the application installation package;
and carrying out secondary decryption on the resource installation package encrypted by the first private key in the first key pair by using the first public key in the first key pair stored in the application program installation package.
5. An apparatus for generating an application installation package, the apparatus comprising:
the first acquisition module is used for acquiring installation resources of the application program;
the loading module is used for analyzing a first resource used for loading a main interface of an application program from the installation resource;
the first generation module is used for generating an application program installation package according to the first resource;
a second generation module, configured to generate a resource installation package according to a second resource, except the first resource, in the installation resources;
the first encryption module is used for storing a first public key in a first key pair into the application program installation package and simultaneously encrypting the resource installation package for the first time by using a first private key in the first key pair;
and the second encryption module is used for storing a second private key in the second key pair into the application program installation package and simultaneously encrypting the resource installation package for the second time by using a second public key in the second key pair.
6. An apparatus for loading an application installation package, the apparatus comprising:
the second obtaining module is used for obtaining the application program installation package generated according to the first resource, wherein the first resource is used for loading the main interface of the application program;
the installation module is used for installing the application program according to the application program installation package so that the main interface can be loaded when a user opens the application program;
the judging module is used for judging whether opening operation for opening a secondary interface of the main interface exists or not when the current display interface of the application program is the main interface;
a third obtaining module, configured to, when the opening operation exists, obtain a resource installation package stored in a server, and load the resource installation package;
the first decryption module is used for decrypting the resource installation package encrypted by the second public key in the second key pair for the first time by using the second private key in the second key pair stored in the application program installation package;
and the second decryption module is used for decrypting the resource installation package encrypted by the first private key in the first key pair for the second time by using the first public key in the first key pair stored in the application program installation package.
CN201611130406.7A 2016-12-09 2016-12-09 Generation method, loading method and device of application program installation package Active CN106648770B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611130406.7A CN106648770B (en) 2016-12-09 2016-12-09 Generation method, loading method and device of application program installation package

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611130406.7A CN106648770B (en) 2016-12-09 2016-12-09 Generation method, loading method and device of application program installation package

Publications (2)

Publication Number Publication Date
CN106648770A CN106648770A (en) 2017-05-10
CN106648770B true CN106648770B (en) 2020-03-17

Family

ID=58824889

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611130406.7A Active CN106648770B (en) 2016-12-09 2016-12-09 Generation method, loading method and device of application program installation package

Country Status (1)

Country Link
CN (1) CN106648770B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108459861B (en) * 2018-01-16 2022-02-11 福建省天奕网络科技有限公司 Software installation method and system
CN108629189A (en) * 2018-03-20 2018-10-09 蔚来汽车有限公司 Engine end data guard method, device and vehicle

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102624741A (en) * 2012-03-30 2012-08-01 奇智软件(北京)有限公司 TLV (Threshold Limit Value) based data transmission method and system thereof
CN103544025A (en) * 2012-07-10 2014-01-29 腾讯科技(深圳)有限公司 Online game resource acquisition method and device
CN105278995A (en) * 2015-11-03 2016-01-27 努比亚技术有限公司 Management method of application, system, server and mobile terminal

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140372998A1 (en) * 2013-06-14 2014-12-18 Microsoft Corporation App package deployment
CN104917807B (en) * 2015-03-19 2016-08-24 腾讯科技(深圳)有限公司 Resource transfers methods, devices and systems
CN105554008B (en) * 2015-12-28 2018-12-14 联想(北京)有限公司 User terminal, certificate server, intermediate server, system and transfer approach

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102624741A (en) * 2012-03-30 2012-08-01 奇智软件(北京)有限公司 TLV (Threshold Limit Value) based data transmission method and system thereof
CN103544025A (en) * 2012-07-10 2014-01-29 腾讯科技(深圳)有限公司 Online game resource acquisition method and device
CN105278995A (en) * 2015-11-03 2016-01-27 努比亚技术有限公司 Management method of application, system, server and mobile terminal

Also Published As

Publication number Publication date
CN106648770A (en) 2017-05-10

Similar Documents

Publication Publication Date Title
CN107220083B (en) Method and system for installation-free operation of application program in android system
US9934375B2 (en) Secured execution of a web application
CN111143869B (en) Application package processing method and device, electronic equipment and storage medium
US9900161B2 (en) Method for certifying android client application by local service unit
CN107528865B (en) File downloading method and system
CN111163095B (en) Network attack analysis method, network attack analysis device, computing device, and medium
WO2015192637A1 (en) Method and apparatus for reinforced protection of software installation package
CN112861191B (en) Application program monitoring method and device
CN109660353A (en) A kind of application program installation method and device
CN111163094B (en) Network attack detection method, network attack detection device, electronic device, and medium
CN109474600B (en) Account binding method, system, device and equipment
US10826901B2 (en) Systems and method for cross-channel device binding
CN106648770B (en) Generation method, loading method and device of application program installation package
CN111159712B (en) Detection method, device and storage medium
US20180101485A1 (en) Method and apparatus for accessing private data in physical memory of electronic device
CN110602051B (en) Information processing method based on consensus protocol and related device
CN113055182A (en) Authentication method and system, terminal, server, computer system, and medium
CN112115430A (en) Apk reinforcement method, electronic equipment and storage medium
CN114615087B (en) Data sharing method, device, equipment and medium
CN114329535A (en) File encryption method and device, electronic equipment and computer readable medium
CN111984963B (en) Method and apparatus for bypassing self-signed certificate verification
CN116628696A (en) Vulnerability detection method based on proxy client and related equipment
CN116112172B (en) Android client gRPC interface security verification method and device
Jagdale et al. Issues of cryptographic performance in resource-constrained devices: an experimental study
CN116389459A (en) File downloading method and device, storage medium and computer equipment

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
GR01 Patent grant
GR01 Patent grant