CN104573416B - A kind of method and device for generating application installation package, executing application - Google Patents

A kind of method and device for generating application installation package, executing application Download PDF

Info

Publication number
CN104573416B
CN104573416B CN201310512425.6A CN201310512425A CN104573416B CN 104573416 B CN104573416 B CN 104573416B CN 201310512425 A CN201310512425 A CN 201310512425A CN 104573416 B CN104573416 B CN 104573416B
Authority
CN
China
Prior art keywords
code
logic
function
file
executable file
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
CN201310512425.6A
Other languages
Chinese (zh)
Other versions
CN104573416A (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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Technology Law (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Storage Device Security (AREA)

Abstract

The invention discloses a kind of generation application installation package, the method and device applied is executed, belongs to field of computer technology.Method includes:Pass through the executable file and the first file in addition to executable file that application installation package decompression, the logic for including application is obtained in application installation package;In the code of executable file, the statement type of the function using logic is realized in modification, and is encrypted realizing using the corresponding code of function of logic;By the first file, modified executable file and preset dynamic link library repack generation and apply corresponding application installation package.The present invention by change application installation package in include application logic executable file realize using logic function statement type and encrypt the corresponding code of the function, to regenerate the application installation package.It can not be changed by other staff with the logic for realizing the application in hiden application installation kit, improve the safety of application.

Description

A kind of method and device for generating application installation package, executing application
Technical field
The present invention relates to field of computer technology, more particularly to a kind of method for generating application installation package, executing application and Device.
Background technology
With the development of Android operation system and application technology, occur all kinds of answer in Android operation system To meet the various demands of user.During development and application, the file in application installation package is changed in order to prevent, and Repack the malicious act of publication, it is desirable to provide a method of the code of file in the installation kit of application is protected.
In the prior art, the code of file in a kind of installation kit of the mode of Code obfuscation to protect application is provided, Principle is that category information title, function name, name variable in code are revised as not readable and Old Name different generation Number, to increase the difficulty that other developers understand the code of the application, to reach the code of the installation file of protection application Effect.Such as by the entitled display of certain function(), all function names in the code of installation file are revised as D(), at this time its His developer can not determine the specific meaning of the function by the function name.
In the implementation of the present invention, the inventor finds that the existing technology has at least the following problems:
By way of Code obfuscation, it is only the increase in the difficulty of cognizance code, in the installation kit that the application can not be protected The logic and data of the code of file, therefore the file in application installation package also has the possibility changed.
Invention content
In order to solve problems in the prior art, an embodiment of the present invention provides a kind of generation application installation package, execute application Method and device.The technical solution is as follows:
On the one hand, a kind of method generating application installation package is provided, the method includes:
By to application installation package decompression, obtain in the application installation package include the application logic Executable file and the first file in addition to the executable file;
In the code of the executable file, the statement type of the function using logic is realized in modification, and will be real The existing corresponding code of the function using logic is encrypted;
By first file, the modified executable file and preset dynamic link library repack life At the corresponding application installation package of the application, wherein the dynamic link library realizes the function pair using logic for restoring The statement type answered, and to realizing that the corresponding code of the function using logic is decrypted.
On the other hand, a kind of method executing application is provided, the method includes:
In system operation application installation package, obtain in the application installation package include the application logic can Execute file, the first file in addition to the executable file and preset dynamic link library;
The dynamic link library is called, the reduction realization function using logic in the code of the executable file Statement type, and will realize that the corresponding code of the function using logic is decrypted;
According to first file, the modified executable file executes the application.
On the other hand, a kind of device generating application installation package is provided, described device includes:
First acquisition module, for including by application installation package decompression, obtaining in the application installation package There are the executable file of the logic of the application and the first file in addition to the executable file;
First modified module, in the code of the executable file, the function using logic to be realized in modification Statement type, and will realize that the corresponding code of the function using logic is encrypted;
Packetization module is used for first file, the modified executable file and preset dynamic link Library repacks and generates the corresponding application installation package of the application, wherein the dynamic link library is answered for restoring described in realization With the corresponding statement type of the function of logic, and to realizing that the corresponding code of the function using logic is decrypted.
On the other hand, a kind of device executing application is provided, described device includes:
Third acquisition module is obtained in the application installation package and includes in system operation application installation package The executable file of the logic of the application, the first file in addition to the executable file and preset dynamic link Library;
Second modified module is restored in the code of the executable file and is realized for calling the dynamic link library The statement type of the function using logic, and will realize that the corresponding code of the function using logic is decrypted;
Execution module, for according to first file, the modified executable file to execute the application.
The advantageous effect that technical solution provided in an embodiment of the present invention is brought is:
Executable file by changing in application installation package the logic for including application realizes the function using logic Statement type simultaneously encrypts the corresponding code of the function, to regenerate the application installation package.It can be in hiden application installation kit It realizes the logic of the application, can not be changed by other staff, improve the safety of application.
Description of the drawings
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for For those of ordinary skill in the art, without creative efforts, other are can also be obtained according to these attached drawings Attached drawing.
Fig. 1 is the method flow diagram for the generation application installation package that the embodiment of the present invention one provides;
Fig. 2 is the method flow diagram provided by Embodiment 2 of the present invention for generating application installation package;
Fig. 3 is the method flow diagram for the execution application that the embodiment of the present invention three provides;
Fig. 4 is the method flow diagram for the execution application that the embodiment of the present invention four provides;
Fig. 5 is the apparatus structure schematic diagram for the generation application installation package that the embodiment of the present invention five provides;
Fig. 6 is the apparatus structure schematic diagram for the execution application that the embodiment of the present invention six provides.
Specific implementation mode
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention Formula is described in further detail.
Embodiment one
An embodiment of the present invention provides a kind of methods generating application installation package, and referring to Fig. 1, method flow includes:
101:Include that the logic of application is held by application installation package decompression, obtaining in application installation package Style of writing part and the first file in addition to executable file;
102:In the code of executable file, the statement type of the function using logic is realized in modification, and realization is answered It is encrypted with the corresponding code of the function of logic;
103:By the first file, modified executable file and preset dynamic link library are repacked generation and are answered With corresponding application installation package, wherein dynamic link library is used to restore the corresponding statement type of function realized using logic, and It is decrypted using the corresponding code of function of logic to realizing.
The embodiment of the present invention realizes application by changing in application installation package the executable file for the logic for including application The statement type of the function of logic simultaneously encrypts the corresponding code of the function, to regenerate the application installation package.It can hide and answer With the logic for realizing the application in installation kit, it can not be changed by other staff, improve the safety of application.
Embodiment two
An embodiment of the present invention provides a kind of methods generating application installation package, and referring to Fig. 2, method flow includes:
201:Include that the logic of application is held by application installation package decompression, obtaining in application installation package Style of writing part and the first file in addition to executable file.
Wherein, the installation kit of Android applications typically uses ZIP compressed file formats, therefore can be according to normal ZIP Decompression mode unzips it the installation kit of the application, the various files being applied in installation kit.
Wherein, it has to, comprising necessary file as defined in Android is met, to wrap in the file in application installation package Containing passing through other language(Such as:C Plus Plus)The dynamic link library file write.Android application mainly by JAVA language Lai It is write, but since JAVA language can not complete some functions of being combined with system, is thus provided through other languages The scheme for saying to realize, and stated by Native methods, it is that JAVA language is realized, and is needed to state this method not Dynamic link library file is called to call the corresponding method of load dynamic link library.
202:In the code of executable file, the statement type of the function using logic is realized in modification, and realization is answered It is encrypted with the corresponding code of the function of logic.
Wherein, it for the statement type of Modification growth function, needs that previously according to different types of application difference can be correspondingly arranged The function list changed of needs.Such as:For communication class application, then the function for choosing communication class is set as such using correspondence Function in the function list that the needs set are changed.
Wherein, step 202 can be specially:
2021:Decompiling executable file obtains the code of executable file.
Wherein, executable file is the classes.dex files in installation kit.
2022:In the code of executable file, it is dynamic will to realize that the statement type using the function of logic is revised as calling The statement type of function in state chained library.
Wherein, the code of file is not changed by other developers in the installation kit in order to protect application, and the present invention is implemented Example is stated and is encrypted again using the function of logic by being realized in applying, so that other developer's None- identifieds are simultaneously Change code.In embodiments of the present invention, after being changed statement type by way of method and step 202, if the application It is that can not find corresponding function according to the modified statement type after being changed and repacked by other developers again, Therefore it can not normally be executed by system.
Wherein, the mode of concrete modification statement type is:The corresponding statement type of function in normal JAVA is revised as The corresponding statement type of the corresponding statement type of Native methods, wherein Native methods is the letter called in dynamic link library The corresponding statement type of number.
It illustrates:There are one function displayHelloWorld in class HelloWorld.
Original claim is:public void displayHelloWorld();
It is revised as:public native void displayHelloWorld().
If after the code in the installation file of the application is changed, when can not carry out restoring correctly statement type, being System can then go to search corresponding dynamic link library file according to Native methods, and can not find and load dynamic link library When, then it can be unable to operate normally the application.
2023:According to preset Encryption Algorithm, it is encrypted realizing using the corresponding code of function of logic.
2024:The location information of the realization changed using the corresponding statement type of function of logic is recorded, and by position Preset memory locations of the information storage in the code of executable file.
The location revision of function for being changed in step 2022 is recorded and is saved as location information, wherein changing position It can be the line number in code to set, which is not defined.After saving location information, which is deposited The preset memory locations of code are stored in, to carry out the reduction of statement type by searching for location information when executing the application.
2025:The executable file that the code building of compiling executable file is changed.
Wherein, this process is the step of regenerating modified classes.dex.
203:Obtain the installation configuration file in the first file.
204:The code for calling preset dynamic link library is added into the preset field of installation configuration file.
Wherein, the corresponding file of dynamic link libraries added in step 204, in embodiments of the present invention so as to execute application When call the dynamic link library corresponding statement type of reduction function in advance and the corresponding code of function be decrypted.
Wherein, it is added into the preset field of installation configuration file in step 204 and calls preset dynamic link library The process of code can be specially:
2041:Judge to whether there is in installation configuration file and has preset field.
Wherein, preset field is judged whether, as in AndroidManifest.xml(Configuration file is installed)File In search whether that there are application sections, and in the field whether there is android:Name attribute fields.
2042:If there is preset field, then it is added into the category information specified in preset field and calls preset move The code of state chained library.
Wherein, the preset field installed in configuration information is the operation applied in being executed at Android operation system Entrance, the content being arranged in the preset field can be called first in application execution, therefore will call preset dynamic link The code in library is added in specified category information, the dynamic link library also can first be called in application execution this is specified It is called in category information.
2043:If not there is no preset field, designated position is added into preset field and pre- in installing configuration file If specified category information is added in field, it is added into the category information specified in preset field and calls preset dynamic link library Code.
205:By the first file, modified executable file and preset dynamic link library are repacked generation and are answered With corresponding application installation package.
Wherein dynamic link library is used to restore the corresponding statement type of function realized using logic, and to realizing that application is patrolled The corresponding code of function collected is decrypted.
Modified classes.dex files, AndroidManifest.xml, the dynamic link library of addition is corresponding File and other unmodified files repack the application installation package for generating the application.
The embodiment of the present invention realizes application by changing in application installation package the executable file for the logic for including application The statement type of the function of logic simultaneously encrypts the corresponding code of the function, to regenerate the application installation package.It can hide and answer With the logic for realizing the application in installation kit, it can not be changed by other staff, improve the safety of application.
Embodiment three
An embodiment of the present invention provides a kind of methods executing application, and referring to Fig. 3, method flow includes:
301:In system operation application installation package, in acquisition application installation package includes the executable of the logic of application File, the first file in addition to executable file and preset dynamic link library;
302:Dynamic link library is called, the statement class for realizing the function using logic is restored in the code of executable file Type, and be decrypted realizing using the corresponding code of function of logic;
303:According to the first file, modified executable file executes application.
When the embodiment of the present invention executes the application installation package repacked, repaiied original by preset dynamic link library Correct one's mistakes statement type includes that the executable file of the logic of application is realized and restored using the function of logic, and is solved It is close to restore original application installation package, to execute by the encrypted application of safety, improve the safety of application.
Example IV
An embodiment of the present invention provides a kind of methods executing application, and referring to Fig. 4, method flow includes:
401:In system operation application installation package, in acquisition application installation package includes the executable of the logic of application File, the first file in addition to executable file and preset dynamic link library.
402:Dynamic link library is called, the statement class for realizing the function using logic is restored in the code of executable file Type, and be decrypted realizing using the corresponding code of function of logic.
Wherein, the process of dynamic link library is called in step 402 to be specially:
4021:Obtain installation configuration file in the first file, and according in installation configuration file in preset field in Hold and calls specified category information.
It is executing in application, this can be executed according to preconfigured content in the installation configuration file in application installation package Using.
It is already provided with specified category information in the preset field of installation configuration file in the application installation package, therefore It is executing in application, the category information that can call this specified first.
Wherein, the content being arranged in the preset field in configuration file is installed, for called first in application execution, Therefore category information can be called first.
4022:According to the pre-added code for calling preset dynamic link library in category information, dynamic link library is called.
Since when generating the reference installation kit, the preset dynamic chain of calling has been added into installing configuration file The code in library is connect, therefore when calling specified category information, then the code for calling preset dynamic link library can be executed, to adjust With the dynamic link library.
Wherein, the preservation road that the corresponding file of the dynamic link library is had in the code of preset dynamic link library is called Diameter, therefore the corresponding file of the dynamic link library can be found according to the path and be called.
The dynamic link library realizes the statement type of the function using logic for reduction in step 402, and will realize It is decrypted using the corresponding code of the function of logic.Wherein, to be that step 202 is corresponding in embodiment two reversely hold the process Row process is decrypted to obtain correctly by restoring the corresponding statement type of function, and to the corresponding code of encrypted function The executable file of application.
Wherein, the statement type of the function using logic is realized in reduction in step 402, and will realize the function for applying logic The process that corresponding code is decrypted is specially:
4023:Decompiling executable file obtains the code of executable file.
Wherein, which is claesses.dex files.
4024:Preset memory locations in the code of executable file find the realization changed using logic The location information of the corresponding statement type of function;
4025:The function of the realization changed using logic is found according to location information, and by the corresponding statement of function Type is revised as calling the statement type of JAVA functions.
4026:According to preset decipherment algorithm, it is decrypted realizing using the corresponding code of function of logic.
4027:The code for compiling the executable file changed regenerates modified executable file.
403:According to the first file, modified executable file executes application.
Wherein, after step 402 is finished, executable file classes.dex in the application installation package by It is reduced to the content that the first beginning and end are changed, therefore other files in the executable file and the application installation package can be passed through Normally execute the application.
When the embodiment of the present invention executes the application installation package repacked, repaiied original by preset dynamic link library Correct one's mistakes statement type includes that the executable file of the logic of application is realized and restored using the function of logic, and is solved It is close to restore original application installation package, to execute by the encrypted application of safety, improve the safety of application.
Embodiment five
An embodiment of the present invention provides a kind of devices generating application installation package, and referring to Fig. 5, which includes:
First acquisition module 501, for including by application installation package decompression, obtaining in application installation package The executable file of the logic of application and the first file in addition to executable file;
First modified module 502, in the code of executable file, the statement of the function using logic to be realized in modification Type, and be encrypted realizing using the corresponding code of function of logic;
Packetization module 503 is used for the first file, modified executable file and preset dynamic link library, weight It is newly packaged to generate and applies corresponding application installation package, wherein dynamic link library is used to restore realization corresponding using the function of logic It states type, and is decrypted using the corresponding code of function of logic to realizing.
Wherein, the first modified module 502, including:
First decompiling unit is used for decompiling executable file, obtains the code of executable file;
First modification unit, in the code of executable file, will realize the statement type for the function for applying logic It is revised as calling the statement type of function in dynamic link library;
Encryption unit, for according to preset Encryption Algorithm, being added realizing using the corresponding code of function of logic It is close;
Storage unit, the location information for recording the realization changed using the corresponding statement type of function of logic, And location information is stored in the preset memory locations in the code of executable file;
First compilation unit, the executable file that the code building for compiling executable file is changed.
Wherein, device further includes:
Second acquisition module 504, for obtaining the installation configuration file in the first file;
Add module 505 calls preset dynamic link library for being added into the preset field of installation configuration file Code.
Wherein, add module 505, including:
Judging unit has preset field for judging to install to whether there is in configuration file;
First adding device, for if there is preset field, being then added into the category information specified in preset field Call the code of preset dynamic link library;
Second adding device, if for not there is no preset field, designated position is added into installing configuration file Specified category information is added in preset field and preset field, it is default that calling is added into the category information specified in preset field Dynamic link library code.
The embodiment of the present invention realizes application by changing in application installation package the executable file for the logic for including application The statement type of the function of logic simultaneously encrypts the corresponding code of the function, to regenerate the application installation package.It can hide and answer With the logic for realizing the application in installation kit, it can not be changed by other staff, improve the safety of application.
Embodiment six
An embodiment of the present invention provides a kind of devices executing application, and referring to Fig. 6, which includes:
Third acquisition module 601 includes to answer in system operation application installation package, obtaining in application installation package The executable file of logic, the first file in addition to executable file and preset dynamic link library;
Second modified module 602 restores in the code of executable file for calling dynamic link library and realizes that application is patrolled The statement type for the function collected, and be decrypted realizing using the corresponding code of function of logic;
Execution module 603, for according to the first file, modified executable file to execute application.
Wherein, the second modified module 602, including:
First call unit, for obtaining installation configuration file in the first file, and according to pre- in installation configuration file If the content in field calls specified category information;
Second call unit, for according to the pre-added code for calling preset dynamic link library in category information, adjusting Use dynamic link library.
Wherein, the second modified module 602 further includes:
Second decompiling unit is used for decompiling executable file, obtains the code of executable file;
Searching unit finds the realization changed and answers for the preset memory locations in the code of executable file With the location information of the corresponding statement type of the function of logic;
Second modification unit, the function for finding the realization changed according to location information using logic, and by letter The corresponding statement type of number is revised as calling the statement type of JAVA functions;
Decryption unit, for according to preset decipherment algorithm, being solved realizing using the corresponding code of function of logic It is close;
Second compilation unit, the code for compiling the executable file changed regenerate modified executable text Part.
When the embodiment of the present invention executes the application installation package repacked, repaiied original by preset dynamic link library Correct one's mistakes statement type includes that the executable file of the logic of application is realized and restored using the function of logic, and is solved It is close to restore original application installation package, to execute by the encrypted application of safety, improve the safety of application.
The embodiments of the present invention are for illustration only, can not represent the quality of embodiment.
One of ordinary skill in the art will appreciate that realizing that all or part of step of above-described embodiment can pass through hardware It completes, relevant hardware can also be instructed to complete by program, the program can be stored in a kind of computer-readable In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all the present invention spirit and Within principle, any modification, equivalent replacement, improvement and so on should all be included in the protection scope of the present invention.

Claims (10)

1. a kind of method generating application installation package, which is characterized in that the method includes:
Include that the logic of the application is held by application installation package decompression, obtaining in the application installation package Style of writing part and the first file in addition to the executable file;
In the code of the executable file, the statement type of the function using logic is realized in modification, and will realize institute It states and is encrypted using the corresponding code of function of logic;
Obtain the installation configuration file in first file;
The code for calling preset dynamic link library is added into the preset field of the installation configuration file;
By first file, the modified executable file and preset dynamic link library repack and generate institute It states using corresponding application installation package, wherein the dynamic link library is described corresponding using the function of logic for restoring realization State type, and to realizing that the corresponding code of the function using logic is decrypted.
2. according to the method described in claim 1, it is characterized in that, described in the code of the executable file, modification is real The statement type of the existing function using logic, and will realize that the corresponding code of the function using logic is encrypted, Including:
Executable file described in decompiling obtains the code of the executable file;
In the code of the executable file, it will realize that the statement type of the function using logic is revised as calling dynamic The statement type of function in chained library;
According to preset Encryption Algorithm, it will realize that the corresponding code of the function using logic is encrypted;
The location information for the corresponding statement type of the realization function using logic changed is recorded, and the position is believed Breath is stored in the preset memory locations in the code of the executable file;
Compile the executable file that the code building of the executable file is changed.
3. according to the method described in claim 1, it is characterized in that, described add in the preset field of the installation configuration file The code for calling preset dynamic link library is added, including:
Judge to whether there is in the installation configuration file and has preset field;
If there is the preset field, then it is added into the category information specified in the preset field and calls preset dynamic The code of chained library;
If there is no the preset field, it is simultaneously described to be added into preset field for designated position in the installation configuration file Specified category information is added in preset field, is added into the category information specified in the preset field and calls preset dynamic The code of chained library.
4. a kind of method executing application, which is characterized in that the method includes:
In system operation application installation package, obtain in the application installation package include the application logic it is executable File, the first file in addition to the executable file and preset dynamic link library;
Installation configuration file is obtained in first file, and according to the content in preset field in the installation configuration file Call specified category information;
According to the pre-added code for calling preset dynamic link library in the category information, the dynamic link library is called;
The statement type of the function using logic is realized in reduction in the code of the executable file, and will be described in realization It is decrypted using the corresponding code of the function of logic;
According to first file, the modified executable file executes the application.
5. according to the method described in claim 4, it is characterized in that, described restored in the code of the executable file is realized The statement type of the function using logic, and will realize that the corresponding code of the function using logic is decrypted, it wraps It includes:
Executable file described in decompiling obtains the code of the executable file;
Preset memory locations in the code of the executable file find the realization letter using logic changed The location information of the corresponding statement type of number;
Find the realization function using logic changed according to the positional information, and by the corresponding sound of the function Bright type is revised as calling the statement type of JAVA functions;
According to preset decipherment algorithm, it will realize that the corresponding code of the function using logic is decrypted;
The code for compiling the executable file changed regenerates the modified executable file.
6. a kind of device generating application installation package, which is characterized in that described device includes:
First acquisition module, for by application installation package decompression, obtaining in the application installation package comprising State the executable file of the logic of application and the first file in addition to the executable file;
First modified module, in the code of the executable file, the sound of the function using logic to be realized in modification Bright type, and will realize that the corresponding code of the function using logic is encrypted;
Packetization module is used for first file, the modified executable file and preset dynamic link library, weight New packing generates the corresponding application installation package of the application, wherein the dynamic link library is for restoring, realization is described to apply logic The corresponding statement type of function, and to realizing that the corresponding code of the function using logic is decrypted;
Wherein, described device further includes:
Second acquisition module, for obtaining the installation configuration file in first file;
Add module, for being added into the generation for calling preset dynamic link library in the preset field of the installation configuration file Code.
7. device according to claim 6, which is characterized in that first modified module, including:
First decompiling unit obtains the code of the executable file for executable file described in decompiling;
First modification unit, in the code of the executable file, will realize the statement of the function using logic Type is revised as calling the statement type of function in dynamic link library;
Encryption unit, for according to preset Encryption Algorithm, will realize that the corresponding code of the function using logic is added It is close;
Storage unit, for recording the location information for realizing the corresponding statement type of the function using logic changed, And the location information is stored in the preset memory locations in the code of the executable file;
First compilation unit, the executable file that the code building for compiling the executable file is changed.
8. device according to claim 6, which is characterized in that the add module, including:
Judging unit has preset field for judging to whether there is in the installation configuration file;
First adding device, for if there is the preset field, then adding in the category information specified in the preset field The code for calling preset dynamic link library is added;
Second adding device, if for not there is no the preset field, designated position adds in the installation configuration file It is added in preset field and the preset field and specified category information is added, add in the category information specified in the preset field The code for calling preset dynamic link library is added.
9. a kind of device executing application, which is characterized in that described device includes:
Third acquisition module is used in system operation application installation package, and it includes described to obtain in the application installation package The executable file of the logic of application, the first file in addition to the executable file and preset dynamic link library;
Second modified module, for calling the dynamic link library, in the code of the executable file described in reduction realization Using the statement type of the function of logic, and it will realize that the corresponding code of the function using logic is decrypted;
Execution module, for according to first file, the modified executable file to execute the application;
Wherein, second modified module, including:
First call unit, for obtaining installation configuration file in first file, and according to the installation configuration file Content in middle preset field calls specified category information;
Second call unit, for according to the pre-added code for calling preset dynamic link library in the category information, adjusting With the dynamic link library.
10. device according to claim 9, which is characterized in that second modified module, including:
Second decompiling unit obtains the code of the executable file for executable file described in decompiling;
Searching unit finds the realization institute changed for the preset memory locations in the code of the executable file State the location information of the corresponding statement type of function using logic;
Second modification unit, for finding the realization function using logic changed according to the positional information, and It is revised as the corresponding statement type of the function to call the statement type of JAVA functions;
Decryption unit, for according to preset decipherment algorithm, will realize that the corresponding code of the function using logic solves It is close;
Second compilation unit, the code for compiling the executable file changed regenerate modified described can hold Style of writing part.
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 CN104573416A (en) 2015-04-29
CN104573416B true 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)

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106203007B (en) * 2015-05-08 2020-03-03 腾讯科技(深圳)有限公司 Code processing method and device and computing equipment
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
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
CN108279941B (en) * 2016-12-31 2021-06-15 阿里巴巴集团控股有限公司 Application program compression method and device
CN107292135A (en) * 2017-06-06 2017-10-24 网易(杭州)网络有限公司 A kind of program code guard method and device
CN108388432A (en) * 2018-05-29 2018-08-10 浪潮软件股份有限公司 A kind of Android system Compilation Method and miniature compiling system
CN109062582B (en) * 2018-07-23 2022-02-01 北京云测信息技术有限公司 Encryption method and device for application installation package
CN109033765A (en) * 2018-08-07 2018-12-18 麒麟合盛网络技术股份有限公司 The treating method and apparatus of application installation package
CN109408073B (en) * 2018-09-21 2021-10-08 北京大学 Android non-invasive application repacking method
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
CN113110841A (en) * 2020-01-13 2021-07-13 奇安信科技集团股份有限公司 Mobile application program generation method and device, electronic equipment and storage medium
CN114020278B (en) * 2020-07-19 2024-06-18 腾讯科技(深圳)有限公司 Data processing method, device, equipment and storage medium
CN112083930B (en) * 2020-09-14 2024-06-14 华帝股份有限公司 Optimization method for android project compiling process

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN103246848A (en) * 2013-03-26 2013-08-14 北京深思数盾科技有限公司 Software security protection method and equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101256612B (en) * 2008-04-01 2010-11-03 北京飞天诚信科技有限公司 Program protection method and system based on .Net card
JP5948680B2 (en) * 2011-09-13 2016-07-06 パナソニックIpマネジメント株式会社 Content playback system, information processing terminal, media server, secure device and server / secure device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Also Published As

Publication number Publication date
TWI530874B (en) 2016-04-21
WO2015058620A1 (en) 2015-04-30
CN104573416A (en) 2015-04-29
TW201516871A (en) 2015-05-01

Similar Documents

Publication Publication Date Title
CN104573416B (en) A kind of method and device for generating application installation package, executing application
US8090959B2 (en) Method and apparatus for protecting .net programs
CN105022936A (en) Class file encryption and decryption method and class file encryption and decryption device
US20180260199A1 (en) Method and apparatus for intermediate representation of applications
CN104680039B (en) A kind of data guard method and device of application program installation kit
CN108363911B (en) Python script obfuscating and watermarking method and device
CN106203006A (en) Android application reinforcement means based on dex Yu so file Dynamic Execution
CN110059456B (en) Code protection method, code protection device, storage medium and electronic equipment
US8615735B2 (en) System and method for blurring instructions and data via binary obfuscation
CN100492387C (en) Method and system for software protected development based on Keil C51
CN108932406A (en) Virtualization software guard method and device
CN103413076A (en) Block protection method for Android application programs
CN102043932A (en) Method for preventing Java program from being decompiled
JPH10301774A (en) Method for providing software package and provider station and user station for realizing the same method and basic software package
CN111832014B (en) Java SDK code encryption and decryption method and terminal based on dynamic loading
CN110737589A (en) automatic point burying method, device, medium and electronic equipment
CN113568680B (en) Dynamic link library protection method, device, equipment and medium for application program
CN104298534A (en) Programming method and device based on Lua language
CN110309630B (en) Java code encryption method and device
WO2016206393A1 (en) Method and apparatus for managing application and method and apparatus for implementing read-write operation
CN107871066B (en) Code compiling method and device based on android system
CN110472425A (en) Unity plug-in unit encryption method based on Mono, storage medium
JP4727366B2 (en) Information processing apparatus, information processing system, program, and recording medium
JP5953867B2 (en) Program and program protection device
CN110633073A (en) Unity code obfuscation method based on Il2cpp compilation

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