CN109597662A - The call method, device and electronic equipment in non-public library in mobile terminal - Google Patents
The call method, device and electronic equipment in non-public library in mobile terminal Download PDFInfo
- Publication number
- CN109597662A CN109597662A CN201811325972.2A CN201811325972A CN109597662A CN 109597662 A CN109597662 A CN 109597662A CN 201811325972 A CN201811325972 A CN 201811325972A CN 109597662 A CN109597662 A CN 109597662A
- Authority
- CN
- China
- Prior art keywords
- address
- public library
- application program
- mobile terminal
- function
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Telephone Function (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The application proposes call method, device, electronic equipment and the storage medium in non-public library in a kind of mobile terminal, belongs to computer application technology.It include the mark of application program and the mark in non-public library in call request this method comprises: obtaining the call request of application program;According to the mark of application program, the return address of application program is obtained;It will jump in the corresponding memory of function write-in preset address, wherein the destination address for jumping function is return address, and preset address is the legal address of operating system in mobile terminal;Preset address is revised as in return address;The corresponding system interface function in non-public library is called according to the mark in preset address and non-public library, to open non-public library.As a result, by the call method in non-public library in this mobile terminal, the limitation around system to the non-public library of application program dynamic link is realized, not only without reading and resolution file, link speed is fast, and now can load non-public library, improves practicability.
Description
Technical field
This application involves a kind of called sides in non-public library in computer application technology more particularly to mobile terminal
Method, device, electronic equipment and storage medium.
Background technique
Since Android 7.0, system prevents the non-public library NDK of application program dynamic link, to improve system operation
Safety.But for some specific demands, such as plug-in unit, hot repair is equal again to need the non-public library of dynamic link again, therefore needs
It will be around this limitation of system.
It is existing in the related technology, by so file under reading/proc/ catalogue, and it is inner to parse so file (elf format)
Relocation table calculates the address for wanting to call function, to reach using base address of so plus the address in relocation table
Call the purpose of non-public NDK library function.But this method needs to read and parses so file, not only speed is slow, but also only
Suitable for the non-public library loaded, the practicability is poor.
Summary of the invention
Call method, device, electronic equipment and the storage medium in non-public library, are used in the mobile terminal that the application proposes
It solves in the related technology, the existing method around the non-public library limitation of system dynamic link needs to read and parse so file, no
The problem of only speed is slow, and is only applicable to the non-public library loaded, and the practicability is poor.
The call method in non-public library in the mobile terminal that the application one side embodiment proposes, comprising: obtain and apply journey
The call request of sequence includes the mark of the application program and the mark in non-public library in the call request;It is answered according to described
With the mark of program, the return address of the application program is obtained;It will jump in the corresponding memory of function write-in preset address,
In, the destination address for jumping function is the return address, and the preset address is operating system in the mobile terminal
Legal address;The preset address is revised as in the return address;And according to the preset address and described non-public
The mark in library calls the corresponding system interface function in the non-public library, to open the non-public library.
The calling device in non-public library in the mobile terminal that the application another aspect embodiment proposes, comprising: first obtains
Module includes the mark of the application program for obtaining the call request of application program, in the call request and non-public
The mark in library;Second acquisition module obtains the return address of the application program for the mark according to the application program;
Writing module, for that will jump in the corresponding memory of function write-in preset address, wherein the destination address for jumping function is
The return address, the preset address are the legal address of operating system in the mobile terminal;Modified module is used for institute
It states return address and is revised as the preset address;And calling module, for according to the preset address and the non-public library
Mark call the corresponding system interface function in the non-public library, to open the non-public library.
The electronic equipment that the application another further aspect embodiment proposes comprising: memory, processor and it is stored in memory
Computer program that is upper and can running on a processor, which is characterized in that the processor is realized as before when executing described program
The call method in non-public library in the mobile terminal.
The computer readable storage medium that the another aspect embodiment of the application proposes, is stored thereon with computer program,
It is characterized in that, the call method in non-public library in foregoing mobile terminal is realized when described program is executed by processor.
The computer program that the another aspect embodiment of the application proposes, when which is executed by processor, to realize this Shen
Please in mobile terminal described in embodiment non-public library call method.
Call method, device, electronic equipment, the computer in non-public library can in mobile terminal provided by the embodiments of the present application
Reading storage medium and computer program, the call request of available application program, and according to the application for including in call request
The mark of program obtains the return address of application program, and the return address that destination address is application program is jumped letter later
In the corresponding memory of number write-in preset address, and preset address is revised as in return address, wherein preset address is mobile terminal
The legal address of middle operating system, and then non-public affairs are called according to the mark in the non-public library for including in preset address and call request
The corresponding system interface function in library is opened, to open non-public library.As a result, by the way that the return address of application program to be revised as moving
The legal address of operating system in terminal, can pass through later by legal verifying of the system interface function to called side
The corresponding system interface function in non-public library is called, non-public library is opened, to realize around system to application program dynamic
The limitation in non-public library is linked, not only without reading and resolution file, link speed is fast, and now can load non-public library,
Improve practicability.
The additional aspect of the application and advantage will be set forth in part in the description, and will partially become from the following description
It obtains obviously, or recognized by the practice of the application.
Detailed description of the invention
The application is above-mentioned and/or additional aspect and advantage will become from the following description of the accompanying drawings of embodiments
Obviously and it is readily appreciated that, in which:
Fig. 1 illustrates for the process of the call method in non-public library in a kind of mobile terminal provided by the embodiment of the present application
Figure;
Fig. 2 is the process signal of the call method in non-public library in another kind mobile terminal provided by the embodiment of the present application
Figure;
Fig. 3 is the structural representation of the calling device in non-public library in a kind of mobile terminal provided by the embodiment of the present application
Figure;
Fig. 4 is the structural schematic diagram of electronic equipment provided by the embodiment of the present application.
Specific embodiment
Embodiments herein is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end
Same or similar label indicates same or similar element.The embodiments described below with reference to the accompanying drawings are exemplary,
It is intended for explaining the application, and should not be understood as the limitation to the application.
For in the related technology, the existing method around the non-public library limitation of system dynamic link needs the embodiment of the present application
So file is read and parses, not only speed is slow, but also is only applicable to the non-public library loaded, and what the practicability is poor asks
Topic proposes a kind of call method in non-public library in mobile terminal.
The call method in non-public library in mobile terminal provided by the embodiments of the present application, the calling of available application program
Request, and according to the mark for the application program for including in call request, the return address of application program is obtained, later by target
Location is that the function that jumps of the return address of application program is written in the corresponding memory of preset address, and return address is revised as pre-
If address, wherein preset address is the legal address of operating system in mobile terminal, and then according to preset address and call request
In include the mark in non-public library call the corresponding system interface function in non-public library, to open non-public library.Pass through as a result,
The return address of application program is revised as to the legal address of operating system in mobile terminal, to exchange by system interface function
With the legal verifying of side, non-public library can be opened by the corresponding system interface function in the non-public library of calling later, thus
It realizes around limitation of the system to the non-public library of application program dynamic link, not only without reading and resolution file, link speed
Degree is fast, and now can load non-public library, improves practicability.
Below with reference to the accompanying drawings to the call method, device, electronic equipment in non-public library in mobile terminal provided by the present application,
Storage medium and computer program are described in detail.
Fig. 1 illustrates for the process of the call method in non-public library in a kind of mobile terminal provided by the embodiment of the present application
Figure.
As shown in Figure 1, in the mobile terminal non-public library call method, comprising the following steps:
Step 101, obtain the call request of application program, include in the call request application program mark and
The mark in non-public library.
Wherein, the mark of application program refers to the authentication information that can be uniquely determined application program.It is understood that
, each application program is owned by unique mark.The mark in non-public library refers to that application requests are called non-public
The mark in library, for example, the mark in non-public library can be the path in the non-public library of application requests calling.
It should be noted that the system of some mobile terminals on the market will limit certain application programs in terminal at present
The non-public library of dynamic link, to improve the safety of system.But for some specific demands, such as plug-in unit, hot repair waits again again
The non-public library of dynamic link is needed, therefore in order to meet these demands, improves the function of mobile system, it is sometimes desirable to bypass system
This limitation can open so that itself does not have the application program in the non-public library of permission dynamic link and access non-public library.
In actual use, in the mobile terminal of the embodiment of the present application non-public library call method, can by the application reality
The calling device for applying non-public library in the mobile terminal of example offer executes.It is non-public in mobile terminal provided by the embodiments of the present application
The calling device in library can be only fitted in arbitrary electronic equipment, obtain the call request that application program issues in real time, and identify
The mark of application program in call request, to determine the identity of application program.
It should be noted that the mobile terminal of Android system starts to prevent application program dynamic since 7.0 version of Android
Non-public library is linked, therefore, in a kind of possible realization scene of application embodiment, the operating system in mobile terminal be can be
Android system.
Step 102, according to the mark of the application program, the return address of the application program is obtained.
It should be noted that in the operating system in the limitation non-public library of application call, it is not all to apply journey
Sequence is all prohibited to call non-public library, and system can judge that application program is to be limited not according to the return address of application program
It is capable of calling private application program, is also allowed to call the valid application program in non-public library.Therefore, implement in the application
In example, it can obtain and apply according to the mark for getting application program, from caching corresponding with the mark of the application program
The corresponding return address of the mark of program, the i.e. return address of the application program.
Step 103, it will jump in the corresponding memory of function write-in preset address, wherein the target for jumping function
Location is the return address, and the preset address is the legal address of operating system in the mobile terminal.
Step 104, the preset address is revised as in the return address.
Wherein, preset address refers to the legal address of operating system in mobile terminal, that is, has the non-public library of dynamic link
Application program or function return address.
In a kind of possible way of realization of the embodiment of the present application, it can be adjusted at any time to realize application program when needed
With non-public library, the return address of application program can be revised as to the legal address of mobile terminal operating system, so that using
Program obtains the permission for calling non-public library.However, by the return address of modification application program, so that application program is successfully adjusted
Behind non-public library, it is also necessary to by the data obtained from open library (such as the knot for calling the function in non-public library to return
Fruit), the application program that request dynamic links non-public library is returned to, and can be according to the corresponding return of called side in returned data
Address returns to data, therefore the return address of application program can be made to be revised as after preset address, and application program can not obtain
Get the data of return.
It in the embodiment of the present application, can be after getting the return address of application program, first according to preset address
It determines the corresponding memory of preset address, and is written jumps letter using the return address of application program as destination address in memory
Number, so as to can trigger according to preset address after calling non-public Kucheng's function and jump the return that function jumps to application program
Address.After the corresponding memory of function write-in preset address will be jumped, the return address of application program can be revised as presetting
Address, so that application program can successfully call non-public library by legal verifying.
It should be noted that non-public affairs can be called in the operating system in the limitation non-public library of application program dynamic link
The legal address for opening library is less, and when in order to both application program be made to need to call non-public library, it can be at any time using legal
Address does not influence the non-public library of legal address normal call to obtain calling permission, can choose and takes less than in the project
Legal address as preset address, for example, preset address can be in a kind of possible way of realization of the embodiment of the present application
The address of Java local interface debugging function.
Further, due to needing to jump the corresponding memory of function write-in preset address, so that non-public library has been called
At can return to the application program for calling non-public library later, therefore the corresponding memory needs of preset address can read and write
Data.I.e. in a kind of possible way of realization of the embodiment of the present application, before above-mentioned steps 103, can also include:
It is readable writeable by the attribute modification of the corresponding memory of the preset address.
It is understood that the memory in mobile device may be different according to the data that it is stored, and there is difference
Attribute, for example, the attribute of some memory fields be it is read-only, do not allow that data are written to it;The attribute of some memory fields is readable
It is writeable, it can to read data from the memory field, data can also be written into the memory field.
In the embodiment of the present application, due to need by jump back to application program jump function write-in preset address it is corresponding
In memory, thus can by the attribute modification of the corresponding memory of preset address be it is readable writeable, so as to will jump function write-in should
Memory field, and the data in the memory field are read when needed, so that jumping function jumps to corresponding application program.
Step 105, the corresponding system in the non-public library is called according to the mark in the preset address and the non-public library
System interface function, to open the non-public library.
Wherein, the corresponding system interface function in non-public library calls returning for the called side in non-public library for checking request
It whether legal goes back to address, and when the return address of called side is legal, opens and load the corresponding non-public affairs of the system interface function
Open library.
In a kind of possible way of realization of the embodiment of the present application, the corresponding system interface function in non-public library be can be
Dlopen function.Dlopen function can open specified non-public library according to specified mode, and return to the sentence in non-public library
Handle.
It should be noted that after preset address is revised as in the return address of application program, it can be according to defaultly
The mark in location and non-public library calls the corresponding dlopen function in non-public library, so that dlopen function is pre- according to what is got
If address determines that the called side in the non-public library of request call is legal, and by non-public library mark as dlopen function first
A parameter specifies private path, so that dlopen function is opened and loads corresponding non-public library, and returns corresponding non-
The handle in open library.
The call method in non-public library in mobile terminal provided by the embodiments of the present application, the calling of available application program
Request, and according to the mark for the application program for including in call request, the return address of application program is obtained, later by target
Location is that the function that jumps of the return address of application program is written in the corresponding memory of preset address, and return address is revised as pre-
If address, wherein preset address is the legal address of operating system in mobile terminal, and then according to preset address and call request
In include the mark in non-public library call the corresponding system interface function in non-public library, to open non-public library.Pass through as a result,
The return address of application program is revised as to the legal address of operating system in mobile terminal, to exchange by system interface function
With the legal verifying of side, non-public library can be opened by the corresponding system interface function in the non-public library of calling later, thus
It realizes around limitation of the system to the non-public library of application program dynamic link, not only without reading and resolution file, link speed
Degree is fast, and now can load non-public library, improves practicability.
In a kind of possible way of realization of the application, application program can be obtained by the register in mobile terminal
Preset address is simultaneously revised as in return address by return address, and after calling non-public library, will call knot by jumping function
Fruit is back to the application program for calling non-public library.
Below with reference to Fig. 2, the call method in non-public library in mobile terminal provided by the embodiments of the present application is carried out into one
Walk explanation.
Fig. 2 is the process signal of the call method in non-public library in another kind mobile terminal provided by the embodiment of the present application
Figure.
As shown in Fig. 2, in the mobile terminal non-public library call method, comprising the following steps:
Step 201, obtain the call request of application program, include in the call request application program mark,
The mark in non-public library and the address of object invocation function.
Wherein, object invocation function refers to that application program needs the function in the non-public library called;Object invocation function
Address, refer to the corresponding memory address of object invocation function, may include target tune in the corresponding memory of object invocation function
With the parameter of function and variable etc..
Step 202, according to the mark of the application program, the return of the application program is obtained from connection register
Location.
Wherein, register (LinkRegister, abbreviation LR) is connected, there are two types of purposes for tool: first is that being used to save subprogram
Return address;Second is that when an anomaly occurs, the value of PC subtracts 4 (or subtracting 2) when the value saved in LR is equal to abnormal occur, therefore
It can be continued to execute according to the value of LR back to the corresponding position before abnormal occur under various abnormal patterns.
In the embodiment of the present application, the return address of application program may remain in connection register, and can basis
The mark of application program takes out return address corresponding with application identities from connection register.
Step 203, it will jump in the corresponding memory of function write-in preset address, wherein the target for jumping function
Location is the return address.
The specific implementation process and principle of above-mentioned steps 201-203, is referred to the detailed description of above-described embodiment, herein
It repeats no more.
Step 204, the preset address is revised as in the return address stored in the connection register.
It should be noted that when using the return address of connection register storage application program, then by application program
Return address when being revised as preset address, the return address that connect the corresponding application program stored in register can be repaired
It is changed to preset address.
Step 205, the corresponding system in the non-public library is called according to the mark in the preset address and the non-public library
System interface function, to open the non-public library.
It should be noted that after being opened by calling system interface function and loading corresponding non-public library, system
Interface function can return to the handle in non-public library.For example, dlopen function can when system interface function is dlopen function
To open corresponding non-public library according to the mark in non-public library, and by non-public library graftabl, and load non-public library
In meet, and then return to the reference (i.e. handle) in non-public library, and using the handle in non-public library as the first of dlsym function
Parameter can obtain the pointer of specific function in non-public library according to the address to obtain address of the symbol in non-public library.
Further, opened by calling system interface function and by non-public library graftabl after, can basis
The object invocation function in the non-public library of mesh is called in the address for the object invocation function for including in call request.I.e. in the application
In a kind of possible way of realization of embodiment, after above-mentioned steps 205, can also include:
According to the object invocation function in non-public library described in the call by location of the object invocation function.
It should be noted that can determine that object invocation function is right in non-public library according to the address of object invocation function
The symbol answered, so according to the symbol in non-public library address, determine the pointer of object invocation function in non-public library, it
Function is called according to the corresponding pointer invocation target of object invocation function afterwards.
Step 206, according to the preset address, it is back to the corresponding memory of the preset address, it is described default to trigger
Function, which is jumped, described in the corresponding memory in address jumps to the return address.
In the embodiment of the present application, after calling non-public library to complete and obtaining the call result of object invocation function, then
The corresponding memory of preset address can be determined according to preset address, and trigger be written in memory jump function, jump to and jump
The corresponding destination address of function, that is, call the return address of the application program in non-public library, call result be back to accordingly
Application program.
The call method in non-public library in mobile terminal provided by the embodiments of the present application, the calling of available application program
Request, and according to the mark for the application program for including in call request, the return of application program is obtained from connection register
The function that jumps for the return address that destination address is application program is written in the corresponding memory of preset address later for location, and
Preset address is revised as in return address in connection register, wherein preset address is the legal of operating system in mobile terminal
Address, and then call the corresponding system in non-public library to connect according to the mark in the non-public library for including in preset address and call request
Mouth function is back to the corresponding memory of preset address to open non-public library later, to trigger in the corresponding memory of preset address
The function that jumps jump to return address.It is by the way that the return address of application program to be revised as operating in mobile terminal as a result,
The legal address of system, the non-public library of calling can be passed through later by legal verifying of the system interface function to called side
Corresponding system interface function, opens non-public library, calls the object invocation function in non-public library and returns to call result
To application program, to realize the limitation around system to the non-public library of application program dynamic link, not only without reading and
Resolution file, link speed is fast, and now can load non-public library, improves practicability.
In order to realize above-described embodiment, the application also proposes a kind of calling device in non-public library in mobile terminal.
Fig. 3 is the structural schematic diagram of the calling device in non-public library in a kind of mobile terminal provided by the embodiments of the present application.
As shown in figure 3, in the mobile terminal non-public library calling device 30, comprising:
First obtains module 31, includes the application in the call request for obtaining the call request of application program
The mark of program and the mark in non-public library;
Second acquisition module 32 obtains the return address of the application program for the mark according to the application program;
Writing module 33, for that will jump in the corresponding memory of function write-in preset address, wherein the function that jumps
Destination address is the return address, and the preset address is the legal address of operating system in the mobile terminal;
First modified module 34, for the preset address to be revised as in the return address;
First calling module 35, it is described non-public for being called according to the mark in the preset address and the non-public library
The corresponding system interface function in library, to open the non-public library.
In actual use, in mobile terminal provided by the embodiments of the present application non-public library calling device, can be matched
It sets in any electronic equipment, to execute the call method in non-public library in aforementioned mobile terminal.
The calling device in non-public library in mobile terminal provided by the embodiments of the present application, the calling of available application program
Request, and according to the mark for the application program for including in call request, the return address of application program is obtained, later by target
Location is that the function that jumps of the return address of application program is written in the corresponding memory of preset address, and return address is revised as pre-
If address, wherein preset address is the legal address of operating system in mobile terminal, and then according to preset address and call request
In include the mark in non-public library call the corresponding system interface function in non-public library, to open non-public library.Pass through as a result,
The return address of application program is revised as to the legal address of operating system in mobile terminal, to exchange by system interface function
With the legal verifying of side, non-public library can be opened by the corresponding system interface function in the non-public library of calling later, thus
It realizes around limitation of the system to the non-public library of application program dynamic link, not only without reading and resolution file, link speed
Degree is fast, and now can load non-public library, improves practicability.
In a kind of possible way of realization of the application, aforesaid operations system is Android system, and above-mentioned preset address is
Java local interface debugs the address of function, and above system interface function is dlopen function.
Further, in the alternatively possible way of realization of the application, the calling in non-public library in above-mentioned mobile terminal
Device 30, further includes:
Return module, for being back to the corresponding memory of the preset address according to the preset address, described in triggering
Function, which is jumped, described in the corresponding memory of preset address jumps to the return address.
It further, further include object invocation in above-mentioned call request in the application in another possible way of realization
The address of function;
Correspondingly, in above-mentioned mobile terminal non-public library calling device 30, further includes:
Second calling module, for the mesh in the non-public library according to the call by location of the object invocation function
Mark calls function.
Further, in the application in another possible way of realization, the calling in non-public library in above-mentioned mobile terminal
Device 30, further includes:
Second modified module, for being readable writeable by the attribute modification of the corresponding memory of the preset address.
In a kind of possible way of realization of the application, above-mentioned second obtains module 32, is specifically used for:
According to the mark of the application program, the return address of the application program is obtained from connection register.
In a kind of possible way of realization of the application, above-mentioned first modified module 34 is specifically used for:
The preset address is revised as in the return address stored in the connection register.
It should be noted that aforementioned to the call method embodiment in non-public library in Fig. 1, mobile terminal shown in Fig. 2
The calling device 30 for being also applied for non-public library in the mobile terminal of the embodiment is illustrated, details are not described herein again.
The calling device in non-public library in mobile terminal provided by the embodiments of the present application, the calling of available application program
Request, and according to the mark for the application program for including in call request, the return of application program is obtained from connection register
The function that jumps for the return address that destination address is application program is written in the corresponding memory of preset address later for location, and
Preset address is revised as in return address in connection register, wherein preset address is the legal of operating system in mobile terminal
Address, and then call the corresponding system in non-public library to connect according to the mark in the non-public library for including in preset address and call request
Mouth function is back to the corresponding memory of preset address to open non-public library later, to trigger in the corresponding memory of preset address
The function that jumps jump to return address.It is by the way that the return address of application program to be revised as operating in mobile terminal as a result,
The legal address of system, the non-public library of calling can be passed through later by legal verifying of the system interface function to called side
Corresponding system interface function, opens non-public library, calls the object invocation function in non-public library and returns to call result
To application program, to realize the limitation around system to the non-public library of application program dynamic link, not only without reading and
Resolution file, link speed is fast, and now can load non-public library, improves practicability.
In order to realize above-described embodiment, the application also proposes a kind of electronic equipment.
Fig. 4 is the structural schematic diagram of the electronic equipment of one embodiment of the invention.
As shown in figure 4, above-mentioned electronic equipment 200 includes:
Memory 210 and processor 220 connect the bus 230 of different components (including memory 210 and processor 220),
Memory 210 is stored with computer program, realizes movement described in the embodiment of the present application when processor 220 executes described program
The call method in non-public library in terminal.
Bus 230 indicates one of a few class bus structures or a variety of, including memory bus or Memory Controller,
Peripheral bus, graphics acceleration port, processor or the local bus using any bus structures in a variety of bus structures.It lifts
For example, these architectures include but is not limited to industry standard architecture (ISA) bus, microchannel architecture (MAC)
Bus, enhanced isa bus, Video Electronics Standards Association (VESA) local bus and peripheral component interconnection (PCI) bus.
Electronic equipment 200 typically comprises various electronic readable medium.These media can be it is any can be electric
The usable medium that sub- equipment 200 accesses, including volatile and non-volatile media, moveable and immovable medium.
Memory 210 can also include the computer system readable media of form of volatile memory, such as arbitrary access
Memory (RAM) 240 and/or cache memory 250.Electronic equipment 200 may further include it is other it is removable/can not
Mobile, volatile/non-volatile computer system storage medium.Only as an example, storage system 260 can be used for reading and writing not
Movably, non-volatile magnetic media (Fig. 4 do not show, commonly referred to as " hard disk drive ").It although not shown in fig 4, can be with
The disc driver for reading and writing to removable non-volatile magnetic disk (such as " floppy disk ") is provided, and non-volatile to moving
The CD drive of CD (such as CD-ROM, DVD-ROM or other optical mediums) read-write.In these cases, each driving
Device can be connected by one or more data media interfaces with bus 230.Memory 210 may include at least one program
Product, the program product have one group of (for example, at least one) program module, these program modules are configured to perform the present invention
The function of each embodiment.
Program/utility 280 with one group of (at least one) program module 270, can store in such as memory
In 210, such program module 270 includes --- but being not limited to --- operating system, one or more application program, other
It may include the realization of network environment in program module and program data, each of these examples or certain combination.Journey
Sequence module 270 usually executes function and/or method in embodiment described in the invention.
Electronic equipment 200 can also be with one or more external equipments 290 (such as keyboard, sensing equipment, display 291
Deng) communication, can also be enabled a user to one or more equipment interact with the electronic equipment 200 communicate, and/or with make
Any equipment (such as network interface card, the modem that the electronic equipment 200 can be communicated with one or more of the other calculating equipment
Etc.) communication.This communication can be carried out by input/output (I/O) interface 292.Also, electronic equipment 200 can also lead to
Cross network adapter 293 and one or more network (such as local area network (LAN), wide area network (WAN) and/or public network, example
Such as internet) communication.As shown, network adapter 293 is communicated by bus 230 with other modules of electronic equipment 200.It answers
When understanding, although not shown in the drawings, other hardware and/or software module can be used in conjunction with electronic equipment 200, including but unlimited
In: microcode, device driver, redundant processing unit, external disk drive array, RAID system, tape drive and number
According to backup storage system etc..
Program of the processor 220 by operation storage in memory 210, thereby executing various function application and data
Processing.
It should be noted that the implementation process and technical principle of the electronic equipment of the present embodiment are referring to aforementioned to the application reality
The explanation of the call method in non-public library in the mobile terminal of example is applied, details are not described herein again.
Electronic equipment provided by the embodiments of the present application can execute the calling in non-public library in foregoing mobile terminal
Method obtains the call request of application program, and according to the mark for the application program for including in call request, obtains application program
Return address, the corresponding memory of preset address is written into the function that jumps for the return address that destination address is application program later
In, and preset address is revised as in return address, wherein preset address is the legal address of operating system in mobile terminal, into
And the corresponding system interface function in non-public library is called according to the mark in the non-public library for including in preset address and call request,
To open non-public library.As a result, by the way that operating system is revised as in mobile terminal legally in the return address of application program
Location, the corresponding system in the non-public library of calling can be passed through later by legal verifying of the system interface function to called side
Interface function opens non-public library, to realize the limitation around system to the non-public library of application program dynamic link, not only
Without reading and resolution file, link speed is fast, and now can load non-public library, improves practicability.
In order to realize above-described embodiment, the application also proposes a kind of computer readable storage medium.
Wherein, the computer readable storage medium, is stored thereon with computer program, when which is executed by processor,
To realize the call method in non-public library in mobile terminal described in the embodiment of the present application.
In order to realize above-described embodiment, the application another further aspect embodiment provides a kind of computer program, which is located
When managing device execution, to realize the call method in non-public library in mobile terminal described in the embodiment of the present application.
In a kind of optional way of realization, the present embodiment can be using any group of one or more computer-readable media
It closes.Computer-readable medium can be computer-readable signal media or computer readable storage medium.It is computer-readable to deposit
Storage media for example may be-but not limited to-system, device or the device of electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor
Part, or any above combination.The more specific example (non exhaustive list) of computer readable storage medium includes: to have
The electrical connection of one or more conducting wires, portable computer diskette, hard disk, random access memory (RAM), read-only memory
(ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-
ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.In this document, computer-readable storage
Medium can be any tangible medium for including or store program, which can be commanded execution system, device or device
Using or it is in connection.
Computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal,
Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including --- but
It is not limited to --- electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be
Any computer-readable medium other than computer readable storage medium, which can send, propagate or
Transmission is for by the use of instruction execution system, device or device or program in connection.
The program code for including on computer-readable medium can transmit with any suitable medium, including --- but it is unlimited
In --- wireless, electric wire, optical cable, RF etc. or above-mentioned any appropriate combination.
The computer for executing operation of the present invention can be write with one or more programming languages or combinations thereof
Program code, described program design language include object oriented program language-such as Java, Smalltalk, C++,
It further include conventional procedural programming language-such as " C " language or similar programming language.Program code can be with
It is fully executed on consumer electronic devices, partly executes on consumer electronic devices, held as an independent software package
Row, partially part executes in devices in remote electronic or completely in devices in remote electronic or service on consumer electronic devices
It is executed on device.In the situation for being related to devices in remote electronic, devices in remote electronic can pass through the network of any kind --- packet
It includes local area network (LAN) or wide area network (WAN)-is connected to consumer electronic devices, or, it may be connected to external electronic device (example
It is such as connected using ISP by internet).
Those skilled in the art will readily occur to its of the application after considering specification and practicing the invention applied here
Its embodiment.This application is intended to cover any variations, uses, or adaptations of the application, these modifications, purposes or
The common knowledge in the art that person's adaptive change follows the general principle of the application and do not invent including the application
Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the application are wanted by right
It asks and points out.
It should be understood that the application is not limited to the precise structure that has been described above and shown in the drawings, and
And various modifications and changes may be made without departing from the scope thereof.Scope of the present application is only limited by the accompanying claims.
Claims (10)
1. the call method in non-public library in a kind of mobile terminal characterized by comprising
The call request of application program is obtained, includes the mark of the application program and the mark in non-public library in the call request
Know;
According to the mark of the application program, the return address of the application program is obtained;
It will jump in the corresponding memory of function write-in preset address, wherein the destination address for jumping function is the return
Address, the preset address are the legal address of operating system in the mobile terminal;
The preset address is revised as in the return address;And
The corresponding system interface function in the non-public library is called according to the mark in the preset address and the non-public library, with
Open the non-public library.
2. the call method in non-public library in mobile terminal as described in claim 1, which is characterized in that the operating system is
Android system, the preset address are the address that Java local interface debugs function, and the system interface function is dlopen letter
Number.
3. the call method in non-public library in mobile terminal as described in claim 1, which is characterized in that described according to described pre-
If the mark in address and the non-public library calls the corresponding system interface function in the non-public library, described non-public to open
After library, further includes:
According to the preset address, it is back to the corresponding memory of the preset address, it is corresponding interior to trigger the preset address
Function, which is jumped, described in depositing jumps to the return address.
4. the call method in non-public library in mobile terminal as described in claim 1, which is characterized in that in the call request
It further include the address of object invocation function;
It is described that the corresponding system interface letter in the non-public library is called according to the mark in the preset address and the non-public library
Number, after opening the non-public library, further includes:
According to the object invocation function in non-public library described in the call by location of the object invocation function.
5. the call method in non-public library in the mobile terminal as described in claim 1-4 is any, which is characterized in that described by institute
Before stating in the memory corresponding with function write-in preset address is jumped of return address, further includes:
It is readable writeable by the attribute modification of the corresponding memory of the preset address.
6. the call method in non-public library in the mobile terminal as described in claim 1-4 is any, which is characterized in that the basis
The mark of the application program obtains the return address of application program, comprising:
According to the mark of the application program, the return address of the application program is obtained from connection register.
7. the call method in non-public library in mobile terminal as claimed in claim 6, which is characterized in that described by the return
It is revised as the preset address in address, comprising:
The preset address is revised as in the return address stored in the connection register.
8. the calling device in non-public library in a kind of mobile terminal characterized by comprising
First obtains module, includes the application program in the call request for obtaining the call request of application program
Mark and the mark in non-public library;
Second acquisition module obtains the return address of the application program for the mark according to the application program;
Writing module, for that will jump in the corresponding memory of function write-in preset address, wherein the target for jumping function
Location is the return address, and the preset address is the legal address of operating system in the mobile terminal;
Modified module, for the preset address to be revised as in the return address;And
Calling module, for calling the corresponding system in the non-public library according to the mark in the preset address and the non-public library
System interface function, to open the non-public library.
9. a kind of electronic equipment characterized by comprising memory, processor and storage are on a memory and can be in processor
The program of upper operation, which is characterized in that the processor is realized as described in any in claim 1-7 when executing described program
The call method in non-public library in mobile terminal.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that described program is processed
The call method in non-public library in the mobile terminal as described in any in claim 1-7 is realized when device executes.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811325972.2A CN109597662B (en) | 2018-11-08 | 2018-11-08 | Method and device for calling non-public library in mobile terminal and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811325972.2A CN109597662B (en) | 2018-11-08 | 2018-11-08 | Method and device for calling non-public library in mobile terminal and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109597662A true CN109597662A (en) | 2019-04-09 |
CN109597662B CN109597662B (en) | 2021-07-27 |
Family
ID=65958646
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811325972.2A Active CN109597662B (en) | 2018-11-08 | 2018-11-08 | Method and device for calling non-public library in mobile terminal and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109597662B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110502288A (en) * | 2019-08-19 | 2019-11-26 | Oppo广东移动通信有限公司 | For the call method of third-party application, device, electronic equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140282457A1 (en) * | 2013-03-13 | 2014-09-18 | Alex C. Chow | Systems And Methods For Embedded Shared Libraries In An Executable Image |
CN105955762A (en) * | 2016-04-19 | 2016-09-21 | 北京金山安全软件有限公司 | Method and device for injecting dynamic link library file and electronic equipment |
CN107256349A (en) * | 2017-06-13 | 2017-10-17 | 广州阿里巴巴文学信息技术有限公司 | Dynamic base method for preventing fraudulent-using, device, electronic equipment and readable storage medium storing program for executing |
-
2018
- 2018-11-08 CN CN201811325972.2A patent/CN109597662B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140282457A1 (en) * | 2013-03-13 | 2014-09-18 | Alex C. Chow | Systems And Methods For Embedded Shared Libraries In An Executable Image |
CN105955762A (en) * | 2016-04-19 | 2016-09-21 | 北京金山安全软件有限公司 | Method and device for injecting dynamic link library file and electronic equipment |
CN107256349A (en) * | 2017-06-13 | 2017-10-17 | 广州阿里巴巴文学信息技术有限公司 | Dynamic base method for preventing fraudulent-using, device, electronic equipment and readable storage medium storing program for executing |
Non-Patent Citations (1)
Title |
---|
武智 等: "Android远程调试的探索与实现", 《HTTPS://TECH.MEITUAN.COM/2017/07/20/ANDROID-REMOTE-DEBUG.HTML》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110502288A (en) * | 2019-08-19 | 2019-11-26 | Oppo广东移动通信有限公司 | For the call method of third-party application, device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109597662B (en) | 2021-07-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106547678B (en) | Method and apparatus for white-box testing | |
CN110096338A (en) | Intelligent contract executes method, apparatus, equipment and medium | |
CN109726136A (en) | Test method, device, equipment and the storage medium of database | |
US9990458B2 (en) | Generic design rule checking (DRC) test case extraction | |
US11954015B2 (en) | Software environment for control engine debug, test, calibration and tuning | |
CN108388517A (en) | A kind of internal-memory detection method, device, equipment and storage medium | |
CN110196718A (en) | Script obscures method | |
CN110209569A (en) | Interface test method, interface test device and storage medium | |
CN110610089B (en) | User behavior simulation method and device and computer equipment | |
CN109597640A (en) | A kind of account management method of application program, device, equipment and medium | |
CN111414309A (en) | Automatic test method of application program, computer equipment and storage medium | |
US8874966B1 (en) | Storage device error simulator tool | |
CN105453033A (en) | Program testing service | |
CN109597662A (en) | The call method, device and electronic equipment in non-public library in mobile terminal | |
CN115437341A (en) | Vehicle Ethernet diagnosis method, device, equipment and medium | |
CN109033456A (en) | A kind of condition query method, apparatus, electronic equipment and storage medium | |
CN116775394B (en) | Chip verification method, device, apparatus, storage medium and computer program product | |
US9092574B2 (en) | Blocking a selected port prior to installation of an application | |
US7617084B1 (en) | Mechanism and method for simultaneous processing and debugging of multiple programming languages | |
CN116107648A (en) | Physical CD driver redirection method, system and device in cloud desktop environment | |
CN109669875A (en) | Application crash test method and device, electronic equipment and storage medium | |
CN111966072B (en) | Simulation test method and device for air conditioner control panel | |
CN113986753A (en) | Interface test method, device, equipment and storage medium | |
CN108551410B (en) | Interface returning method and terminal equipment | |
CN111740876B (en) | Application device, test method, storage medium and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |