CN107292132A - Loading method and device for the shared object file of Android system - Google Patents

Loading method and device for the shared object file of Android system Download PDF

Info

Publication number
CN107292132A
CN107292132A CN201610192553.0A CN201610192553A CN107292132A CN 107292132 A CN107292132 A CN 107292132A CN 201610192553 A CN201610192553 A CN 201610192553A CN 107292132 A CN107292132 A CN 107292132A
Authority
CN
China
Prior art keywords
file
shared object
parameter
function
object 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.)
Granted
Application number
CN201610192553.0A
Other languages
Chinese (zh)
Other versions
CN107292132B (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.)
Beijing Na Jia Development Of Information Science And Technology Co Ltd
Original Assignee
Beijing Na Jia Development Of Information Science And Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Na Jia Development Of Information Science And Technology Co Ltd filed Critical Beijing Na Jia Development Of Information Science And Technology Co Ltd
Priority to CN201610192553.0A priority Critical patent/CN107292132B/en
Publication of CN107292132A publication Critical patent/CN107292132A/en
Application granted granted Critical
Publication of CN107292132B publication Critical patent/CN107292132B/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
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/52Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow
    • G06F21/54Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow by adding security routines or objects to programs

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Technology Law (AREA)
  • Stored Programmes (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

This application discloses a kind of loading method and device of the shared object file for Android system.One embodiment of methods described includes:Pretreatment request in response to receiving terminal transmission, obtains first initial parameter and second initial parameter in the second precalculated position in the first precalculated position of shared object file;The first initial parameter and the second initial parameter for changing shared object file are custom parameter;The off-limit file for isolating shared object file is generated, off-limit file includes loading function, and loading function includes the analytical function for being used to parse custom parameter;The parameter in the precalculated position of off-limit file is set to the first initial parameter;Shared object file by the off-limit file comprising the first initial parameter and comprising custom parameter is transmitted to terminal, so that terminal is based on off-limit file and custom parameter is loaded to shared object file.The embodiment can improve the safe class of shared object file.

Description

Loading method and device for the shared object file of Android system
Technical field
The application is related to field of computer technology, and in particular to technical field of data security, especially It is related to the loading method and device of the shared object file for Android system.
Background technology
With the development of Internet technology and terminal device, Android system is due to its functional interface Opening has also obtained swift and violent development, has progressively turned into the most popular operation system of mobile terminal System.But meanwhile, open functional interface is also provided convenience for Malware, for Android system The malicious acts such as decompiling, conversed analysis, the secondary packing of the application of system are also becoming increasingly rampant, and give The developer and user of application program bring very serious security threat.
In order to tackle Malware, most of Androids are shared using that can be encapsulated in its core code In object (Shared Object, SO) file.But SO files are the executable of standard in itself Form (Executable and Linkable Format, ELF) file is linked, can be static The instruments such as decompiling software carry out conversed analysis.Can be by two by the SO files after conversed analysis Secondary packing, that is to say, that application program still cannot be protected.
The content of the invention
The purpose of the application is to propose a kind of improved shared object file for Android system Loading method and device, to solve the technical problem that background section above is mentioned.
On the one hand, this application provides a kind of loading of the shared object file for Android system Method, methods described includes:Pretreatment request in response to receiving terminal transmission, obtains institute State the first initial parameter and second precalculated position in the first precalculated position of shared object file Second initial parameter;Change first initial parameter of the shared object file and described the Two initial parameters are custom parameter;Generate the isolation text for isolating the shared object file Part, the off-limit file includes being used to load the shared object file for including the custom parameter Loading function, the loading function includes being used to parse the analytical function of the custom parameter; The parameter in the precalculated position of the off-limit file is set to first initial parameter;It will include The off-limit file of first initial parameter and the shared object file comprising the custom parameter Transmit to terminal, so that the terminal is based on the off-limit file and the custom parameter The shared object file is loaded.
A kind of second aspect, the loading method of shared object file for Android system is described Method includes sending pretreatment request to server, and the reception server is based on the pretreatment What request was returned includes the off-limit file comprising the first initial parameter and being total to comprising custom parameter Enjoy the packaging file of obj ect file;The off-limit file is loaded to internal memory, the off-limit file bag Include the loading function for loading the shared object file comprising custom parameter, the loading letter Number includes The analytical function of the initial parameter of the shared object file, wherein, the custom parameter is The initial parameter is generated after predetermined process;Run the loading function, the loading The custom parameter is resolved to the initial parameter by function according to the analytical function first; Secondly, the loading function loads the shared object file to internal memory according to the initial parameter.
The third aspect, this application provides a kind of adding for shared object file for Android system Carry and put, described device includes:Acquisition module, is configured to send in response to receiving terminal Pretreatment request, obtain the first original ginseng in the first precalculated position of the shared object file Number and second initial parameter in the second precalculated position;It is configured to change the shared object text First initial parameter of part is custom parameter with second initial parameter;Generation module, It is configured to the off-limit file that generation is used to isolate the shared object file, the off-limit file It is described including the loading function for loading the shared object file comprising the custom parameter Loading function includes the analytical function for being used to parse the custom parameter;Setup module, configuration For the parameter in the precalculated position of the off-limit file to be set into first initial parameter.
Fourth aspect, this application provides a kind of adding for shared object file for Android system Carry and put pretreatment request module, be configured to send pretreatment request, Yi Jijie to server Receive the isolation text included comprising the first initial parameter that server is returned based on the pretreatment request The packaging file of part and shared object file comprising custom parameter;Load-on module, configuration is used In the loading off-limit file comprising the first initial parameter to internal memory, the off-limit file includes Loading function for loading the shared object file comprising custom parameter, the loading It is the initial parameter of the shared object file that function, which includes being used to parse the custom parameter, Analytical function, wherein, the custom parameter is to being generated after the initial parameter predetermined process 's;Module is run, is configured to run the loading function, loading function basis first The custom parameter is resolved to the initial parameter by the analytical function;Secondly, it is described to add Carry function and the shared object file is loaded to internal memory according to the initial parameter.
Shared object file loading method and device that the application is provided, by response to receiving The pretreatment request that terminal is sent, obtains the of the first precalculated position of the shared object file One initial parameter and second initial parameter in the second precalculated position, then change described shared pair As first initial parameter and second initial parameter of file are custom parameter, then The off-limit file for isolating the shared object file is generated, the off-limit file includes being used for The loading function of shared object file of the loading comprising the custom parameter, the loading function Including the analytical function for parsing the custom parameter, then by the pre- of the off-limit file Position the parameter put and be set to first initial parameter, will finally include the described first original ginseng Several off-limit files and the shared object file comprising the custom parameter were transmitted to end End, so that the terminal is based on the off-limit file and the custom parameter to described shared pair As file is loaded.Shared library file can be arranged to by the executable link form of standard Off-gauge executable link form so that static decompiling software can not enter to shared library file Row decompiling and analysis;Off-limit file is used simultaneously by off-gauge executable link form Shared library file is isolated, and further increases the safe class of shared file, is realized pair The reinforcement protection of application based on Android system.
Brief description of the drawings
By reading the detailed description to non-limiting example made with reference to the following drawings, this The other features, objects and advantages of application will become more apparent upon:
Fig. 1, which is shown, can apply the exemplary system architecture of the embodiment of the present application;
Fig. 2 is the loading method of the shared object file for Android system according to the application The exemplary process diagram of one embodiment;
Fig. 3 is another according to the loading method of the shared object file for Android system of the application The exemplary process diagram of one embodiment;
Fig. 4 is the loading device of the shared object file for Android system according to the application The exemplary block diagram of one embodiment;
Fig. 5 is another according to the loading device of the shared object file for Android system of the application The exemplary block diagram of one embodiment;
Fig. 6 shows the computer system suitable for being used for each device for realizing the embodiment of the present application Structural representation.
Embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is appreciated that , specific embodiment described herein is used only for explaining related invention, rather than to the hair Bright restriction.It also should be noted that, illustrate only for the ease of description, in accompanying drawing with About the related part of invention.
It should be noted that in the case where not conflicting, embodiment and embodiment in the application In feature can be mutually combined.Describe this in detail below with reference to the accompanying drawings and in conjunction with the embodiments Application.
Fig. 1, which is shown, can apply the exemplary system architecture 100 of the embodiment of the present application.
As shown in figure 1, system architecture 100 can include terminal device 101,102,103, Network 104 and server 105.Network 104 is used in the and of terminal device 101,102,103 The medium of communication link is provided between server 105.Network 104 can include various connection classes Type, such as wired, wireless communication link or fiber optic cables etc..
User can pass through network 104 and server 105 with using terminal equipment 101,102,103 Interaction, to facilitate terminal device 101,102,103 to be uploaded to server 105 to the pre- of application Processing request, terminal device 101,102,103 is downloaded and beaten through server 105 is pretreated APMB package etc..User can be the developer or the user of application of application.
Terminal device 101,102,103 can be the electronic equipment with data processing function. Android operation system can be installed on terminal device 101,102,103, and based on Android Operating system exploitation various client applications, such as web browser, mailbox client with Just unpretreated shared object file is uploaded onto the server and 105 pre-processed.
Terminal device 101,102,103 can be supported web page browser and various applications peace Loaded on various electronic equipments thereon, including but not limited to smart mobile phone, intelligent watch, flat board Computer, personal digital assistant, pocket computer on knee and desktop computer etc..
Server 105 can be to provide the server of various services.Server 105 can pass through Network 104 connects other servers and the shared object file received is pre-processed, and to Terminal device 101,102,103, which is provided, to be uploaded shared object file, downloads shared object file Deng service.
It should be noted that the shared object for Android system that the embodiment of the present application is provided The loading method of file can be performed by terminal device 101,102,103, for Android system The loading device of shared object file be also generally disposed in terminal device 101,102,103.
It should be understood that the number of the terminal device, network and server in Fig. 1 is only signal Property.According to needs are realized, can have any number of terminal device, network and server.
Fig. 2 is refer to, it illustrates the shared object text for Android system according to the application The exemplary flow 200 of one embodiment of the loading method of part.In shared pair of Android system As the loading method of file, comprise the following steps:
Step 201, the pretreatment in response to receiving terminal transmission is asked, and obtains shared object First initial parameter in the first precalculated position of file and the second of the second precalculated position the original ginseng Number.
In the present embodiment, the loading method for the shared object file of Android system is run on Electronic equipment (such as the server 105 shown in Fig. 1) thereon can be by wired connection side Formula or radio connection from user terminal (such as terminal device 101 shown in Fig. 1,102, 103) pretreatment request is received.In the pretreatment request received, include shared pair of application As file.Specifically, electronic equipment can receive an application installation for carrying out user terminal Resource file and shared object file can be included in APMB package, the installation package file.Shared pair As file can for executable link form file, its extension is entitled " .so ".In this implementation In example, the form of shared object file includes file header, program header, section head and each section. Wherein, file header is located at the foremost of shared object file, including file type, file are supported Processor model and the address that starts of program header and section head, i.e., in program code and section The entry address of appearance.Program header, section head include the inclined of positioning program code and each section content Shifting amount.Each section distinguishes storage class identical content, the section of such as store code, storage The sections of the data that are initialised and storage are not initialised sections etc. of data.
Above-mentioned radio connection includes but is not limited to 3G/4G connections, WiFi connections, bluetooth company Connect, WiMAX connections, Zigbee connections, UWB (ultra wideband) connections and Other currently known or exploitation in the future radio connections.
After the pretreatment for receiving user terminal is asked, electronic equipment is from installation package file Find shared object file.Then shared object file is handled using various processing methods. Specifically, electronic equipment obtains the of the first precalculated position of above-mentioned shared object file first One initial parameter and second initial parameter in the second precalculated position.
In the present embodiment, the first precalculated position can be to be arbitrarily designated in shared object file Position, such as the first precalculated position can be the extension name of shared object file.First original ginseng Numerical example such as can be the original extension name of shared object file.
In the present embodiment, the second precalculated position can be to be arbitrarily designated in shared object file Position, for example, the second precalculated position can be the section for depositing code in shared object file. Second initial parameter can be the code in section.
In some optional implementations of the present embodiment, obtain shared object file first is pre- Position the first initial parameter for putting include obtaining the initial parameter of the file header of shared object file with And the extension name of shared object file.That is, the first initial parameter can be shared object The initial parameter of the file header of file.
In some optional implementations of the present embodiment, obtain shared object file second is pre- Position section head table and program header table that the second initial parameter put includes obtaining shared object file Initial parameter.That is, the second initial parameter can be the section head of shared object file Table and the initial parameter in program header table.
In some optional implementations of the present embodiment, the file of shared object file is being obtained Before the initial parameter and program header table, the initial parameter of section head table of head, to shared object File carries out shell adding.For example, it is possible to use conventional shell adding instrument is to original shared object text Part carries out shell adding.So that Malware needs pair could analyze shared object text after can cracking The plaintext code of part, adds the safe class of shared object file.
Step 202, the first initial parameter of modification shared object file is with the second initial parameter Custom parameter.
Electronic equipment can be to the first initial parameter obtained in step 201 and the second original ginseng Number is handled using various reinforcement means.Specifically, in the present embodiment, will can share First initial parameter of obj ect file is modified with the second initial parameter, obtains custom parameter.
In some optional implementations of the present embodiment, remove the text of shared object file first The initial parameter of part head, then carries out book office to the initial parameter of section head table and program header table Reason generation custom parameter.Here predetermined process for example can be to section head table and program header The initial parameter of table is encrypted using various AESs.AES can include but not limit In:Advanced Encryption Standard (Advanced Encryption Standard, AES) algorithm, RSA AES, elliptic curve cipher coding (Elliptic Curves Cryptography, ECC) Graceful (Diffie-Hellman, the DH) algorithm of algorithm, diffie-hellman, SHA (Secure Hash Algorithm, SHA) etc..
By the above-mentioned initial parameter to section head table and program header table carry out that predetermined process obtains from Defined parameters as the file header of the above-mentioned shared object file removed after the first initial parameter ginseng Number.The file header of shared object file has had changed into user-defined file head, the Android system of standard The linker of system can not load the shared object file comprising user-defined file head.
In addition, in the present embodiment, can also be to the parameter in program header table and section head table It is encrypted so that Malware can not be directly read in said procedure head table and section head table Content, has further functioned as the protective effect to shared object file.
Furthermore it is possible to will be put after the extension name modification of the shared object file comprising custom parameter Enter in the resource folder in the application installation package, the resource folder for example can be installation kit In " assets " file.It is put into resource folder " assets " and includes self-defined text The amended extension name of the shared object file of part head for example can be " .txt ".
Step 203, the off-limit file for isolating shared object file is generated.
In the present embodiment, in order to further protect shared object file, in shared object file Originally generation is used for the off-limit file for isolating shared object file at location.Due to storage File in assets resource files will not be compiled device and be compiled into, can be in above-mentioned isolation text Loading function is set in part, and specified path comprising custom parameter to sharing in loading function Obj ect file conducts interviews.
In addition, loading function includes the analytical function for being used to parse custom parameter.Specifically, Can during predetermined process is carried out to the initial parameter of section head table and program header table basis Each step generation analytical function of predetermined process.Analytical function is the anti-mistake of above-mentioned predetermined process Journey, can resolve to above-mentioned custom parameter in the program header table and section head of shared object file The initial parameter of table.
Loading function can according to the program header table of the shared object file obtained by analytical function and The initial parameter of section head table, obtains the offset of program code segments and data segment etc..And according to Offset reads program code and data etc. in internal memory or caching.
Step 204, the parameter in the precalculated position of off-limit file is set to the first initial parameter.
In order that system loader loads off-limit file first when loading shared object file, can So that the file header of the shared object file without predetermined process to be arranged on to the foremost of off-limit file It is used as the file header of off-limit file.The extension name of off-limit file is revised as shared object text simultaneously The original extension name (.so) of part.
In some optional implementations of the present embodiment, by shared pair without predetermined process As the file header of file be arranged on the foremost of off-limit file as off-limit file file header it Afterwards, shell adding is carried out to it using conventional shell adding instrument to off-limit file.So that Malware exists When cracking off-limit file, it is necessary first to off-limit file plus shell crack, add and crack The difficulty of off-limit file.
Step 205, by the off-limit file comprising the first initial parameter and custom parameter is included Shared object file is transmitted to terminal, so that terminal is based on off-limit file and custom parameter Shared object file is loaded.
When shared object file of the terminal device in loading application installation package is shared library file, Actual loaded is the off-limit file of shared object file of disguising oneself as.Off-limit file is loaded into again After internal memory, the loading function operation in off-limit file, loading function will include custom parameter The shared object file of resource file of disguising oneself as reads internal memory.
The method provided according to the above embodiments of the present application, due to by the form of shared object file User-defined format is arranged to by the executable link form of standard so that static decompiling software Analysis can not be compiled to shared object file.This method is also provided with being used to isolate altogether simultaneously The off-limit file of obj ect file is enjoyed, the reverse of shared object file is further increased and cracks difficulty. Application based on Android system can effectively be protected.
Referring next to Fig. 3, it illustrates be used for the shared of Android system according to the application The exemplary flow 300 of another embodiment of the loading method of obj ect file.The flow 300 is wrapped Include following steps:
Step 301, pretreatment request is sent to server, and the reception server is based on pre- place What reason request was returned includes the off-limit file comprising the first initial parameter and includes custom parameter The packaging file of shared object file.
In the present embodiment, the loading method for the shared object file of Android system is run on Electronic equipment (terminal device 101,102,103 as shown in Figure 1) thereon first can be with By wired connection mode or radio connection to server (server as shown in Figure 1 105) pretreatment request is sent.Include shared pair of an application in the pretreatment request of transmission As file.Specifically, electronic equipment can send an application installation package file to server, Resource file and shared object file can be included in the installation package file.
Server carries out predetermined process to shared object file, generates being total to for the resource file that disguises oneself as Enjoy obj ect file and the shared object file that disguises oneself as be used for isolate being total to of resource file of disguising oneself as Enjoy the off-limit file of obj ect file.Wherein, disguise oneself as resource file (such as " assets " file File in folder) shared object file include the file header of custom parameter.Off-limit file All parameters of original document head of the file header comprising shared object file.Electronic equipment is by having Line connected mode or radio connection are received from server to be made a reservation for shared object file Application installation package file after processing, wherein the application installation package file bag after predetermined process Include the off-limit file for the original document head comprising shared object file being packaged with and comprising certainly Define the shared object file of file header.
Step 302, off-limit file is loaded to internal memory.
In the present embodiment, the off-limit file that electronic equipment is obtained from server in step 301 Form for standard shared object file form.
Because the protected shared object file resource file that disguised oneself as deposits in resource folder In, such as in resource folder " assets ".Due to the text in resource folder " assets " Part will not be compiled device compiling, so off-limit file includes being used to load comprising custom parameter The loading function of shared object file.Can be with specified path to comprising making by oneself in the loading function The shared object file of adopted parameter conducts interviews.
In addition, loading function includes the region of initiation that custom parameter is parsed into shared object file The analytical function of paragraph header table parameter and program header table parameter, to obtain the generation in shared object file The offset of the section of code section, data and parameter.And according to offset by shared object file Program code and data etc. are read in internal memory or caching.
In the present embodiment, because off-limit file has the form of the shared object file of standard, So terminal device loader is when loading shared object file to internal memory, first off-limit file It is loaded onto in internal memory or caching.
In some optional implementations of the present embodiment, off-limit file is that server uses shell adding Instrument carries out the off-limit file after shell adding to it.In addition, in off-limit file after shell adding in advance There is provided shelling function so that during off-limit file to the internal memory after loading shell adding, take off Shell function automatic running simultaneously shells to the off-limit file after shell adding.
Step 303, loading function is run, loading function first will be self-defined according to analytical function Parameter analysis of electrochemical is initial parameter;Secondly, loading function loads shared object text according to initial parameter Part is to internal memory.
In the present embodiment, after loading off-limit file to internal memory or caching, off-limit file is run In loading function.Namely accessed by the specified path in loading function by the resource file that disguises oneself as The shared object file with custom parameter.
In the present embodiment, after the shared object file with custom parameter is had access to, Analytical function in loading function is parsed to custom parameter first, by custom parameter solution Analyse the original parameters of the program header table and section head table for shared object file.Then, The offset that loading function is specified according to the original parameters of program header table and each section head table Data to the code segment in shared object file, initialized data and no initializtion etc. Deposit position is positioned, and by the code in former shared object file, initialization data and No initializtion data etc. are read in internal memory or caching.
In some optional implementations of the present embodiment, the shared object comprising custom parameter File is the shared object file after shell adding function shell adding.Shared object file after shell adding Also include being stored in advance in shelling function therein, to cause loading function loading comprising self-defined During shared object file to the internal memory of parameter, shell function automatic running and to shell adding after Shared object file shelled.
In some optional implementations of the present embodiment, off-limit file also includes and loading function The anti-debug function bound in advance so that first run anti-debug function before operation loading function.
In some optional implementations of the present embodiment, off-limit file also includes and loading function The anti-secondary packing function bound in advance so that first run before operation loading function anti-secondary Packing function.
The method provided according to the above embodiments of the present application, due in terminal loads shared object text Off-limit file is loaded during part first, then the shared of the resource file that disguised oneself as is loaded by off-limit file Obj ect file causes static decompiling software can not be compiled analysis to shared object file.Separately Outside, because off-limit file has bound anti-debug function and anti-secondary packing function in advance so that dislike Meaning software and malicious persons can not carry out dynamic inverse compiling to shared object file.So that applying Effective protection is arrived.
Fig. 4 is refer to, as the realization to method shown in above-mentioned Fig. 2, this application provides one Plant one embodiment of the loading device for the shared object file for being used for Android system, device tool Body can apply in various electronic equipments.
With further reference to Fig. 4, as the realization to method shown in above-mentioned Fig. 2, the application is provided A kind of one embodiment of the loading device of shared object file for Android system, specifically It can apply in various electronic equipments.
As shown in figure 4, the loading device 400 for the shared object file of Android system can be with Including but not limited to:Acquisition module 401, modified module 402, generation module 403 sets mould Block 404 and sending module 405.Wherein, acquisition module 401, are configured in response to receiving The pretreatment request sent to terminal, obtains the first of the first precalculated position of shared object file Initial parameter and second initial parameter in the second precalculated position.Modified module 402, configuration is used In the first initial parameter and the second initial parameter of modification shared object file be custom parameter. Generation module 403, is configured to the off-limit file that generation is used to isolate shared object file, every Include the loading function for being used to load the shared object file comprising custom parameter from file, plus Carry the analytical function that function includes being used to parse custom parameter.Setup module 404, configuration is used In the parameter in the precalculated position of off-limit file is set into the first initial parameter.Sending module 405, It is configured to shared pair by the off-limit file comprising the first initial parameter and comprising custom parameter As file is transmitted to terminal, so that terminal is based on off-limit file and custom parameter to shared Obj ect file is loaded.
In the present embodiment, for Android system shared object file loading device 400 Acquisition module 401 can be by wired connection mode or radio connection from user terminal (such as the terminal device 101,102,103 shown in Fig. 1) receives pretreatment request.Connecing In the pretreatment request received, include the shared object file of an application.Specifically, obtain Modulus block 401 can carry out an application installation package text of user terminal from user terminal reception Resource file and shared object file can be included in part, the installation package file.
In the present embodiment, sending module 405 can connect by wired connection mode or wirelessly Mode is connect to send to user terminal (such as the terminal device 101,102,103 shown in Fig. 1) To application installation package file of the shared object file after predetermined process.
In some optional implementations of the present embodiment, acquisition module 401 further use by configuration In the initial parameter and the section head of shared object file of the file header for obtaining shared object file The initial parameter of table and program header table.Modified module 402 is further configured to remove shared pair As the initial parameter of the file header of file, and by the original ginseng of section head table and program header table Number carries out predetermined process generation custom parameter.
In some optional implementations of the present embodiment, the shared object text for Android system The loading device 400 of part also includes shell adding module (being not drawn into figure).Shell adding module is configured to The original document head parameter and original program head table of shared object file are obtained in acquisition module 401 And before the parameter of section head table, shell adding is carried out to shared object file.
In some optional implementations of the present embodiment, shell adding module is further configured to The parameter in the precalculated position of off-limit file is set to the original text of shared object file by setup module After part head, shell adding is carried out to off-limit file.
It will be understood by those skilled in the art that the above-mentioned shared object file for Android system Loading device 400 also includes some other known features, such as processor, memory, is Embodiment of the disclosure is unnecessarily obscured, these known structures are not shown in Fig. 4.
Please further refer to Fig. 5, as the realization to method shown in above-mentioned Fig. 3, the application is carried A kind of another embodiment of the loading device of the shared object file for Android system has been supplied, The device specifically can apply in various electronic equipments.
As shown in figure 5, the loading device 500 for the shared object file of Android system can be with Including but not limited to:Pretreatment request and receiving module 501, load-on module 502 run module 503.Wherein, pretreatment request and receiving module 501, are configured to send pre- place to server Reason request, and the reception server include initial parameter including based on pretreatment request return The packaging file of off-limit file and shared object file comprising custom parameter.Load-on module 502, off-limit file of the loading comprising initial parameter is configured to internal memory, and off-limit file includes using In the loading function of shared object file of the loading comprising custom parameter, loading function includes using In analytical function of the parsing custom parameter for the initial parameter of shared object file, wherein, from Defined parameters after initial parameter predetermined process to generating.Module 503 is run, is configured to Loading function is run, loading function first resolves to custom parameter according to analytical function original Parameter;Secondly, loading function loads shared object file to internal memory according to initial parameter.
In the present embodiment, for Android system shared object file loading device 500 Pretreatment request and receiving module 501 can pass through wired connection mode or radio connection Pretreatment request is sent to server.Transmission pretreatment request in, including one application Shared object file.Specifically, pretreatment request and receiving module 501 can be to servers Send an application installation package file and predetermined process is carried out to the application installation package file and ask Ask.Resource file and shared object file can be included in the application installation package file.Also, Pretreatment request and receiving module 501 can pass through wired connection mode or radio connection The application installation package text after carrying out predetermined process to shared object file is received from server Part.Application installation package file after predetermined process includes including the original of shared object file The packaging file of the off-limit file of file header and shared object file comprising user-defined file head, Wherein, user-defined file head includes custom parameter.
In some optional implementations of the present embodiment, off-limit file is to add by shell adding function Off-limit file after off-limit file after shell, shell adding also includes being stored in advance in shelling letter therein Number;During loading off-limit file to the internal memory of load-on module 502, shell function automatic running And the off-limit file after shell adding is shelled;Load-on module 502 is literary by the isolation by shelling Part is loaded into internal memory.
In some optional implementations of the present embodiment, the shared object comprising custom parameter File is the shared object file after the shared object file after shell adding function shell adding, shell adding Also include being stored in advance in shelling function therein;When running the operation of module 503, by loading During shared object file to internal memory after function loading shell adding, shell function automatic running And the shared object file after shell adding is shelled;Shared pair after loading function loading shelling As file to internal memory.
In some optional implementations of the present embodiment, off-limit file also includes and loading function The anti-debug function bound in advance so that run before the operation operation loading function of module 503 Anti-debug function.
In some optional implementations of the present embodiment, off-limit file also includes and loading function The anti-secondary packing function bound in advance so that before the operation operation loading function of module 503 The anti-secondary packing function of operation.
Below with reference to Fig. 6, it illustrates suitable for for realizing each device of the embodiment of the present application The structural representation of computer system 600.
As shown in fig. 6, computer system 600 includes CPU (CPU) 601, its Can according to the program being stored in read-only storage (ROM) 602 or from storage part 608 The program that is loaded into random access storage device (RAM) 603 and perform various appropriate actions And processing.In RAM 603, the system that is also stored with 600 operates required various program sums According to.CPU 601, ROM 602 and RAM 603 are connected with each other by bus 604.Input / output (I/O) interface 605 is also connected to bus 604.
I/O interfaces 605 are connected to lower component:Importation 606 including keyboard, mouse etc.; Including cathode-ray tube (CRT), liquid crystal display (LCD) etc. and loudspeaker etc. Output par, c 607;Storage part 608 including hard disk etc.;And including such as LAN card, The communications portion 609 of the NIC of modem etc..Communications portion 609 is via such as The network of internet performs communication process.Driver 610 is also according to needing to be connected to I/O interfaces 605.Detachable media 611, such as disk, CD, magneto-optic disk, semiconductor memory etc., Be arranged on as needed on driver 610, in order to the computer program that reads from it according to Need to be mounted into storage part 608.
Especially, according to embodiments herein, the process described above with reference to flow chart can be with It is implemented as computer software programs.For example, embodiments herein includes a kind of computer journey Sequence product, it includes being tangibly embodied in the computer program on machine readable media, the meter Calculation machine program bag, which contains, is used for the program code of the method shown in execution flow chart.Implement such In example, the computer program can be downloaded and installed by communications portion 609 from network, And/or be mounted from detachable media 611.
Involved module can be realized by way of software in the embodiment of the present application, also may be used To be realized by way of hardware.Described module can also be set within a processor, example Such as, it can be described as:A kind of processor include acquisition module, modified module, generation module and Setup module.Wherein, the title of these modules is not constituted to the module sheet under certain conditions The restriction of body, for example, acquisition module is also described as " being configured to obtain described shared First initial parameter in the first precalculated position of obj ect file and second original in the second precalculated position The module of beginning parameter ".
As on the other hand, present invention also provides a kind of nonvolatile computer storage media, The nonvolatile computer storage media can be described in above-described embodiment included in device Nonvolatile computer storage media;Can also be individualism, without supplying terminal or service Nonvolatile computer storage media in device.
Above-mentioned nonvolatile computer storage media is stored with one or more program, when described When one or more program is performed by an equipment so that the equipment:.
Or, above-mentioned nonvolatile computer storage media is stored with one or more program, When one or more of programs are performed by an equipment so that the equipment:.
Above description is only the preferred embodiment of the application and saying to institute's application technology principle It is bright.It will be appreciated by those skilled in the art that invention scope involved in the application, is not limited In the technical scheme of the particular combination of above-mentioned technical characteristic, do not departed from while should cover yet In the case of the inventive concept, it is combined by above-mentioned technical characteristic or its equivalent feature Formed by other technical schemes.Such as features described above and (but not limited to) disclosed herein Technical characteristic with similar functions carries out technical scheme formed by replacement mutually.

Claims (18)

1. a kind of loading method of shared object file for Android system, it is characterised in that Methods described includes:
Pretreatment request in response to receiving terminal transmission, obtains the shared object file First initial parameter in the first precalculated position and second initial parameter in the second precalculated position;
Change first initial parameter and second initial parameter of the shared object file For custom parameter;
The off-limit file for isolating the shared object file is generated, the off-limit file includes Loading function for loading the shared object file comprising the custom parameter, the loading Function includes the analytical function for being used to parse the custom parameter;
The parameter in the precalculated position of the off-limit file is set to first initial parameter;
By the off-limit file comprising first initial parameter and being total to comprising the custom parameter Enjoy obj ect file to transmit to terminal, so that the terminal is based on the off-limit file and described Custom parameter is loaded to the shared object file.
2. according to the method described in claim 1, it is characterised in that
First initial parameter in first precalculated position for obtaining the shared object file includes Obtain the initial parameter of the file header of the shared object file;
Second initial parameter in second precalculated position for obtaining the shared object file includes Obtain the section head table of the shared object file and the initial parameter of program header table;
First initial parameter of the modification shared object file and described second original Parameter is the initial parameter that custom parameter includes removing the file header of the shared object file, And made by oneself being generated after the initial parameter progress predetermined process of the section head table and program header table Adopted parameter.
3. according to the method described in claim 1, it is characterised in that methods described is additionally included in First initial parameter and second in first precalculated position for obtaining the shared object file Before second initial parameter in precalculated position, shell adding is carried out to the shared object file.
4. according to the method described in claim 1, it is characterised in that methods described is additionally included in The parameter in the precalculated position by the off-limit file be set to first initial parameter it Afterwards, shell adding is carried out to the off-limit file.
5. a kind of loading method of shared object file for Android system, it is characterised in that Methods described includes:
Pretreatment request is sent to server, and the reception server is based on the pretreatment request What is returned includes the off-limit file comprising initial parameter and the text of the shared object comprising custom parameter The packaging file of part;
The off-limit file is loaded to internal memory, the off-limit file includes being used to load to include making by oneself The loading function of the shared object file of adopted parameter, the loading function includes described for parsing The custom parameter of shared object file comprising custom parameter is the shared object file The analytical function of initial parameter, wherein, the custom parameter is through pre- to the initial parameter Generated after fixed processing;
The loading function is run, the loading function first will be described according to the analytical function Custom parameter resolves to the initial parameter;Secondly, the loading function is according to described original Parameter loads the shared object file to internal memory.
6. method according to claim 5, it is characterised in that the off-limit file is also wrapped Include the anti-debug function bound in advance with the loading function so that running the loading function The anti-debug function is first run before.
7. method according to claim 5, it is characterised in that the off-limit file is also wrapped Include the anti-secondary packing function bound in advance with the loading function so that running the loading Function to first running the anti-secondary packing function before.
8. method according to claim 5, it is characterised in that the off-limit file is to add Off-limit file after off-limit file after shell, the shell adding also includes being stored in advance in therein take off Shell function;
During off-limit file to the internal memory after loading the shell adding, the shelling function is certainly It is dynamic to run and the off-limit file after the shell adding is shelled.
9. method according to claim 5, it is characterised in that described to include self-defined ginseng Several shared object files is the shared object after the shared object file after shell adding, the shell adding File also includes being stored in advance in shelling function therein;
The loading function loads the shared object file comprising custom parameter to internal memory During, the shelling function automatic running is simultaneously carried out to the shared object file after the shell adding Shelling.
10. a kind of loading device of shared object file for Android system, it is characterised in that Described device includes:
Acquisition module, is configured to the pretreatment request in response to receiving terminal transmission, obtains First initial parameter in the first precalculated position of the shared object file and the second precalculated position The second initial parameter;
Modified module, is configured to change first initial parameter of the shared object file It is custom parameter with second initial parameter;
Generation module, is configured to the off-limit file that generation is used to isolate the shared object file, The off-limit file includes being used to load adding for the shared object file comprising the custom parameter Function is carried, the loading function includes the analytical function for being used to parse the custom parameter;
Setup module, is configured to the parameter in the precalculated position of the off-limit file being set to institute State the first initial parameter;
Sending module, be configured to the off-limit file comprising first initial parameter and comprising The shared object file of the custom parameter is transmitted to terminal, so that the terminal is based on The off-limit file and the custom parameter are loaded to the shared object file.
11. device according to claim 10, it is characterised in that
The acquisition module is further configured to obtain the file header of the shared object file The section head table of initial parameter and the shared object file and the initial parameter of program header table;
The modified module is further configured to remove the file header of the shared object file Initial parameter, and the initial parameter of the section head table and program header table is subjected to predetermined process Generate custom parameter.
12. device according to claim 10, it is characterised in that described device also includes Shell adding module, is configured to obtain the first pre- of the shared object file in the acquisition module Before the second initial parameter for positioning the first initial parameter put and the second precalculated position, to institute State shared object file and carry out shell adding.
13. device according to claim 10, it is characterised in that the shell adding module is entered One step is configured to the parameter setting in the precalculated position of the off-limit file in the setup module After first initial parameter, shell adding is carried out to the off-limit file.
14. a kind of loading device of shared object file for Android system, it is characterised in that Described device includes:
Pretreatment request and receiving module, are configured to send pretreatment request to server, with And the reception server based on it is described pretreatment request return include the off-limit file comprising parameter and The packaging file of shared object file comprising custom parameter;
Load-on module, is configured to the loading off-limit file comprising initial parameter to internal memory, The off-limit file includes being used to load adding for the shared object file comprising custom parameter Function is carried, the loading function includes being used to parse the custom parameter for the shared object The analytical function of the initial parameter of file, wherein, the custom parameter is to the original ginseng Generated after number predetermined process;
Module is run, is configured to run the loading function, loading function basis first The custom parameter is resolved to the initial parameter by the analytical function;Secondly, it is described to add Carry function and the shared object file is loaded to internal memory according to the initial parameter.
15. device according to claim 14, it is characterised in that the off-limit file is also Including the anti-debug function bound in advance with the loading function so that in the operation module fortune The anti-debug function is run before the row loading function.
16. device according to claim 14, it is characterised in that the off-limit file is also Including the anti-secondary packing function bound in advance with the loading function so that in the operation mould Block runs the anti-secondary packing function before running the loading function.
17. device according to claim 14, it is characterised in that the off-limit file is Off-limit file after off-limit file after shell adding, the shell adding also includes being stored in advance in it In shelling function;
During the load-on module loads the off-limit file to internal memory, the shelling letter Number automatic running simultaneously shells to the off-limit file after the shell adding;
Off-limit file by shelling is loaded into the internal memory by the load-on module.
18. device according to claim 14, it is characterised in that described comprising self-defined The shared object file of parameter is shared pair after the shared object file after shell adding, the shell adding As file also includes being stored in advance in shelling function therein;
It is shared after the shell adding is loaded by the loading function during operation module operation During obj ect file to internal memory, it is described shelling function automatic running and to the shell adding after Shared object file is shelled;
The loading function loads the shared object file after shelling to the internal memory.
CN201610192553.0A 2016-03-30 2016-03-30 Method and device for loading shared object file for android system Active CN107292132B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610192553.0A CN107292132B (en) 2016-03-30 2016-03-30 Method and device for loading shared object file for android system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610192553.0A CN107292132B (en) 2016-03-30 2016-03-30 Method and device for loading shared object file for android system

Publications (2)

Publication Number Publication Date
CN107292132A true CN107292132A (en) 2017-10-24
CN107292132B CN107292132B (en) 2023-03-14

Family

ID=60087796

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610192553.0A Active CN107292132B (en) 2016-03-30 2016-03-30 Method and device for loading shared object file for android system

Country Status (1)

Country Link
CN (1) CN107292132B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108073814A (en) * 2017-12-29 2018-05-25 哈尔滨安天科技股份有限公司 Hulling method, system and storage medium based on static structureization shelling parameter
CN108595226A (en) * 2018-05-09 2018-09-28 腾讯科技(深圳)有限公司 Dynamic loading method, device and computer readable storage medium
CN111399927A (en) * 2018-12-14 2020-07-10 北京奇虎科技有限公司 Method and device for sharing Class file by application and computing equipment
CN111831294A (en) * 2020-07-10 2020-10-27 广州市挖米科技有限责任公司 Installation-free method and device for medical system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040111720A1 (en) * 2001-02-01 2004-06-10 Vertes Marc Philippe Method and system for managing shared-library executables
CN101702130A (en) * 2009-11-12 2010-05-05 深圳市五巨科技有限公司 Method for loading sharing function library with movable terminal and device thereof
CN103092544A (en) * 2011-10-27 2013-05-08 汉王科技股份有限公司 Method and system for sharing electronic files among electronic devices
CN104298932A (en) * 2014-10-27 2015-01-21 中国建设银行股份有限公司 Method and device for calling SO file
CN104392181A (en) * 2014-11-18 2015-03-04 北京奇虎科技有限公司 SO file protection method and device and android installation package reinforcement method and system
CN105095771A (en) * 2014-05-08 2015-11-25 北京娜迦信息科技发展有限公司 Method and apparatus for protecting shared target file
CN105227565A (en) * 2015-10-13 2016-01-06 北京娜迦信息科技发展有限公司 Anti-reversing for Android system cracks the method and apparatus of shared object file

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040111720A1 (en) * 2001-02-01 2004-06-10 Vertes Marc Philippe Method and system for managing shared-library executables
CN101702130A (en) * 2009-11-12 2010-05-05 深圳市五巨科技有限公司 Method for loading sharing function library with movable terminal and device thereof
CN103092544A (en) * 2011-10-27 2013-05-08 汉王科技股份有限公司 Method and system for sharing electronic files among electronic devices
CN105095771A (en) * 2014-05-08 2015-11-25 北京娜迦信息科技发展有限公司 Method and apparatus for protecting shared target file
CN104298932A (en) * 2014-10-27 2015-01-21 中国建设银行股份有限公司 Method and device for calling SO file
CN104392181A (en) * 2014-11-18 2015-03-04 北京奇虎科技有限公司 SO file protection method and device and android installation package reinforcement method and system
CN105227565A (en) * 2015-10-13 2016-01-06 北京娜迦信息科技发展有限公司 Anti-reversing for Android system cracks the method and apparatus of shared object file

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108073814A (en) * 2017-12-29 2018-05-25 哈尔滨安天科技股份有限公司 Hulling method, system and storage medium based on static structureization shelling parameter
CN108073814B (en) * 2017-12-29 2021-10-15 安天科技集团股份有限公司 Shelling method and system based on static structured shelling parameters and storage medium
CN108595226A (en) * 2018-05-09 2018-09-28 腾讯科技(深圳)有限公司 Dynamic loading method, device and computer readable storage medium
CN108595226B (en) * 2018-05-09 2021-07-23 腾讯科技(深圳)有限公司 Dynamic loading method and device and computer readable storage medium
CN111399927A (en) * 2018-12-14 2020-07-10 北京奇虎科技有限公司 Method and device for sharing Class file by application and computing equipment
CN111831294A (en) * 2020-07-10 2020-10-27 广州市挖米科技有限责任公司 Installation-free method and device for medical system
CN111831294B (en) * 2020-07-10 2024-03-22 广州市挖米科技有限责任公司 Medical system installation-free method and device

Also Published As

Publication number Publication date
CN107292132B (en) 2023-03-14

Similar Documents

Publication Publication Date Title
CN108491236A (en) A kind of plug-in loading method, device and computer readable storage medium
CN107292132A (en) Loading method and device for the shared object file of Android system
CN103744652B (en) Hybrid APP development method and device across mobile terminals
CN102891889B (en) A kind of information sharing method and device
CN105227565B (en) The method and apparatus that anti-reversing for Android system cracks shared object file
CN105653933B (en) Plug-in loading method and device
CN108345632A (en) Call method, device, equipment and the computer readable storage medium of the H5 pages
CN105812323B (en) A kind of method and apparatus of the cross-domain access data of network
CA2907583A1 (en) Systems and methods for intercepting, processing, and protecting user data through web application pattern detection
CN105022832B (en) Method, mobile terminal and the download server that APP application securities are downloaded
US9716694B2 (en) Encryption method and information processing device
CN104158908B (en) Method and system based on WiFi equipment transmission file
CN105430009B (en) A kind of Network Access Method, terminal and gateway server
WO2005006228A3 (en) Method for charging costs of enjoying contents transmitted over a telecommunications network and system thereof
CN108399319A (en) Source code guard method, application server and computer readable storage medium
CN106973020A (en) The flow limitation method and system of network sharing terminal and network sharing
US10867017B2 (en) Apparatus and method of providing security and apparatus and method of executing security for common intermediate language
CN108111622A (en) A kind of method, apparatus and system for downloading whitepack library file
CN112241298A (en) Page display method and device, storage medium and electronic device
CN108134673A (en) A kind of method and device for generating whitepack library file
CN112256275A (en) Code obfuscation method, device, electronic device and medium
CN103841157B (en) Sharing files device and method
CN104077158B (en) The method and device of plug-in unit is installed
CN104244171A (en) Data transmission system and method on basis of NFC (near field communication) connection
CN106130999A (en) Data transmission method, apparatus and system

Legal Events

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