Summary of the invention
For overcoming above-mentioned technical problem or solving above-mentioned technical problem at least in part, the special techniques below scheme that proposes:
One embodiment of the present of invention proposes a kind of acquisition and the method for transmission application data, including:
The related data of native applications program, host is obtained by the destination application being installed in host application
Application program and native applications program are installed on first terminal equipment;
The related data of native applications program and the installation environment information of first terminal equipment are passed through predetermined sender
Formula sends to the second terminal unit.
Alternatively, the method also includes:
Reflection is called has the installation kit as the subsidiary resource of host application of identical bag name with host application,
To load the destination application that this installation kit is realized, wherein, the resource requirement of destination application and native applications program
Resource requirement one_to_one corresponding;
Wherein, the destination application by being installed in host application obtains the dependency number of native applications program
According to, including:
The data read command of the active process of invocation target application program;
Hooking up destination application execution data read command by Hook Function needs the resource reading data corresponding
Native applications program needs to read the resource of data;
Perform the resource hooked up, to obtain the related data of native applications program.
Preferably, load the destination application that this installation kit is realized, including:
The resource requirement of destination application and the resource requirement of native applications program is set up by host application
One-to-one relationship.
Preferably, the one_to_one corresponding pass of the resource requirement of destination application and the resource requirement of native applications program is set up
System, including:
Resolve installation kit to determine the resource name of the resource requirement of destination application;
The resource name of the resource requirement according to destination application, loads resource requirement with native applications program one a pair
The resource answered.
Preferably, the related data of native applications program and the installation environment information of first terminal equipment are passed through predetermined
Transmission mode sends to the second terminal unit, including:
The related data of native applications program and the installation environment information of first terminal equipment are passed through the list pre-build
Send to the second terminal unit to data link.
Preferably, the related data of native applications program includes user's historical behavior data, application configuration information, encryption number
At least one according to, the installation environment information of first terminal equipment includes CPU model, kernel version number, system version number, is
At least one in system configuration information.
Another embodiment of the present invention proposes a kind of method running application program, including:
Receive related data and the installation environment of first terminal equipment of the native applications program that first terminal equipment sends
Information;
The installation environment information of related data based on the native applications program received and first terminal equipment install and/
Or run the raw application program that continues in the second terminal unit.
It is preferably based on the related data of the native applications program received and the installation environment information of first terminal equipment
Install and/or run the raw application program that continues in the second terminal unit, including:
Installation and/or the operation activity of the raw application program that continues is monitored by Hook Function;
Read the installation environment information of the second terminal unit when being monitored the raw application program that continues by Hook Function and/or continue
During the related data that life is applied, call the phase applied with the second terminal unit installation environment information and/or the life that continues that is that receive
Close installation environment information and/or the related data of native applications program of data first terminal equipment one to one.
It is preferably based on the related data of the native applications program received and the installation environment information of first terminal equipment
Run the raw application program that continues in the second terminal unit, including:
When monitoring the raw application program that continues and reading its corresponding related data, whether exist former under detection predetermined directories
The related data of raw application program;
The most then read the related data of native applications program.
Preferably, the related data of native applications program includes user's historical behavior data, application configuration information, encryption number
At least one according to, the installation environment information of first terminal equipment includes CPU model, kernel version number, system version number, is
At least one in system configuration information.
One more embodiment of the present invention proposes a kind of acquisition and the device of transmission application data, including:
Acquisition module, obtains native applications program for the destination application by being installed in host application
Related data, host application and native applications program are installed on first terminal equipment;
Sending module, for passing through the related data of native applications program and the installation environment information of first terminal equipment
Predetermined transmission mode sends to the second terminal unit.
Alternatively, this device also includes:
Load-on module, calls for reflection and has the subsidiary as host application of identical bag name with host application
The installation kit of resource, to load the destination application that this installation kit is realized, wherein, the resource requirement of destination application with
The resource requirement one_to_one corresponding of native applications program;
Wherein, acquisition module includes:
Instruction calls unit, for the data read command of the active process of invocation target application program;
Resource hooks up unit, needs to read for hooking up destination application execution data read command by Hook Function
The native applications program that the resource of data is corresponding needs to read the resource of data;
Resource performance element, for performing the resource hooked up, to obtain the related data of native applications program.
Preferably, load-on module includes:
Relation sets up unit, answers with primary for being set up the resource requirement of destination application by host application
One-to-one relationship with the resource requirement of program.
Preferably, relation is set up unit and is included:
Resource name determines subelement, for resolving installation kit to determine the resource name of the resource requirement of destination application;
Resource adds subelements, for the resource name of the resource requirement according to destination application, loads and native applications
The resource requirement of program resource one to one.
Preferably, sending module is specifically for by the related data of native applications program and the mounting ring of first terminal equipment
Environment information is sent to the second terminal unit by the unidirectional data link pre-build.
Preferably, the related data of native applications program includes user's historical behavior data, application configuration information, encryption number
At least one according to, the installation environment information of first terminal equipment includes CPU model, kernel version number, system version number, is
At least one in system configuration information.
One more embodiment of the present invention proposes a kind of device running application program, including:
Receiver module, sets for the related data and first terminal receiving the native applications program that first terminal equipment sends
Standby installation environment information;
Install and run module, for related data based on the native applications program received and first terminal equipment
Installation environment information is installed and/or runs the raw application program that continues in the second terminal unit.
Preferably, install and run module and include:
Activity-monitoring units, for monitoring installation and/or the operation activity of the raw application program that continues by Hook Function;
Data call unit, reads the peace of the second terminal unit for monitoring, by Hook Function, the raw application program that continues
During the related data of dress environmental information and/or the raw application that continues, call that receive with the second terminal unit installation environment information
And/or the installation environment information of the related data first terminal equipment one to one of the raw application that continues and/or native applications program
Related data.
Preferably, install and run module and include:
Data detecting unit, for when monitoring the raw application program that continues and reading its corresponding related data, detection is pre-
Determine whether to exist under catalogue the related data of native applications program;
Data-reading unit, for when the related data that there is native applications program under predetermined directories being detected, reads
The related data of native applications program.
Preferably, the related data of native applications program includes user's historical behavior data, application configuration information, encryption number
At least one according to, the installation environment information of first terminal equipment includes CPU model, kernel version number, system version number, is
At least one in system configuration information.
How technical scheme moves the related data of the application program in first terminal equipment if solving
In second terminal unit.The dependency number of native applications program is obtained by the destination application being installed in host application
According to, host application and native applications program are installed on first terminal equipment, in this step by having and native applications
Function and the destination application of service that program is the most identical go to perform data read operation, to obtain native applications program
All related data, includes, in above-mentioned data, the data that high operating right just can get.
Further, technical scheme also solves the data how received based on first terminal equipment to
The problem that the installation and operation process of the application program of two terminal units is controlled.Based on the native applications program received
The raw application journey that continues in the second terminal unit is installed and/or run to the installation environment information of related data and first terminal equipment
Sequence, installation environment information based on the first terminal equipment received is built one for the raw application program that continues and is similar to first terminal
The installation environment of equipment, to ensure being smoothed out of the continue follow-up installation of raw application program and operation, it addition, by receiving
The related data of native applications program install and/or run the raw application program that continues in the second terminal unit, user is without hands
The dynamic historical data importing first terminal equipment or login authentication account, it is to avoid the complicated and operating process of redundancy, carry
Rise user experience.
Aspect and advantage that the present invention adds will part be given in the following description, and these will become from the following description
Obtain substantially, or recognized by the practice of the present invention.
Detailed description of the invention
Embodiments of the invention are described below in detail, and the example of described embodiment is shown in the drawings, the most from start to finish
Same or similar label represents same or similar element or has the element of same or like function.Below with reference to attached
The embodiment that figure describes is exemplary, is only used for explaining the present invention, and is not construed as limiting the claims.
Those skilled in the art of the present technique are appreciated that unless expressly stated, singulative used herein " ", "
Individual ", " described " and " being somebody's turn to do " may also comprise plural form.It is to be further understood that use in the description of the present invention arranges
Diction " including " refers to there is described feature, integer, step, operation, element and/or assembly, but it is not excluded that existence or adds
Other features one or more, integer, step, operation, element, assembly and/or their group.It should be understood that when we claim unit
Part is " connected " or during " coupled " to another element, and it can be directly connected or coupled to other elements, or can also exist
Intermediary element.Additionally, " connection " used herein or " coupling " can include wireless connections or wireless couple.Used herein arrange
Diction "and/or" includes that one or more list the whole of item or any cell being associated combines with whole.
Those skilled in the art of the present technique are appreciated that unless otherwise defined, and all terms used herein (include technology art
Language and scientific terminology), have with the those of ordinary skill in art of the present invention be commonly understood by identical meaning.Also should
Be understood by, those terms defined in such as general dictionary, it should be understood that have with in the context of prior art
The meaning that meaning is consistent, and unless by specific definitions as here, otherwise will not use idealization or the most formal implication
Explain.
Those skilled in the art of the present technique are appreciated that " terminal " used herein above, " terminal unit " had both included wireless communication
The equipment of number receptor, it only possesses the equipment of wireless signal receiver of non-emissive ability, includes again receiving and launching hardware
Equipment, its have on bidirectional communication link, can carry out two-way communication reception and launch hardware equipment.This equipment
May include that honeycomb or other communication equipments, it has single line display or multi-line display or does not has multi-line to show
The honeycomb of device or other communication equipments;PCS (Personal Communications Service, PCS Personal Communications System), it can
Process with combine voice, data, fax and/or its communication ability;PDA (Personal Digital Assistant, individual
Digital assistants), it can include the access of radio frequency receiver, pager, the Internet/intranet, web browser, notepad, day
Go through and/or GPS (Global Positioning System, global positioning system) receptor;Conventional laptop and/or palm
Type computer or other equipment, its have and/or include the conventional laptop of radio frequency receiver and/or palmtop computer or its
His equipment." terminal " used herein above, " terminal unit " can be portable, can transport, be arranged on the vehicles (aviation,
Sea-freight and/or land) in, or be suitable for and/or be configured at local runtime, and/or with distribution form, operate in the earth
And/or any other position operation in space." terminal " used herein above, " terminal unit " can also is that communication terminal, on
Network termination, music/video playback terminal, such as, can be PDA, MID (Mobile Internet Device, mobile Internet
Equipment) and/or there is the mobile phone of music/video playing function, it is also possible to it is the equipment such as intelligent television, Set Top Box.
Fig. 1 is acquisition and the schematic flow sheet of method of transmission application data of one embodiment of the invention.
The application scenarios that the method for this enforcement acquisition described below and transmission application data is implemented, is mounted in
Running environment based on Android operation system on mobile terminal.
Those skilled in the art it is to be understood that the present invention puies forward power and proposes based on exempting from Root, but, propose power operation only
Being that the rights management that android system is implemented controls, the present invention is applicable to Root the most of course and carries the Android behaviour of power
Make in system.
The present invention proposes based on sandbox principle, so, it is real that those skilled in the art are combined known sandbox
Existing principle understands the enforcement of the present invention.The effect of sandbox is the running environment providing relative closure for destination application, makes
Obtaining destination application is to conduct interviews system resource in the case of by the security strategy in sandbox, thus intended application
The activity of program is limited within the scope of regulation.
It should be noted that the present invention is by a kind of sandbox instance constructs destination application, and control intended application
Program carries out corresponding operation activity, to obtain the related data of native applications program.Specifically, performed by sandbox technology
The operation activity of destination application so that run on the destination application in sandbox and can realize corresponding to native applications program
Service, then perform attainable service corresponding with native applications program by destination application and obtain native applications
The related data of program.It should be noted that the related data of the native applications program got includes having the operation of system height
The data that authority just can get.
Step S110: obtain the relevant of native applications program by the destination application being installed in host application
Data, host application and native applications program are installed on first terminal equipment.
Wherein, host application refers to realize the shell adding application program of destination application, can be applied by host
Program completes installation and the operation of destination application.Additionally, destination application needs have the whole of native applications program
Function, using the teaching of the invention it is possible to provide service identical with native applications program.By setting up intended application journey in host application
Communication between sequence and sandbox running environment so that the active procedure of destination application can be further by sandbox running environment
Monitor, thus to its applicable security strategy, and by set up in host application the resource requirement of destination application with
The resource requirement one_to_one corresponding of native applications program, can pass through Hook Function invocation target application program in host application
Required corresponding resource, it is ensured that destination application can be by host application normal load and keep safe operation.
It should be noted that owing to needing the related data of the native applications program obtained to include having system high operating rights
The data that limit just can get, the most do not carry out any process and go the related data directly obtaining native applications program to be infeasible
's.The scheme that the embodiment of the present invention provides be by there is the target of the function the most identical with native applications program and service should
Go to perform data read operation by program, obtain whole related datas of native applications program.
Alternatively, the method that the embodiment of the present invention provides also includes step S130: reflection is called to be had with host application
There is the installation kit as the subsidiary resource of host application of identical bag name, to load the intended application journey that this installation kit is realized
Sequence, wherein, the resource requirement of destination application and the resource requirement one_to_one corresponding of native applications program.
It should be noted that can be implemented in loaded targets application program in host application by aforesaid operations step
Function.But, application program only can be installed with unique form and run in the system environments of terminal unit, i.e. for one
Plant instant messaging class application program, a station terminal equipment only can be installed and run this instant messaging class application journey
Sequence, if therefore in the system being mounted with native applications program, then installation has the merit the most identical with native applications program
Can with service destination application time, it is infeasible for being mounted directly destination application without any process.The present invention
The method that embodiment provides is by carrying out shell adding operation to destination application, so that system can not perception destination application
Existence, so realize installing the purpose of native applications program and destination application in same system simultaneously.
Specifically, the resource requirement of destination application include but not limited to ActivityManagerService resource,
PackageManagerService resource, Activity assembly, Service assembly, Broadcast Receiver assembly,
Content Provider assembly etc..
The reflex mechanism that the present embodiment is used can be Java reflex mechanism, and Java reflex mechanism is in running status
In, for any one class, all properties and the method for this class can be known;For any one object, can adjust
By its any one method;The function of the method for this dynamic acquisition information and dynamic call object is JAVA language
Reflex mechanism.
By reflex mechanism, call the addAssetPath method in AssetManager, host application is installed
Resource in file is loaded in Resource, installs the money in file by Resource object reference host application
Source.Before obtaining host application installation file resource, first have to be loaded by the newly-built DexClassLoader of host program
Host application installation kit, the most newly-built AssetManager loads host application and installs the resource of file, finally leads to
Cross Resource object and read the resource of host application installation file.
Preferably, the step loading the destination application that this installation kit is realized includes step S131: should by host
The one-to-one relationship of the resource requirement of destination application and the resource requirement of native applications program is set up by program.
Such as, the operating system of terminal unit is android system, and destination application is App1 ', this intended application journey
The repertoire of sequence native applications to be realized program App1 and respective service;In the host application of terminal unit,
" App1 ' .apk " is the installation kit of the subsidiary resource of host application, by Java reflex mechanism call installation kit " App1 '
.apk ", load the destination application App1 ' that " App1 ' .apk " is realized subsequently, load in host application
" App1 ' .apk " during, create required whole resources of destination application App1 ' such as
ActivityManagerService resource, PackageManagerService resource, Activity assembly, Service group
Part, Broadcast Receiver assembly and Content Provider assembly.Wherein, destination application App1's ' is required
All resource one_to_one corresponding and be same as needed for native applications program runs App1 in terminal unit Android operation system
All resources.
It is highly preferred that set up the one_to_one corresponding of the resource requirement of destination application and the resource requirement of native applications program
The step of relation includes step S1311 and step S1312: step S1311: resolve installation kit to determine the institute of destination application
Need the resource name of resource;Step S1312: according to the resource name of the resource requirement of destination application, loads and native applications journey
The resource requirement of sequence resource one to one.
It should be noted that resolve the means of the former installation kit of application program, it is well known to those skilled in the art.Install
Bag APK file is substantially to utilize ZIP compress technique to combine the compressed package that signature technology realizes, and therefore, on the one hand can pass through
Decompression technique discharges its internal file, and on the other hand the tool software also by Apktool etc obtains its internal file.
Specifically, Android application program, during running, is to be referred to as AssetsManager resource by one
Manager reads and is packaged in resource file inside APK file.Each Activity assembly of application program associates
One ContextImpl object, this ContextImpl object is just used to describe the operation context ring of Activity assembly
Border.The member function init calling this ContextImpl object performs to initialize Activity assembly operating context
The work of environment, the most just includes creating for the Resources object of access application resource and AssetsManager pair
The work of elephant.Wherein, ContextImpl.init function is just defined on file f rameworks/base/core/java/
In android/app/ContextImpl.java.Parameter packageInfo in ContextImpl.init function is pointed to
Being a loadedApk object, this loadedApk object factory is currently to start the Apk belonging to assembly.With visiting
Ask the Resources of application resource to as if by being a loadedApk pointed by call parameters packageInfo
The member function getResources of object creates.It follows that can be by creating Resources object extraction or visit
Ask application resource.
By aforesaid operations mode can in host application loaded targets application program, in case subsequently through having
The destination application of the function the most identical with native applications program and service obtains whole dependency numbers of native applications program
According to.How hereafter will specifically describe by whole related datas of destination application acquisition native applications program.
Preferably, the destination application by being installed in host application obtains the dependency number of native applications program
According to step include step S111, step S112 and step S113: step S111: the active process of invocation target application program
Data read command;Step S112: hooking up destination application execution data read command by Hook Function needs to read number
According to native applications program corresponding to resource need to read the resource of data;Step S113: perform the resource hooked up, to obtain
The related data of native applications program.
First, the data read command of the active process of invocation target application program.
Specifically, data read command is called in the active process transmission actively passing through destination application.
Subsequently, hook up destination application execution data read command by Hook Function and need to read the resource pair of data
The native applications program answered needs to read the resource of data.
It should be noted that term " hook " covers for the function tune by intercepting transmission between component software
The technology of the behavior of operating system, application program or other component softwares is changed or increases by, message or event.And process
The code of this intercepted function call, event or message is thus referred to as hook hook function.Hook is generally used for various mesh
Mark, including debugging function and being extended function.Its example can be included in keyboard or mouse event is delivered to answer
Them were intercepted before program, or hooking system service call, system function behavior, function execution result etc., to monitor or amendment
Function of application program or other assemblies etc..The present embodiment can use hook hook function to take over described application program and run
The installation self checking operation of Shi Suoxu.
As a sandbox example, destination application is made to run in sandbox running environment, monitoring objective application program
Active process be that the core of sandbox running environment realizes target, be responsible for realizing following function: by monitoring objective application journey
The access of ordered pair resource, makes destination application process be capable of the normal call to corresponding resource.Such as, above-mentioned put into
Destination application App1 ' installation kit resource is called by row, can specifically be called the call instruction of resource by monitoring, utilize
Hook technology realizes.Can register special by the way of the active process of destination application being monitored by Hook Function
Service processes, with Hook Function associated objects application A pp1 ' call instruction of active process realizes intended application journey
Sequence App1 ' activity monitoring.
When the data read command of the active process that Hook Function monitors invocation target application program, hooking up target should
The native applications program that performing data read command by program needs the resource reading data corresponding needs to read the resource of data.
Such as, utilize Hook Function that the entrance of data read command is monitored, intercept and capture this call instruction, and obtain
Take the title of the resource that destination application App1 ' accesses, as Hook Function gets the money that destination application App1 ' accesses
Source is Service assembly, is subsequently diverted to the Hook Function performing to hook up resource operation accordingly, this Hook Function hooks up with primary
The Service assembly that application program is corresponding.
Finally, the resource hooked up is performed, to obtain the related data of native applications program.
It should be noted that by the related resource of performance objective application program, it is possible to realize and perform native applications journey
The related resource identical execution result of sequence, therefore, the resource hooked up by execution so that destination application is permissible
Substitute native applications program and read the related data of native applications program.
Step S120: the related data of native applications program and the installation environment information of first terminal equipment are passed through predetermined
Transmission mode send to the second terminal unit.
Specifically, the related data of native applications program can be obtained by hereinbefore describing mode, subsequently, obtain the
The installation environment information of one terminal unit;Then, by related data and the mounting ring of first terminal equipment of native applications program
Environment information is sent to the second terminal unit by predetermined transmission mode.
Preferably, the related data of native applications program includes but is not limited to user's historical behavior data, application configuration letter
At least one in breath, encryption data, the installation environment information of first terminal equipment includes but not limited to CPU model, kernel version
This number, system version number, at least one in system configuration information.As shown in table 1, be first terminal equipment installation environment letter
Breath.
Table 1
It should be noted that there is various ways by the related data of native applications program and the installation of first terminal equipment
Environmental information sends to the second terminal unit, as sent data by modes such as Wi-Fi Hotspot, bluetooth, cloud servers, this
Bright embodiment provides a kind of optimal way to carry out the transmission of data, description specific as follows:
Preferably, the related data of native applications program and the installation environment information of first terminal equipment are passed through predetermined
The step that transmission mode sends to the second terminal unit specifically includes: related data and the first terminal of native applications program are set
Standby installation environment information is sent to the second terminal unit by the unidirectional data link pre-build.
Specifically, by setting up unidirectional data link between first terminal equipment and the second terminal unit, can avoid leading to
Crossing uploads onto the server data causes the problem of data leak that causes in data transmission procedure.Set up data link it
After, the data encapsulated directly are sent to the second terminal unit from first terminal equipment through data link.
It should be noted that data encapsulation can be carried out according to the feature of different types of data, different types of to generate
Packet.Wherein, each packet carries the feature of corresponding types data, thus the second terminal unit receive packet it
After, it is possible to the feature of the corresponding types data carried according to each packet knows the type of data.
Correspondingly, the related data of native applications program and the installation environment of first terminal equipment are believed by first terminal equipment
Breath sends to after the second terminal unit, can related data based on the native applications program received and the at the second terminal unit
The installation environment information of one terminal unit continues raw application program in locally-installed and operation.
Fig. 2 is the schematic flow sheet of the method running application program of one embodiment of the invention.
The application scenarios that the method running application program that will describe below the present invention is implemented, is mounted in mobile whole
Running environment based on Android operation system on end.
Operational approach in the second terminal unit is also based on sandbox principle and proposes, so, people in the art
Member is combined known sandbox and is realized principle to understand the enforcement of the present invention.The effect of sandbox is to provide for destination application
The running environment of relative closure so that destination application is to system resource in the case of by the security strategy in sandbox
Conduct interviews, thus the activity of destination application is limited within the scope of regulation.
Step S210: receive the related data of native applications program that first terminal equipment sends and first terminal equipment
Installation environment information.
Specifically, the related data of native applications program and the installation environment of first terminal equipment are believed by first terminal equipment
Ceasing and sent to the second terminal unit by predetermined transmission mode, the second terminal unit receives the primary of first terminal equipment transmission
The related data of application program and the installation environment information of first terminal equipment.
Step S220: the installation environment letter of related data based on the native applications program received and first terminal equipment
Breath is installed and/or runs the raw application program that continues in the second terminal unit.
Wherein, the raw application program that continues has the repertoire of native applications program, using the teaching of the invention it is possible to provide complete with native applications program
Exactly the same service.In concrete application scenarios, user is mounted with native applications program in first terminal equipment, when user more
During the second terminal unit renewed, during changing terminal unit, need application program primary in first terminal equipment
Related data move in the application program that the second terminal unit is corresponding, the application program of this correspondence continues raw application journey exactly
Sequence, makes the raw application program that continues in the second terminal unit at the repertoire with native applications program then, using the teaching of the invention it is possible to provide
In the case of service identical with native applications program, also retain native applications related data such as user's chat record,
Individual subscriber preference configuration information etc..
Preferably, the related data of native applications program includes but is not limited to user's historical behavior data, application configuration letter
At least one in breath, encryption data, the installation environment information of first terminal equipment includes but not limited to CPU model, kernel version
This number, system version number, at least one in system configuration information.
It is preferably based on the related data of the native applications program received and the installation environment information of first terminal equipment
The step installing and/or running the raw application program that continues in the second terminal unit includes: step S221 and step S222: step
S221: monitored installation and/or the operation activity of the raw application program that continues by Hook Function;Step S222: when passing through Hook Function
When monitoring the related data that the raw application program that continues reads the installation environment information of the second terminal unit and/or the raw application that continues, adjust
With related data first end one to one of the installation environment information with the second terminal unit received and/or the raw application that continues
The installation environment information of end equipment and/or the related data of native applications program.
The main purpose of aforesaid operations step is to build installation, a running environment, at this to the raw application program that continues
The raw application program that continues under environment is detectable and is in the second terminal unit, but still believes that also in first terminal equipment.
It addition, by aforesaid operations step it is also possible that the raw application program that continues can obtain the related data of native applications program, as
User's chat record, user operation records, individual subscriber preference configuration information, login check information etc., thus by native applications
Program is from first terminal equipment intactly " replicated " to the second terminal unit, and user is without carrying out loaded down with trivial details importing chat
Record operates or again arranges individual's preference configuration information etc. for application program, it is possible to obtain and native applications program one mould
The same raw application program that continues, user without by log in verification operation just can direct login application program.
Specifically, when the installation environment information being monitored the raw application program that continues by Hook Function and reading the second terminal unit
And/or during the related data of the raw application that continues, call that receive with the second terminal unit installation environment information and/or continue raw should
The installation environment information of related data first terminal equipment one to one and/or the related data of native applications program.
It is multiple with the installation of raw application program and/or the relevant monitoring point of operation activity of continuing that Hook Function monitoring is set, when monitoring the life that continues
When application program reads the installation environment information of the second terminal unit, the installation of the second terminal unit will be obtained by Hook Function
The instruction of environmental information hooks up, and replaces the installation environment information with the second terminal unit and/or the related data of the raw application that continues
The installation environment information of first terminal equipment and/or the related data of native applications program one to one so that continue raw should
Think also in first terminal equipment by program.Or, read, when monitoring the raw application program that continues, the raw dependency number applied that continues
According to time, by Hook Function, the instruction obtaining the installation environment information of the second terminal unit is hooked up, and replace with the second terminal
The installation environment information of equipment and/or the installation environment information of the related data first terminal equipment one to one of the raw application that continues
And/or the related data of native applications program, so that the raw application program that continues directly reads and receives from first terminal equipment
Data.
If it should be noted that in the second terminal unit, the primary of first terminal equipment transmission received is answered
It is stored in the related data of program under the predetermined directories that the raw application program that continues reads its corresponding related data, then the present invention
Embodiment also provides for a preferred version so that the raw application program that continues can directly read the number received from first terminal equipment
According to.
It is preferably based on the related data of the native applications program received and the installation environment information of first terminal equipment
Run the step of the raw application program that continues in the second terminal unit and include step S223 and step S224: step S223: work as monitoring
To the raw application program that continues read its corresponding related data time, whether there is the phase of native applications program under detection predetermined directories
Close data;Step S224: the most then read the related data of native applications program.
Specifically, receive the related data of the native applications program that first terminal equipment sends, and by native applications program
Related data be stored under the corresponding predetermined directories in the second terminal unit;Then, when monitoring the raw application program reading that continues
When taking its corresponding related data, under detection predetermined directories, whether there is the related data of native applications program;Finally, if in advance
Determine to exist under catalogue the related data of native applications program, then read the related data of native applications program.
How technical scheme moves the related data of the application program in first terminal equipment if solving
In second terminal unit.The dependency number of native applications program is obtained by the destination application being installed in host application
According to, host application and native applications program are installed on first terminal equipment, in this step by having and native applications
Function and the destination application of service that program is the most identical go to perform data read operation, to obtain native applications program
All related data, includes, in above-mentioned data, the data that high operating right just can get.
Further, technical scheme also solves the data how received based on first terminal equipment to
The problem that the installation and operation process of the application program of two terminal units is controlled.Based on the native applications program received
The raw application journey that continues in the second terminal unit is installed and/or run to the installation environment information of related data and first terminal equipment
Sequence, installation environment information based on the first terminal equipment received is built one for the raw application program that continues and is similar to first terminal
The installation environment of equipment, to ensure being smoothed out of the continue follow-up installation of raw application program and operation, it addition, by receiving
The related data of native applications program install and/or run the raw application program that continues in the second terminal unit, user is without hands
The dynamic historical data importing first terminal equipment or login authentication account, it is to avoid the complicated and operating process of redundancy, carry
Rise user experience.
Fig. 3 is acquisition and the structural representation of device of transmission application data of one embodiment of the invention.
The scene that the device of this enforcement acquisition described below and transmission application data is applied, is mounted in movement
Running environment based on Android operation system in terminal.
Those skilled in the art it is to be understood that the present invention puies forward power and proposes based on exempting from Root, but, propose power operation only
Being that the rights management that android system is implemented controls, the present invention is applicable to Root the most of course and carries the Android behaviour of power
Make in system.
The present invention proposes based on sandbox principle, so, it is real that those skilled in the art are combined known sandbox
Existing principle understands the enforcement of the present invention.The effect of sandbox is the running environment providing relative closure for destination application, makes
Obtaining destination application is to conduct interviews system resource in the case of by the security strategy in sandbox, thus intended application
The activity of program is limited within the scope of regulation.
It should be noted that the present invention is by a kind of sandbox instance constructs destination application, and control intended application
Program carries out corresponding operation activity, to obtain the related data of native applications program.Specifically, performed by sandbox technology
The operation activity of destination application so that run on the destination application in sandbox and can realize corresponding to native applications program
Service, then perform attainable service corresponding with native applications program by destination application and obtain native applications
The related data of program.It should be noted that the related data of the native applications program got includes having the operation of system height
The data that authority just can get.
Acquisition module 310 obtains the phase of native applications program by the destination application being installed in host application
Closing data, host application and native applications program are installed on first terminal equipment.
Wherein, host application refers to realize the shell adding application program of destination application, can be applied by host
Program completes installation and the operation of destination application.Additionally, destination application needs have the whole of native applications program
Function, using the teaching of the invention it is possible to provide service identical with native applications program.By host application is set up former installation kit
Communication between destination application and sandbox running environment so that the active procedure of destination application can be the most husky
Case running environment monitors, thus to its applicable security strategy, and by setting up destination application in host application
Resource requirement and the resource requirement one_to_one corresponding of native applications program, can call mesh by Hook Function in host application
The required corresponding resource of mark application program, it is ensured that destination application can be by host application normal load and keep safety
Run.
It should be noted that owing to needing the related data of the native applications program obtained to include having system high operating rights
The data that limit just can get, the most do not carry out any process and go the related data directly obtaining native applications program to be infeasible
's.The scheme that the embodiment of the present invention provides be by there is the target of the function the most identical with native applications program and service should
Go to perform data read operation by program, obtain whole related datas of native applications program.
Alternatively, the device that the embodiment of the present invention provides also includes: load-on module reflection is called to be had with host application
There is the installation kit as the subsidiary resource of host application of identical bag name, to load the intended application journey that this installation kit is realized
Sequence, wherein, the resource requirement of destination application and the resource requirement one_to_one corresponding of native applications program.
It should be noted that can be implemented in the merit of loaded targets application program in host application by above-mentioned module
Energy.But, application program only can be installed with unique form and run in the system environments of terminal unit, for one is i.e.
Time communication class application program, a station terminal equipment only can be installed and run this instant messaging class application program, because of
If this is in the system being mounted with native applications program, then installation has the function the most identical with native applications program and clothes
During the destination application being engaged in, it is infeasible for being mounted directly destination application without any process.The embodiment of the present invention
The device provided is by carrying out shell adding operation to destination application, so that system can not the depositing of perception destination application
, so realize the purpose installing native applications program with destination application in same system simultaneously.
Specifically, the resource requirement of destination application include but not limited to ActivityManagerService resource,
PackageManagerService resource, Activity assembly, Service assembly, Broadcast Receiver assembly,
Content Provider assembly etc..
The reflex mechanism that the present embodiment is used can be Java reflex mechanism, and Java reflex mechanism is in running status
In, for any one class, all properties and the method for this class can be known;For any one object, can adjust
By its any one method;The function of the method for this dynamic acquisition information and dynamic call object is JAVA language
Reflex mechanism.
By reflex mechanism, call the addAssetPath method in AssetManager, host application is installed
Resource in file is loaded in Resource, installs the money in file by Resource object reference host application
Source.Before obtaining host application installation file resource, first have to be loaded by the newly-built DexClassLoader of host program
Host application installation kit, the most newly-built AssetManager loads host application and installs the resource of file, finally leads to
Cross Resource object and read the resource of host application installation file.
Preferably, load-on module includes: relation is set up unit and set up destination application by host application
The one-to-one relationship of the resource requirement of resource requirement and native applications program.
Such as, the operating system of terminal unit is android system, and destination application is App1 ', this intended application journey
The repertoire of sequence native applications to be realized program App1 and respective service;In the host application of terminal unit,
" App1 ' .apk " is the installation kit of the subsidiary resource of host application, by Java reflex mechanism call installation kit " App1 '
.apk ", load the destination application App1 ' that " App1 ' .apk " is realized subsequently, load in host application
" App1 ' .apk " during, create required whole resources of destination application App1 ' such as
ActivityManagerService resource, PackageManagerService resource, Activity assembly, Service group
Part, Broadcast Receiver assembly and Content Provider assembly.Wherein, destination application App1's ' is required
All resource one_to_one corresponding and be same as needed for native applications program runs App1 in terminal unit Android operation system
All resources.
It is highly preferred that relation sets up unit includes that resource name determines that subelement and resource add subelements: resource name determines
Subelement resolves installation kit to determine the resource name of the resource requirement of destination application;Resource adds subelements should according to target
With the resource name of the resource requirement of program, load the resource requirement resource one to one with native applications program.
It should be noted that resolve the means of the former installation kit of application program, it is well known to those skilled in the art.Install
Bag APK file is substantially to utilize ZIP compress technique to combine the compressed package that signature technology realizes, and therefore, on the one hand can pass through
Decompression technique discharges its internal file, and on the other hand the tool software also by Apktool etc obtains its internal file.
Specifically, Android application program, during running, is to be referred to as AssetsManager resource by one
Manager reads and is packaged in resource file inside APK file.Each Activity assembly of application program associates
One ContextImpl object, this ContextImpl object is just used to describe the operation context ring of Activity assembly
Border.The member function init calling this ContextImpl object performs to initialize Activity assembly operating context
The work of environment, the most just includes creating for the Resources object of access application resource and AssetsManager pair
The work of elephant.Wherein, ContextImpl.init function is just defined on file f rameworks/base/core/java/
In android/app/ContextImpl.java.Parameter packageInfo in ContextImpl.init function is pointed to
Being a loadedApk object, this loadedApk object factory is currently to start the Apk belonging to assembly.With visiting
Ask the Resources of application resource to as if by being a loadedApk pointed by call parameters packageInfo
The member function getResources of object creates.It follows that can be by creating Resources object extraction or visit
Ask application resource.
Loaded targets application program in host application is i.e. may be implemented in by said apparatus module, in case subsequently through
There are whole phases of the function the most identical with native applications program and the destination application acquisition native applications program of service
Close data.Hereafter will specifically describe the device how proposed by the embodiment of the present invention to realize being obtained by destination application
Whole related datas of native applications program.
Preferably, acquisition module 310 includes that instruction calls unit, resource hook up unit and resource performance element: instruction is adjusted
Data read command with the active process of cell call destination application;Resource hooks up unit and hooks up mesh by Hook Function
The native applications program that mark application program performs data read command and needs the resource reading data corresponding needs to read data
Resource;Resource performance element performs the resource hooked up, to obtain the related data of native applications program.
First, the data read command of the active process of instruction calls cell call destination application.
Specifically, data read command is called in the active process transmission actively passing through destination application.
Subsequently, resource hook up unit by Hook Function hook up destination application perform data read command need read
The native applications program that the resource of data is corresponding needs to read the resource of data.
It should be noted that term " hook " covers for the function tune by intercepting transmission between component software
The technology of the behavior of operating system, application program or other component softwares is changed or increases by, message or event.And process
The code of this intercepted function call, event or message is thus referred to as hook hook function.Hook is generally used for various mesh
Mark, including debugging function and being extended function.Its example can be included in keyboard or mouse event is delivered to answer
Them were intercepted before program, or hooking system service call, system function behavior, function execution result etc., to monitor or amendment
Function of application program or other assemblies etc..The present embodiment can use hook hook function to take over described application program and run
The installation self checking operation of Shi Suoxu.
As a sandbox example, destination application is made to run in sandbox running environment, monitoring objective application program
Active process be that the core of sandbox running environment realizes target, be responsible for realizing following function: by monitoring objective application journey
The access of ordered pair resource, makes destination application process be capable of the normal call to corresponding resource.Such as, above-mentioned put into
Destination application App1 ' installation kit resource is called by row, can specifically be called the call instruction of resource by monitoring, utilize
Hook technology realizes.Can register special by the way of the active process of destination application being monitored by Hook Function
Service processes, with Hook Function associated objects application A pp1 ' call instruction of active process realizes intended application journey
Sequence App1 ' activity monitoring.
When the data read command of the active process that Hook Function monitors invocation target application program, hooking up target should
The native applications program that performing data read command by program needs the resource reading data corresponding needs to read the resource of data.
Such as, utilize Hook Function that the entrance of data read command is monitored, intercept and capture this call instruction, and obtain
Take the title of the resource that destination application App1 ' accesses, as Hook Function gets the money that destination application App1 ' accesses
Source is Service assembly, is subsequently diverted to the Hook Function performing to hook up resource operation accordingly, this Hook Function hooks up with primary
The Service assembly that application program is corresponding.
Finally, resource performance element performs the resource hooked up, to obtain the related data of native applications program.
It should be noted that by the related resource of performance objective application program, it is possible to realize and perform native applications journey
The related resource identical execution result of sequence, therefore, the resource hooked up by execution so that destination application is permissible
Substitute native applications program and read the related data of native applications program.
The related data of native applications program and the installation environment information of first terminal equipment are passed through pre-by sending module 320
Fixed transmission mode sends to the second terminal unit.
Specifically, the related data of native applications program can be obtained by the device of hereinbefore description, subsequently, obtain
The installation environment information of first terminal equipment;Then, by related data and the installation of first terminal equipment of native applications program
Environmental information is sent to the second terminal unit by predetermined transmission mode.
Preferably, the related data of native applications program includes but is not limited to user's historical behavior data, application configuration letter
At least one in breath, encryption data, the installation environment information of first terminal equipment includes but not limited to CPU model, kernel version
This number, system version number, at least one in system configuration information.
Can be by the related data of native applications program and first terminal equipment it should be noted that there is multiple device
Installation environment information sends to the second terminal unit, as sent data by modes such as Wi-Fi Hotspot, bluetooth, cloud servers,
The embodiment of the present invention provides a kind of preferred embodiment to carry out the transmission of data, description specific as follows:
Preferably, sending module 320 is specifically for by the related data of native applications program and the peace of first terminal equipment
Dress environmental information is sent to the second terminal unit by the unidirectional data link pre-build.
Specifically, by setting up unidirectional data link between first terminal equipment and the second terminal unit, can avoid leading to
Crossing uploads onto the server data causes the problem of data leak that causes in data transmission procedure.Set up data link it
After, the data encapsulated directly are sent to the second terminal unit from first terminal equipment through data link.
It should be noted that data encapsulation can be carried out according to the feature of different types of data, different types of to generate
Packet.Wherein, each packet carries the feature of corresponding types data, thus the second terminal unit receive packet it
After, it is possible to the feature of the corresponding types data carried according to each packet knows the type of data.
Correspondingly, the related data of native applications program and the installation environment of first terminal equipment are believed by first terminal equipment
Breath sends to after the second terminal unit, can related data based on the native applications program received and the at the second terminal unit
The installation environment information of one terminal unit continues raw application program in locally-installed and operation.
Fig. 4 is the structural representation of the device running application program of one embodiment of the invention.
The scene that the device running application program that will describe below the present invention is applied, is mounted on mobile terminal
Running environment based on Android operation system.
Apparatus module in the second terminal unit is also based on sandbox principle and proposes, so, people in the art
Member is combined known sandbox and is realized principle to understand the enforcement of the present invention.The effect of sandbox is to provide for destination application
The running environment of relative closure so that destination application is to system resource in the case of by the security strategy in sandbox
Conduct interviews, thus the activity of destination application is limited within the scope of regulation.
Receiver module 410 receives related data and the first terminal equipment of the native applications program that first terminal equipment sends
Installation environment information.
Specifically, the related data of native applications program and the installation environment of first terminal equipment are believed by first terminal equipment
Ceasing and sent to the second terminal unit by predetermined transmission mode, the second terminal unit receives the primary of first terminal equipment transmission
The related data of application program and the installation environment information of first terminal equipment.
Install and run module 420 related data based on the native applications program received and the peace of first terminal equipment
Dress environmental information is installed and/or runs the raw application program that continues in the second terminal unit.
Wherein, the raw application program that continues has the repertoire of native applications program, using the teaching of the invention it is possible to provide complete with native applications program
Exactly the same service.In concrete application scenarios, user is mounted with native applications program in first terminal equipment, when user more
During the second terminal unit renewed, during changing terminal unit, need application program primary in first terminal equipment
Related data move in the application program that the second terminal unit is corresponding, the application program of this correspondence continues raw application journey exactly
Sequence, makes the raw application program that continues in the second terminal unit at the repertoire with native applications program then, using the teaching of the invention it is possible to provide
In the case of service identical with native applications program, also retain native applications related data such as user's chat record,
Individual subscriber preference configuration information etc..
Preferably, the related data of native applications program includes but is not limited to user's historical behavior data, application configuration letter
At least one in breath, encryption data, the installation environment information of first terminal equipment includes but not limited to CPU model, kernel version
This number, system version number, at least one in system configuration information.
Preferably, install and run module 420 and include activity-monitoring units and data call unit: activity-monitoring units leads to
Cross Hook Function and monitor installation and/or the operation activity of the raw application program that continues;Data call unit is when being monitored by Hook Function
When reading the related data of the installation environment information of the second terminal unit and/or the raw application that continues to the raw application program that continues, call and connect
That receive and the second terminal unit installation environment information and/or the raw application that continues related data first terminal one to one sets
Standby installation environment information and/or the related data of native applications program.
The major function that said apparatus module realizes is to build installation, a running environment to the raw application program that continues,
The raw application program that continues in the present context is detectable and is in the second terminal unit, but still believes that also at first terminal equipment
In.It addition, by aforesaid operations step it is also possible that the raw application program that continues can obtain the related data of native applications program,
Such as user's chat record, user operation records, individual subscriber preference configuration information, log in check information etc., thus answer primary
By program from first terminal equipment intactly " replicated " to the second terminal unit, user chats without carrying out loaded down with trivial details importing
It record operates or again arranges individual's preference configuration information etc. for application program, it is possible to obtain and native applications program one
What mould was the same continue raw application program, user without by log in verification operation just can direct login application program.
Specifically, when the installation environment information being monitored the raw application program that continues by Hook Function and reading the second terminal unit
And/or during the related data of the raw application that continues, call that receive with the second terminal unit installation environment information and/or continue raw should
The installation environment information of related data first terminal equipment one to one and/or the related data of native applications program.
It is multiple with the installation of raw application program and/or the relevant monitoring point of operation activity of continuing that Hook Function monitoring is set, when monitoring the life that continues
When application program reads the installation environment information of the second terminal unit, the installation of the second terminal unit will be obtained by Hook Function
The instruction of environmental information hooks up, and replaces the installation environment information with the second terminal unit and/or the related data of the raw application that continues
The installation environment information of first terminal equipment and/or the related data of native applications program one to one so that continue raw should
Think also in first terminal equipment by program.Or, read, when monitoring the raw application program that continues, the raw dependency number applied that continues
According to time, by Hook Function, the instruction obtaining the installation environment information of the second terminal unit is hooked up, and replace with the second terminal
The installation environment information of equipment and/or the installation environment information of the related data first terminal equipment one to one of the raw application that continues
And/or the related data of native applications program, so that the raw application program that continues directly reads and receives from first terminal equipment
Data.
If it should be noted that in the second terminal unit, the primary of first terminal equipment transmission received is answered
It is stored in the related data of program under the predetermined directories that the raw application program that continues reads its corresponding related data, then the present invention
Embodiment also provides for a preferred version so that the raw application program that continues can directly read the number received from first terminal equipment
According to.
Preferably, install and run module 420 and include data detecting unit and data-reading unit: data detecting unit is worked as
Monitor continue raw application program read its corresponding related data time, detection predetermined directories under whether there is native applications program
Related data;Data-reading unit, when the related data that there is native applications program under predetermined directories being detected, reads former
The related data of raw application program.
Specifically, receive the related data of the native applications program that first terminal equipment sends, and by native applications program
Related data be stored under the corresponding predetermined directories in the second terminal unit;Then, when monitoring the raw application program reading that continues
When taking its corresponding related data, under detection predetermined directories, whether there is the related data of native applications program;Finally, if in advance
Determine to exist under catalogue the related data of native applications program, then read the related data of native applications program.
How technical scheme moves the related data of the application program in first terminal equipment if solving
In second terminal unit.The dependency number of native applications program is obtained by the destination application being installed in host application
According to, host application and native applications program are installed on first terminal equipment, in this step by having and native applications
Function and the destination application of service that program is the most identical go to perform data read operation, to obtain native applications program
All related data, includes, in above-mentioned data, the data that high operating right just can get.
Further, technical scheme also solves the data how received based on first terminal equipment to
The problem that the installation and operation process of the application program of two terminal units is controlled.Based on the native applications program received
The raw application journey that continues in the second terminal unit is installed and/or run to the installation environment information of related data and first terminal equipment
Sequence, installation environment information based on the first terminal equipment received is built one for the raw application program that continues and is similar to first terminal
The installation environment of equipment, to ensure being smoothed out of the continue follow-up installation of raw application program and operation, it addition, by receiving
The related data of native applications program install and/or run the raw application program that continues in the second terminal unit, user is without hands
The dynamic historical data importing first terminal equipment or login authentication account, it is to avoid the complicated and operating process of redundancy, carry
Rise user experience.
Those skilled in the art of the present technique are appreciated that the present invention includes relating to perform in operation described herein
One or more equipment.These equipment can be required purpose and specialized designs and manufacture, or can also include general
Known device in computer.These equipment have storage computer program within it, and these computer programs are optionally
Activate or reconstruct.Such computer program can be stored in equipment (such as, computer) computer-readable recording medium or be stored in
In being suitable to store e-command and be coupled to any kind of medium of bus respectively, described computer-readable medium include but not
Be limited to any kind of dish (including floppy disk, hard disk, CD, CD-ROM and magneto-optic disk), ROM (Read-Only Memory, only
Read memorizer), RAM (Random Access Memory, memorizer immediately), EPROM (Erasable Programmable
Read-Only Memory, Erarable Programmable Read only Memory), EEPROM (Electrically Erasable
Programmable Read-Only Memory, EEPROM), flash memory, magnetic card or light line card
Sheet.It is, computer-readable recording medium includes by equipment (such as, computer) with the form storage that can read or any Jie of transmission information
Matter.
Those skilled in the art of the present technique be appreciated that can with computer program instructions realize these structure charts and/or
The combination of the frame in each frame in block diagram and/or flow graph and these structure charts and/or block diagram and/or flow graph.This technology is led
Field technique personnel be appreciated that these computer program instructions can be supplied to general purpose computer, special purpose computer or other
The processor of programmable data processing method realizes, thus by computer or the process of other programmable data processing methods
Device performs the scheme specified in structure chart disclosed by the invention and/or block diagram and/or the frame of flow graph or multiple frame.
Those skilled in the art of the present technique be appreciated that the various operations discussed in the present invention, method, in flow process
Step, measure, scheme can be replaced, changed, combined or deleted.Further, there is discussed in the present invention each
Other steps in kind operation, method, flow process, measure, scheme can also be replaced, changed, reset, decomposed, combined or deleted.
Further, of the prior art have and the step in the various operations disclosed in the present invention, method, flow process, measure, scheme
Can also be replaced, changed, reset, decomposed, combined or deleted.
The above is only the some embodiments of the present invention, it is noted that for the ordinary skill people of the art
For Yuan, under the premise without departing from the principles of the invention, it is also possible to make some improvements and modifications, these improvements and modifications also should
It is considered as protection scope of the present invention.