CN104573416A - Method and device for generating application installation package and executing application - Google Patents

Method and device for generating application installation package and executing application Download PDF

Info

Publication number
CN104573416A
CN104573416A CN201310512425.6A CN201310512425A CN104573416A CN 104573416 A CN104573416 A CN 104573416A CN 201310512425 A CN201310512425 A CN 201310512425A CN 104573416 A CN104573416 A CN 104573416A
Authority
CN
China
Prior art keywords
code
file
executable file
function
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.)
Granted
Application number
CN201310512425.6A
Other languages
Chinese (zh)
Other versions
CN104573416B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201310512425.6A priority Critical patent/CN104573416B/en
Priority to TW103126982A priority patent/TWI530874B/en
Priority to PCT/CN2014/088279 priority patent/WO2015058620A1/en
Publication of CN104573416A publication Critical patent/CN104573416A/en
Application granted granted Critical
Publication of CN104573416B publication Critical patent/CN104573416B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/12Protecting executable software
    • G06F21/14Protecting executable software against software analysis or reverse engineering, e.g. by obfuscation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2107File encryption

Abstract

The invention discloses a method and a device for generating an application installation package and executing an application, and belongs to the technical field of computers. The method comprises the following steps of decompressing the application installation package, and obtaining an executable file containing application logic in the application installation package, and a first file, except the executable file; modifying the statement type of a function for realizing the application logic in a code of the executable file, and encrypting a code corresponding to the function for realizing the application logic; repackaging the first file, the modified executable file and a preset dynamic link library, and generating the application installation package corresponding to the application. The method has the advantages that by modifying the statement type of the function for realizing the function logic in the executable file containing the application logic in the application installation package, and encrypting the code corresponding to the function, the application installation package is regenerated; the logic for realizing the application in the application installation package can be hidden, so the logic cannot be modified by other persons, and the security of the application is improved.

Description

A kind of generation applies installation kit, the method performing application and device
Technical field
The present invention relates to field of computer technology, particularly a kind of generation applies installation kit, the method performing application and device.
Background technology
Along with the development of Android operation system and application technology, in Android operation system, occur that types of applications is to meet the various demands of user.In the process of Application and Development, in order to prevent the file applied in installation kit to be modified, and the malicious act of packing and issuing again, need a kind of method providing code of the installation kit file to application to protect.
In prior art; the mode providing a kind of Code obfuscation carrys out the code of the installation kit file of protection application; its principle is that category information title, function name, name variable in code are revised as the not readable code name not identical with Old Name; to increase the difficulty that other developers understand the code of this application, to reach the effect of the code of the installation file of protection application.Such as certain function is called display(), this function names all in the code of installation file are revised as D(), now other developers cannot determine the concrete meaning of this function by this function name.
Realizing in process of the present invention, inventor finds that prior art at least exists following problem:
By the mode of Code obfuscation, be only the increase in the difficulty of cognizance code, cannot protect logic and the data of the code of the installation kit file of this application, therefore the file applied in installation kit also has the possibility be modified.
Summary of the invention
In order to solve the problem of prior art, embodiments providing a kind of generation and applying installation kit, the method performing application and device.Described technical scheme is as follows:
On the one hand, provide a kind of method generating application installation kit, described method comprises:
By to application installation kit decompression, obtain in described application installation kit and include the executable file of the logic of described application and the first file except described executable file;
In the code of described executable file, amendment realizes the Examples of types of claims of the function of described applied logic, and is encrypted by code corresponding for the function realizing described applied logic;
By described first file, amended described executable file and default dynamic link library, repack and generate application installation kit corresponding to described application, wherein said dynamic link library is for reducing Examples of types of claims corresponding to the function that realizes described applied logic, and the code corresponding to the function realizing described applied logic is decrypted.
On the other hand, provide a kind of method performing application, described method comprises:
When system cloud gray model application installation kit, obtain the executable file including the logic of described application in described application installation kit, the first file except described executable file and default dynamic link library;
Call described dynamic link library, in the code of described executable file, reduction realizes the Examples of types of claims of the function of described applied logic, and is decrypted by code corresponding for the function realizing described applied logic;
According to described first file, amended described executable file performs described application.
On the other hand, provide a kind of device generating application installation kit, described device comprises:
First acquisition module, for by application installation kit decompression, obtains in described application installation kit and includes the executable file of the logic of described application and the first file except described executable file;
First modified module, in the code of described executable file, amendment realizes the Examples of types of claims of the function of described applied logic, and is encrypted by code corresponding for the function realizing described applied logic;
Packetization module, for by described first file, amended described executable file and default dynamic link library, repack and generate application installation kit corresponding to described application, wherein said dynamic link library is for reducing Examples of types of claims corresponding to the function that realizes described applied logic, and the code corresponding to the function realizing described applied logic is decrypted.
On the other hand, provide a kind of device performing application, described device comprises:
3rd acquisition module, for when system cloud gray model application installation kit, obtains the executable file including the logic of described application in described application installation kit, the first file except described executable file and default dynamic link library;
Second modified module, for calling described dynamic link library, in the code of described executable file, reduction realizes the Examples of types of claims of the function of described applied logic, and is decrypted by code corresponding for the function realizing described applied logic;
Execution module, for according to described first file, amended described executable file performs described application.
The beneficial effect that the technical scheme that the embodiment of the present invention provides is brought is:
Realize the Examples of types of claims of the function of applied logic and encrypt code corresponding to this function by the executable file including the logic of application in amendment application installation kit, to regenerate this application installation kit.Can the logic realizing this application in hiden application installation kit, cannot be revised by other staff, improve the security of application.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing used required in describing embodiment is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the method flow diagram of the generation application installation kit that the embodiment of the present invention one provides;
Fig. 2 is the method flow diagram of the generation application installation kit that the embodiment of the present invention two provides;
Fig. 3 is the method flow diagram of the execution application that the embodiment of the present invention three provides;
Fig. 4 is the method flow diagram of the execution application that the embodiment of the present invention four provides;
Fig. 5 is the apparatus structure schematic diagram of the generation application installation kit that the embodiment of the present invention five provides;
Fig. 6 is the apparatus structure schematic diagram of the execution application that the embodiment of the present invention six provides.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
Embodiment one
Embodiments provide a kind of method generating application installation kit, see Fig. 1, method flow comprises:
101: by application installation kit decompression, obtain in application installation kit and include the executable file of the logic of application and the first file except executable file;
102: in the code of executable file, amendment realizes the Examples of types of claims of the function of applied logic, and is encrypted by code corresponding for the function realizing applied logic;
103: by the first file, amended executable file and default dynamic link library, repack and generate application installation kit corresponding to application, wherein dynamic link library is for reducing Examples of types of claims corresponding to the function that realizes applied logic, and the code corresponding to the function realizing applied logic is decrypted.
The embodiment of the present invention realizes the Examples of types of claims of the function of applied logic and encrypts code corresponding to this function by the executable file including the logic of application in amendment application installation kit, to regenerate this application installation kit.Can the logic realizing this application in hiden application installation kit, cannot be revised by other staff, improve the security of application.
Embodiment two
Embodiments provide a kind of method generating application installation kit, see Fig. 2, method flow comprises:
201: by application installation kit decompression, obtain in application installation kit and include the executable file of the logic of application and the first file except executable file.
Wherein, the installation kit of Android application typically uses ZIP compressed file format, therefore can decompress according to the installation kit of normal ZIP decompression mode to this application, the various files be applied in installation kit.
Wherein, the necessary file meeting Android regulation must be comprised in the file in application installation kit, the dynamic link library file write by other language (such as: C Plus Plus) can also be comprised.Android application is write primarily of JAVA language, but because JAVA language can not complete some functions be combined with system, because herein is provided the scheme realized by other language, and stated by Native method, in order to state that the method is not that JAVA language realizes, and need to call dynamic link library file to call to load method corresponding to dynamic link library.
202: in the code of executable file, amendment realizes the Examples of types of claims of the function of applied logic, and is encrypted by code corresponding for the function realizing applied logic.
Wherein, for the Examples of types of claims of Modification growth function, need the function list that different needs amendments can corresponding be set according to dissimilar application in advance.Such as: for communication class application, then the function of communication class is chosen as the function in the function list of the corresponding needs amendment arranged of such application.
Wherein, step 202 can be specially:
2021: decompiling executable file, obtain the code of executable file.
Wherein, executable file is the classes.dex file in installation kit.
2022: in the code of executable file, the Examples of types of claims of the function realizing applied logic is revised as the Examples of types of claims calling function in dynamic link library.
Wherein, in order to the code of the installation kit file of protection application is not revised by other developers, the embodiment of the present invention is by again stating the function realizing applied logic in application and encrypt, to make other developer's None-identifieds and to revise code.In embodiments of the present invention, after Examples of types of claims being modified by the mode of method step 202, if this application is revised by other developers and after repacking, is cannot find corresponding function according to this amended Examples of types of claims, therefore cannot be normally performed by system.
Wherein, the mode of concrete modification Examples of types of claims is: Examples of types of claims corresponding for function in normal JAVA is revised as Examples of types of claims corresponding to Native method, and the Examples of types of claims that wherein Native method is corresponding is Examples of types of claims corresponding to the function called in dynamic link library.
Illustrate: in class HelloWorld, have a function displayHelloWorld.
Original claim is: public void displayHelloWorld ();
Be revised as: public native void displayHelloWorld ().
If after the code in the installation file of this application is modified, when cannot carry out reducing correct Examples of types of claims, system then can go to search corresponding dynamic link library file according to Native method, and when finding and load dynamic link library, then can normally run this application.
2023: according to the cryptographic algorithm preset, code corresponding for the function realizing applied logic is encrypted.
2024: the positional information of the Examples of types of claims that the function realizing applied logic that record is modified is corresponding, and positional information is stored in the preset memory locations in the code of executable file.
Carry out recording and saving as positional information for the location revision of the function of amendment in step 2022, wherein location revision can be the line number in code, and this positional information does not limit.After saving positional information, this positional information is stored in the preset memory locations of code, to carry out the reduction of Examples of types of claims by searching positional information when performing this application.
2025: the executable file that the code building compiling executable file is modified.
Wherein, this process is the step regenerating amended classes.dex.
203: obtain the Install and configure file in the first file.
204: in the preset field of Install and configure file, be added into the code calling default dynamic link library.
Wherein, the file that the dynamic link libraries added in step 204 is corresponding, calls the dynamic link library Examples of types of claims that also original function is corresponding in advance time in embodiments of the present invention to make execution apply and the code corresponding to function is decrypted.
Wherein, in the preset field of Install and configure file, in step 204, be added into the process of the code calling default dynamic link library, can be specially:
2041: judge whether have preset field in Install and configure file.
Wherein, judge whether to there is preset field, be at AndroidManifest.xml(Install and configure file) search whether there is application joint in file, and whether there is android:name attribute field in the field.
2042: if there is preset field, be then added into the code calling default dynamic link library in the category information of specifying in preset field.
Wherein, preset field in Install and configure information is applied in the operation entrance be executed in Android operation system, the content arranged in this preset field can be first called when applying execution, therefore added by the code calling default dynamic link library in the category information of specifying, this dynamic link library also can be called by this category information of specifying of first calling when applying and performing.
2043: if there is not preset field, be then added into preset field at Install and configure document allocation and in preset field, add the category information of specifying, in the category information of specifying in preset field, being added into the code calling default dynamic link library.
205: by the first file, amended executable file and default dynamic link library, repack and generate application installation kit corresponding to application.
Wherein dynamic link library is for reducing Examples of types of claims corresponding to the function that realizes applied logic, and the code corresponding to the function realizing applied logic is decrypted.
File corresponding for the dynamic link library of amended classes.dex file, AndroidManifest.xml, interpolation and other unmodified files are repacked the application installation kit generating this application.
The embodiment of the present invention realizes the Examples of types of claims of the function of applied logic and encrypts code corresponding to this function by the executable file including the logic of application in amendment application installation kit, to regenerate this application installation kit.Can the logic realizing this application in hiden application installation kit, cannot be revised by other staff, improve the security of application.
Embodiment three
Embodiments provide a kind of method performing application, see Fig. 3, method flow comprises:
301: when system cloud gray model application installation kit, obtain the executable file including the logic of application in application installation kit, the first file except executable file and default dynamic link library;
302: call dynamic link library, in the code of executable file, reduction realizes the Examples of types of claims of the function of applied logic, and is decrypted by code corresponding for the function realizing applied logic;
303: according to the first file, amended executable file performs application.
When the embodiment of the present invention performs the application installation kit of repacking, by the dynamic link library preset, the function that original executable file including the logic of application being modified Examples of types of claims realizes applied logic is reduced, and be decrypted and restore original application installation kit, to perform the application through safety encipher, improve the security of application.
Embodiment four
Embodiments provide a kind of method performing application, see Fig. 4, method flow comprises:
401: when system cloud gray model application installation kit, obtain the executable file including the logic of application in application installation kit, the first file except executable file and default dynamic link library.
402: call dynamic link library, in the code of executable file, reduction realizes the Examples of types of claims of the function of applied logic, and is decrypted by code corresponding for the function realizing applied logic.
Wherein, the process calling dynamic link library in step 402 can be specially:
4021: in the first file, obtain Install and configure file, and the category information of specifying is called according to the content in preset field in Install and configure file.
When performing application, this application can be performed according to pre-configured content in the Install and configure file in application installation kit.
Being provided with the category information of specifying in the preset field of the Install and configure file in this application installation kit, therefore when performing application, first can having called this category information of specifying.
Wherein, first the content arranged in the preset field in Install and configure file, for first called when applying execution, therefore can call category information.
4022: according to the code calling default dynamic link library added in advance in category information, call dynamic link library.
Due to when generating this and quoting installation kit, the code calling default dynamic link library has been added in Install and configure file, therefore when calling the category information of specifying, then can perform the code calling default dynamic link library, thus have invoked this dynamic link library.
Wherein, call the storing path having file corresponding to this dynamic link library in the code of default dynamic link library, therefore can find file corresponding to this dynamic link library according to this path and call.
This dynamic link library is used for reduction in step 402 and realizes the Examples of types of claims of the function of applied logic, and is decrypted by code corresponding for the function realizing applied logic.Wherein, this process is the reverse implementation of step 202 correspondence in embodiment two, and by going back Examples of types of claims corresponding to original function, and the code corresponding to the function of encryption is decrypted the executable file obtaining correct application.
Wherein, in step 402, reduction realizes the Examples of types of claims of the function of applied logic, and the process that code corresponding for the function realizing applied logic is decrypted is specially:
4023: decompiling executable file, obtain the code of executable file.
Wherein, this executable file is claesses.dex file.
4024: the preset memory locations in the code of executable file, find the positional information of Examples of types of claims corresponding to the function realizing applied logic that is modified;
4025: find the function realizing applied logic be modified according to positional information, and Examples of types of claims corresponding for function is revised as the Examples of types of claims calling JAVA function.
4026: according to the decipherment algorithm preset, code corresponding for the function realizing applied logic is decrypted.
4027: the code compiling the executable file be modified regenerates amended executable file.
403: according to the first file, amended executable file performs application.
Wherein, after step 402 is finished, the content that beginning and end at the beginning of executable file classes.dex in this application installation kit has been reduced to are modified, therefore can perform this application by other file in this executable file and this application installation kit normally.
When the embodiment of the present invention performs the application installation kit of repacking, by the dynamic link library preset, the function that original executable file including the logic of application being modified Examples of types of claims realizes applied logic is reduced, and be decrypted and restore original application installation kit, to perform the application through safety encipher, improve the security of application.
Embodiment five
Embodiments provide a kind of device generating application installation kit, see Fig. 5, this device comprises:
First acquisition module 501, for by application installation kit decompression, obtains in application installation kit and includes the executable file of the logic of application and the first file except executable file;
First modified module 502, in the code of executable file, amendment realizes the Examples of types of claims of the function of applied logic, and is encrypted by code corresponding for the function realizing applied logic;
Packetization module 503, for by the first file, amended executable file and default dynamic link library, repack and generate application installation kit corresponding to application, wherein dynamic link library is for reducing Examples of types of claims corresponding to the function that realizes applied logic, and the code corresponding to the function realizing applied logic is decrypted.
Wherein, the first modified module 502, comprising:
First decompiling unit, for decompiling executable file, obtains the code of executable file;
First amendment unit, in the code of executable file, is revised as the Examples of types of claims calling function in dynamic link library by the Examples of types of claims of the function realizing applied logic;
Ciphering unit, for according to the cryptographic algorithm preset, is encrypted code corresponding for the function realizing applied logic;
Storage unit, for recording the positional information of Examples of types of claims corresponding to the function realizing applied logic that is modified, and is stored in the preset memory locations in the code of executable file by positional information;
First compilation unit, the executable file that the code building for compiling executable file is modified.
Wherein, device also comprises:
Second acquisition module 504, for obtaining the Install and configure file in the first file;
Add module 505, for being added into the code calling default dynamic link library in the preset field of Install and configure file.
Wherein, add module 505, comprising:
Judging unit, for judging whether have preset field in Install and configure file;
First adding device, if for there is preset field, is then added into the code calling default dynamic link library in the category information of specifying in preset field;
Second adding device, if for there is not preset field, then be added into preset field at Install and configure document allocation and in preset field, add the category information of specifying, in the category information of specifying in preset field, being added into the code calling default dynamic link library.
The embodiment of the present invention realizes the Examples of types of claims of the function of applied logic and encrypts code corresponding to this function by the executable file including the logic of application in amendment application installation kit, to regenerate this application installation kit.Can the logic realizing this application in hiden application installation kit, cannot be revised by other staff, improve the security of application.
Embodiment six
Embodiments provide a kind of device performing application, see Fig. 6, this device comprises:
3rd acquisition module 601, for when system cloud gray model application installation kit, obtains the executable file including the logic of application in application installation kit, the first file except executable file and default dynamic link library;
Second modified module 602, for calling dynamic link library, in the code of executable file, reduction realizes the Examples of types of claims of the function of applied logic, and is decrypted by code corresponding for the function realizing applied logic;
Execution module 603, for according to the first file, amended executable file performs application.
Wherein, the second modified module 602, comprising:
First call unit, for obtaining Install and configure file in the first file, and calls the category information of specifying according to the content in preset field in Install and configure file;
Second call unit, for according to the code calling default dynamic link library added in advance in category information, calls dynamic link library.
Wherein, the second modified module 602, also comprises:
Second decompiling unit, for decompiling executable file, obtains the code of executable file;
Search unit, for the preset memory locations in the code of executable file, find the positional information of Examples of types of claims corresponding to the function realizing applied logic that is modified;
Second amendment unit, for finding the function realizing applied logic be modified according to positional information, and is revised as the Examples of types of claims calling JAVA function by Examples of types of claims corresponding for function;
Decryption unit, for according to the decipherment algorithm preset, is decrypted code corresponding for the function realizing applied logic;
Second compilation unit, the code for compiling the executable file be modified regenerates amended executable file.
When the embodiment of the present invention performs the application installation kit of repacking, by the dynamic link library preset, the function that original executable file including the logic of application being modified Examples of types of claims realizes applied logic is reduced, and be decrypted and restore original application installation kit, to perform the application through safety encipher, improve the security of application.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can have been come by hardware, the hardware that also can carry out instruction relevant by program completes, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be ROM (read-only memory), disk or CD etc.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (14)

1. generate a method for application installation kit, it is characterized in that, described method comprises:
By to application installation kit decompression, obtain in described application installation kit and include the executable file of the logic of described application and the first file except described executable file;
In the code of described executable file, amendment realizes the Examples of types of claims of the function of described applied logic, and is encrypted by code corresponding for the function realizing described applied logic;
By described first file, amended described executable file and default dynamic link library, repack and generate application installation kit corresponding to described application, wherein said dynamic link library is for reducing Examples of types of claims corresponding to the function that realizes described applied logic, and the code corresponding to the function realizing described applied logic is decrypted.
2. method according to claim 1, is characterized in that, described in the code of described executable file, and amendment realizes the Examples of types of claims of the function of described applied logic, and is encrypted by code corresponding for the function realizing described applied logic, comprising:
Executable file described in decompiling, obtains the code of described executable file;
In the code of described executable file, the Examples of types of claims of the function realizing described applied logic is revised as the Examples of types of claims calling function in dynamic link library;
According to the cryptographic algorithm preset, code corresponding for the function realizing described applied logic is encrypted;
The positional information of the Examples of types of claims that the function realizing described applied logic that record is modified is corresponding, and described positional information is stored in the preset memory locations in the code of described executable file;
The described executable file that the code building compiling described executable file is modified.
3. method according to claim 1, is characterized in that, after the executable file including the logic of described application in described acquisition described application installation kit and the first file except described executable file, described method also comprises:
Obtain the Install and configure file in described first file;
The code calling default dynamic link library is added in the preset field of described Install and configure file.
4. method according to claim 3, is characterized in that, describedly in the preset field of described Install and configure file, is added into the code calling default dynamic link library, comprising:
Judge whether have preset field in described Install and configure file;
If there is described preset field, be then added into the code calling default dynamic link library in the category information of specifying in described preset field;
If there is not described preset field, then be added into preset field at described Install and configure document allocation and in described preset field, add the category information of specifying, in the category information of specifying in described preset field, being added into the code calling default dynamic link library.
5. perform a method for application, it is characterized in that, described method comprises:
When system cloud gray model application installation kit, obtain the executable file including the logic of described application in described application installation kit, the first file except described executable file and default dynamic link library;
Call described dynamic link library, in the code of described executable file, reduction realizes the Examples of types of claims of the function of described applied logic, and is decrypted by code corresponding for the function realizing described applied logic;
According to described first file, amended described executable file performs described application.
6. method according to claim 5, is characterized in that, described in call described dynamic link library, comprising:
In described first file, obtain Install and configure file, and call the category information of specifying according to the content in preset field in described Install and configure file;
According to the code calling default dynamic link library added in advance in described category information, call described dynamic link library.
7. method according to claim 5, is characterized in that, the described Examples of types of claims realizing the function of described applied logic of reducing in the code of described executable file, and is decrypted by code corresponding for the function realizing described applied logic, comprising:
Executable file described in decompiling, obtains the code of described executable file;
Preset memory locations in the code of described executable file, finds the positional information of Examples of types of claims corresponding to the function realizing described applied logic that is modified;
Find the function realizing described applied logic be modified according to described positional information, and Examples of types of claims corresponding for described function is revised as the Examples of types of claims calling JAVA function;
According to the decipherment algorithm preset, code corresponding for the function realizing described applied logic is decrypted;
The code compiling the described executable file be modified regenerates amended described executable file.
8. generate a device for application installation kit, it is characterized in that, described device comprises:
First acquisition module, for by application installation kit decompression, obtains in described application installation kit and includes the executable file of the logic of described application and the first file except described executable file;
First modified module, in the code of described executable file, amendment realizes the Examples of types of claims of the function of described applied logic, and is encrypted by code corresponding for the function realizing described applied logic;
Packetization module, for by described first file, amended described executable file and default dynamic link library, repack and generate application installation kit corresponding to described application, wherein said dynamic link library is for reducing Examples of types of claims corresponding to the function that realizes described applied logic, and the code corresponding to the function realizing described applied logic is decrypted.
9. device according to claim 8, is characterized in that, described first modified module, comprising:
First decompiling unit, for executable file described in decompiling, obtains the code of described executable file;
First amendment unit, in the code of described executable file, is revised as the Examples of types of claims calling function in dynamic link library by the Examples of types of claims of the function realizing described applied logic;
Ciphering unit, for according to the cryptographic algorithm preset, is encrypted code corresponding for the function realizing described applied logic;
Storage unit, for recording the positional information of Examples of types of claims corresponding to the function realizing described applied logic that is modified, and is stored in the preset memory locations in the code of described executable file by described positional information;
First compilation unit, the described executable file that the code building for compiling described executable file is modified.
10. device according to claim 8, is characterized in that, described device also comprises:
Second acquisition module, for obtaining the Install and configure file in described first file;
Add module, for being added into the code calling default dynamic link library in the preset field of described Install and configure file.
11. devices according to claim 10, is characterized in that, described interpolation module, comprising:
Judging unit, for judging whether have preset field in described Install and configure file;
First adding device, if for there is described preset field, be then added into the code calling default dynamic link library in the category information of specifying in described preset field;
Second adding device, if for there is not described preset field, then be added into preset field at described Install and configure document allocation and in described preset field, add the category information of specifying, in the category information of specifying in described preset field, being added into the code calling default dynamic link library.
12. 1 kinds of devices performing application, it is characterized in that, described device comprises:
3rd acquisition module, for when system cloud gray model application installation kit, obtains the executable file including the logic of described application in described application installation kit, the first file except described executable file and default dynamic link library;
Second modified module, for calling described dynamic link library, in the code of described executable file, reduction realizes the Examples of types of claims of the function of described applied logic, and is decrypted by code corresponding for the function realizing described applied logic;
Execution module, for according to described first file, amended described executable file performs described application.
13. devices according to claim 12, is characterized in that, described second modified module, comprising:
First call unit, for obtaining Install and configure file in described first file, and calls the category information of specifying according to the content in preset field in described Install and configure file;
Second call unit, for according to the code calling default dynamic link library added in advance in described category information, calls described dynamic link library.
14. devices according to claim 12, is characterized in that, described second modified module, comprising:
Second decompiling unit, for executable file described in decompiling, obtains the code of described executable file;
Search unit, for the preset memory locations in the code of described executable file, find the positional information of Examples of types of claims corresponding to the function realizing described applied logic that is modified;
Second amendment unit, for finding the function realizing described applied logic be modified according to described positional information, and is revised as the Examples of types of claims calling JAVA function by Examples of types of claims corresponding for described function;
Decryption unit, for according to the decipherment algorithm preset, is decrypted code corresponding for the function realizing described applied logic;
Second compilation unit, the code for compiling the described executable file be modified regenerates amended described executable file.
CN201310512425.6A 2013-10-25 2013-10-25 A kind of method and device for generating application installation package, executing application Active CN104573416B (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201310512425.6A CN104573416B (en) 2013-10-25 2013-10-25 A kind of method and device for generating application installation package, executing application
TW103126982A TWI530874B (en) 2013-10-25 2014-08-06 Method and apparatus for generating application installation packages and running applications
PCT/CN2014/088279 WO2015058620A1 (en) 2013-10-25 2014-10-10 Method and apparatus for generating installation package corresponding to an application and executing application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310512425.6A CN104573416B (en) 2013-10-25 2013-10-25 A kind of method and device for generating application installation package, executing application

Publications (2)

Publication Number Publication Date
CN104573416A true CN104573416A (en) 2015-04-29
CN104573416B CN104573416B (en) 2018-07-17

Family

ID=52992242

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310512425.6A Active CN104573416B (en) 2013-10-25 2013-10-25 A kind of method and device for generating application installation package, executing application

Country Status (3)

Country Link
CN (1) CN104573416B (en)
TW (1) TWI530874B (en)
WO (1) WO2015058620A1 (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105260184A (en) * 2015-10-15 2016-01-20 广东欧珀移动通信有限公司 Image recovery file debugging method and apparatus
CN106203007A (en) * 2015-05-08 2016-12-07 腾讯科技(深圳)有限公司 A kind of code process method, device and the equipment of calculating
CN107292135A (en) * 2017-06-06 2017-10-24 网易(杭州)网络有限公司 A kind of program code guard method and device
CN107766096A (en) * 2016-08-19 2018-03-06 阿里巴巴集团控股有限公司 The generation method of application program installation kit, the operation method of application program and device
CN105068832B (en) * 2015-07-30 2018-06-01 北京奇虎科技有限公司 A kind of method and apparatus for generating executable file
CN108228196A (en) * 2016-12-12 2018-06-29 腾讯科技(深圳)有限公司 The packaging method and device of application program
CN108388432A (en) * 2018-05-29 2018-08-10 浪潮软件股份有限公司 A kind of Android system Compilation Method and miniature compiling system
CN109033765A (en) * 2018-08-07 2018-12-18 麒麟合盛网络技术股份有限公司 The treating method and apparatus of application installation package
CN109408073A (en) * 2018-09-21 2019-03-01 北京大学 A kind of Android non-intrusion type application weight packaging method
CN112083930A (en) * 2020-09-14 2020-12-15 华帝股份有限公司 Optimization method for android project compiling process

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108279941B (en) * 2016-12-31 2021-06-15 阿里巴巴集团控股有限公司 Application program compression method and device
CN109062582B (en) * 2018-07-23 2022-02-01 北京云测信息技术有限公司 Encryption method and device for application installation package
CN109857454B (en) * 2018-12-15 2023-07-18 中国平安人寿保险股份有限公司 Method, device, electronic equipment and storage medium for generating and caching installation package
FR3094515B1 (en) * 2019-03-28 2021-09-10 Ingenico Group secure code execution process, corresponding devices, system and programs
CN110309630B (en) * 2019-06-28 2023-05-30 南京冰鉴信息科技有限公司 Java code encryption method and device
CN110837630B (en) * 2019-11-11 2022-02-08 维沃移动通信有限公司 Login method, image processing method and electronic device
CN114020278A (en) * 2020-07-19 2022-02-08 腾讯科技(深圳)有限公司 Data processing method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090249373A1 (en) * 2008-04-01 2009-10-01 Feitian Technologies Co., Ltd. Method for program protection based on .net card and a system thereof
CN102609284A (en) * 2012-02-01 2012-07-25 上海游安网络科技有限公司 Method for safely loading executable file
CN102760219A (en) * 2011-12-20 2012-10-31 北京安天电子设备有限公司 Android platform software protecting system, method and equipment
US20130145477A1 (en) * 2011-09-13 2013-06-06 Hideki Matsushima Content reproduction system, information processing terminal, media server, secure device, and server secure device
CN103246848A (en) * 2013-03-26 2013-08-14 北京深思数盾科技有限公司 Software security protection method and equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090249373A1 (en) * 2008-04-01 2009-10-01 Feitian Technologies Co., Ltd. Method for program protection based on .net card and a system thereof
US20130145477A1 (en) * 2011-09-13 2013-06-06 Hideki Matsushima Content reproduction system, information processing terminal, media server, secure device, and server secure device
CN102760219A (en) * 2011-12-20 2012-10-31 北京安天电子设备有限公司 Android platform software protecting system, method and equipment
CN102609284A (en) * 2012-02-01 2012-07-25 上海游安网络科技有限公司 Method for safely loading executable file
CN103246848A (en) * 2013-03-26 2013-08-14 北京深思数盾科技有限公司 Software security protection method and equipment

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106203007A (en) * 2015-05-08 2016-12-07 腾讯科技(深圳)有限公司 A kind of code process method, device and the equipment of calculating
CN105068832B (en) * 2015-07-30 2018-06-01 北京奇虎科技有限公司 A kind of method and apparatus for generating executable file
CN105260184B (en) * 2015-10-15 2019-02-19 Oppo广东移动通信有限公司 A kind of adjustment method and device for restoring image file
CN105260184A (en) * 2015-10-15 2016-01-20 广东欧珀移动通信有限公司 Image recovery file debugging method and apparatus
CN107766096A (en) * 2016-08-19 2018-03-06 阿里巴巴集团控股有限公司 The generation method of application program installation kit, the operation method of application program and device
CN108228196A (en) * 2016-12-12 2018-06-29 腾讯科技(深圳)有限公司 The packaging method and device of application program
CN107292135A (en) * 2017-06-06 2017-10-24 网易(杭州)网络有限公司 A kind of program code guard method and device
CN113761482A (en) * 2017-06-06 2021-12-07 杭州网易智企科技有限公司 Program code protection method and device
CN108388432A (en) * 2018-05-29 2018-08-10 浪潮软件股份有限公司 A kind of Android system Compilation Method and miniature compiling system
CN109033765A (en) * 2018-08-07 2018-12-18 麒麟合盛网络技术股份有限公司 The treating method and apparatus of application installation package
CN109408073A (en) * 2018-09-21 2019-03-01 北京大学 A kind of Android non-intrusion type application weight packaging method
CN109408073B (en) * 2018-09-21 2021-10-08 北京大学 Android non-invasive application repacking method
CN112083930A (en) * 2020-09-14 2020-12-15 华帝股份有限公司 Optimization method for android project compiling process

Also Published As

Publication number Publication date
CN104573416B (en) 2018-07-17
TW201516871A (en) 2015-05-01
TWI530874B (en) 2016-04-21
WO2015058620A1 (en) 2015-04-30

Similar Documents

Publication Publication Date Title
CN104573416A (en) Method and device for generating application installation package and executing application
US9116712B2 (en) Compile based obfuscation
WO2021217980A1 (en) Java code packing method and system
CN105022936A (en) Class file encryption and decryption method and class file encryption and decryption device
CN110059456B (en) Code protection method, code protection device, storage medium and electronic equipment
JP5337411B2 (en) Information concealment method and information concealment device
CN109598107B (en) Code conversion method and device based on application installation package file
JPH10301774A (en) Method for providing software package and provider station and user station for realizing the same method and basic software package
CN108229112A (en) A kind of operation method and device for protecting application program, application program
CN111832014B (en) Java SDK code encryption and decryption method and terminal based on dynamic loading
CN110309630B (en) Java code encryption method and device
CN105095771A (en) Method and apparatus for protecting shared target file
CN104298534A (en) Programming method and device based on Lua language
CN107871066B (en) Code compiling method and device based on android system
CN113568680A (en) Dynamic link library protection method, device, equipment and medium for application program
CN104866504B (en) A kind of method and device that Function Extension is carried out to Android software
JP2007094728A (en) Information processor, information processing system, program and recording medium
KR102272635B1 (en) System and method for converting large scale application
US20090193392A1 (en) Dynamic intermediate language modification and replacement
CN116257867A (en) Secret key encryption method and device
KR101436741B1 (en) The method and system for applying security solution program
CN113032741B (en) Class file encryption method, class file operation method, device, equipment and medium
CN115238249A (en) Application code obfuscation method, apparatus, device and medium
CN108170433A (en) A kind of Java code obscures method, restoration methods and its device
KR20180053872A (en) System and method for converting application

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant