CN106657358A - Service proxy method and device for Android applications - Google Patents
Service proxy method and device for Android applications Download PDFInfo
- Publication number
- CN106657358A CN106657358A CN201611249850.0A CN201611249850A CN106657358A CN 106657358 A CN106657358 A CN 106657358A CN 201611249850 A CN201611249850 A CN 201611249850A CN 106657358 A CN106657358 A CN 106657358A
- Authority
- CN
- China
- Prior art keywords
- specified
- android
- application
- anything
- attending
- 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.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
-
- 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/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45504—Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72403—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a service proxy method and device for Android applications. The method comprises of establishing a virtual machine environment and placing cloned applications of one or more appointed Android applications in an Android system into a virtual machine for operation; maintaining proxy service corresponding to appointed service in the Android system; monitoring an event that the cloned applications of the appointed Android applications in the virtual machine access the appointed service in the Android system; and intercepting the event when the event is monitored and converting the event into the event that the cloned applications of the appointed Android applications access the monitored proxy service corresponding to the appointed service. According to the scheme, the proxy service corresponding to appointed service in the Android system is maintained; the event that the cloned applications of the appointed Android applications in the virtual machine access the appointed service in the Android system is converted to be processed by the proxy service, the parallel operation of the appointed Android applications in the Android system and the corresponding cloned applications is realized, and the cloned applications can access the appointed service normally.
Description
Technical field
The present invention relates to Internet technical field, and in particular to a kind of service broker method and device of Android application.
Background technology
In prior art, the parallel running to multiple identical Android applications cannot be realized in Android system, its reason is:
Each Android is applied when in Android system, and the configuration information in the configuration file in the installation kit of the Android application will
In being registered to Android system, Android system knows the presence of Android application and the related letter of operation by these log-on messages
Breath, on the basis of an Android application has been installed to Android system, if still wanting to attending to anything else the Android application using again
In being installed to Android system, Android system can not receive the registration of this application of attending to anything else because receiving identical log-on message,
Therefore application of attending to anything else is unknown for Android system, and then system of attending to anything else cannot be interacted normally with Android system,
The system that causes to attend to anything else cannot normally be run.
However, be exist in user group to the demand of the parallel running of multiple identical Android applications, it is common,
User wishes to log in two QQ applications by different accounts on the intelligent terminal of oneself, allows the two QQ applications to transport parallel
OK, user can carry out meeting of chatting using different QQ applications from the good friend of different social circles respectively according to the demand of oneself
Words, meet many application scenarios.
The content of the invention
In view of the above problems, it is proposed that the present invention so as to provide one kind overcome the problems referred to above or at least in part solve on
State the service broker method and device of the Android application of problem.
According to one aspect of the present invention, there is provided a kind of service broker method of Android application, wherein, including:
Virtual machine constructor environment, attending to anything else for one or more the specified Android applications in Android system is virtual using being put into
Run in machine;
Safeguard the agency service corresponding with the specified services in Android system;
Monitor the event attended to anything else using the specified services in access Android system of the specified Android application in virtual machine;When
Intercepted when listening to the event, the event is converted to and is safeguarded using access attending to anything else for the specified Android application
The corresponding agency service of the specified services event, the event is responded by the agency service.
Alternatively, before the agency service that the maintenance is corresponding with the specified services in Android system, the method is entered
One step includes:The registration procedure information in Android system;
It is described to safeguard that the agency service corresponding with the specified services in Android system includes:It is every in Android system
The relevant information of individual specified services, generates agency service corresponding with the specified services;According to the progress information registered, by institute
State agency service to distribute into corresponding process so that the proxy server is loaded and run in the process.
Alternatively, described monitoring applies the specified clothes accessed in Android system attending to anything else for the specified Android application in virtual machine
The event of business includes:
By on the access interface of specified services of the Hook Function carry in Android system, intercepted using the Hook Function
Send to the call request of the access interface;
Whether the sender for judging the call request is the application of attending to anything else of the specified Android application in virtual machine;
Being that determination is listened to applies the specified clothes accessed in Android system attending to anything else for the specified Android application in virtual machine
The event of business;Otherwise let pass the call request.
Alternatively, the attending to anything else when applying of each specified Android application is installed in virtual machine, the method is further included:Obtain
The configuration information of the application of attending to anything else of each specified Android application is simultaneously recorded in distribution management table;
Whether the sender for judging the call request is that the specified Android application in virtual machine is attended to anything else using bag
Include:Intent parameters are extracted from the call request, judges that the data that caller information is indicated in the Intent parameters are
It is no to hit the distribution management table;It is then to determine that the sender of the call request is the specified Android application in virtual machine
Attend to anything else application, be not otherwise.
Alternatively, the configuration information and record of the application of attending to anything else for obtaining each specified Android application is in distribution management table
Including:
Obtain the installation kit copy of each specified Android application and preserve to assigned catalogue, dividing as each specified Android application
The installation kit of body application;
Configuration file in the installation kit of the application of attending to anything else for parsing each specified Android application, obtains each specified Android application
Attend to anything else and apply the configuration information in respective profiles and preserve into the distribution management table.
Alternatively, it is described by the event be converted to the specified Android application attend to anything else using access safeguarded described in
The event of the corresponding agency service of specified services includes:
When it is determined that listening to attending to anything else for the specified Android application in virtual machine applies the specified services accessed in Android system
Event when,
According to the information of the access interface of Hook Function institute carry, in determining the corresponding Android system of the access interface
Specified services information;The corresponding agency service of the specified services is determined according to the information of the specified services;
Intent parameters are extracted in the message call intercepted from the Hook Function, the Intent parameters are transferred to into institute
State agency service.
Alternatively, the specified services in the Android system include:
Account service in Android system, and/or, the user service in Android system.
Alternatively, the access interface of the specified services in the Android system includes following one or more:
The interface of account is created, the interface of account is changed, the interface of account is deleted.
Alternatively, described monitoring applies the specified clothes accessed in Android system attending to anything else for the specified Android application in virtual machine
The event of business;Intercepted when the event is listened to, the event is converted to into attending to anything else for the specified Android application should
Included with the event for accessing the corresponding agency service of the specified services safeguarded:
Attending to anything else for specified Android application in virtual machine is monitored by the resident service in virtual machine and applies access Android system
The event of the specified services in system;Intercepted when the event is listened to, the event is converted to into the specified Android
Using attend to anything else using accessing the event of the corresponding agency service of the specified services safeguarded.
According to another aspect of the present invention, there is provided a kind of service broker's device of Android application, wherein, including:
Environment construction unit, is suitable to virtual machine constructor environment, by one or more the specified Android applications in Android system
Attend to anything else using be put in virtual machine run;
Resident service unit, is suitable to safeguard the agency service corresponding with the specified services in Android system;Monitor virtual
The event attended to anything else using the specified services in access Android system of the specified Android application in machine;When the event is listened to
Intercepted, the application of attending to anything else that the event is converted to the specified Android application is accessed the specified services pair safeguarded
The event of the agency service answered, is responded by the agency service to the event.
Alternatively, the device is further included:Information configuration unit, is suitable to be safeguarded and Android in the resident service unit
Before the corresponding agency service of specified services in system, the registration procedure information in Android system;
The resident service unit, the relevant information of each specified services being suitable in Android system is generated and is somebody's turn to do
The corresponding agency service of specified services;According to the progress information registered, the agency service is distributed into corresponding process,
So that the proxy server is loaded and run in the process.
Alternatively, the resident service unit, the visit of the specified services being suitable to by Hook Function carry in Android system
Ask on interface, the call request sent to the access interface is intercepted using the Hook Function;Judge the call request
Whether sender is the application of attending to anything else of the specified Android application in virtual machine;It is that determination listens to the specified Android in virtual machine
Using attend to anything else using access Android system in specified services event;Otherwise let pass the call request.
Alternatively, the resident service unit, is further adapted for installing the application of attending to anything else of each specified Android application in virtual machine
When, obtain the configuration information of the application of attending to anything else of each specified Android application and record in distribution management table;
The resident service unit, is suitable to extract Intent parameters from the call request, judges the Intent ginsengs
Indicate whether the data of caller information hit the distribution management table in number;It is the sender for then determining the call request
It is the application of attending to anything else of the specified Android application in virtual machine, is not otherwise.
Alternatively, the resident service unit, is suitable to obtain the installation kit copy of each specified Android application and preserve to finger
Catalogue is determined, as the installation kit of the application of attending to anything else of each specified Android application;Parse the peace of the application of attending to anything else of each specified Android application
Configuration file in dress bag, obtains and applies the configuration information in respective profiles and preserve each attending to anything else for specified Android application
Into the distribution management table.
Alternatively, the resident service unit, is suitable to when determination listens to attending to anything else for the specified Android application in virtual machine
During using the event for accessing the specified services in Android system, according to the information of the access interface of Hook Function institute carry,
Determine the information of the specified services in the corresponding Android system of the access interface;According to the information of the specified services determines
The corresponding agency service of specified services;Intent parameters are extracted in the message call intercepted from the Hook Function, will be described
Intent parameters are transferred to the agency service.
Alternatively, the specified services in the Android system include:
Account service in Android system, and/or, the user service in Android system.
Alternatively, the access interface of the specified services in the Android system includes following one or more:
The interface of account is created, the interface of account is changed, the interface of account is deleted.
Alternatively, the resident service unit, is suitable to monitor specifying in virtual machine by the resident service in virtual machine
The event attended to anything else using the specified services in access Android system of Android application;Intercepted when the event is listened to,
The application of attending to anything else that the event is converted to the specified Android application is accessed the corresponding agency of the specified services for being safeguarded
The event of service.
Have it is above-mentioned understand, technology according to the present invention scheme, in order to realize Android system in multiple identical Android applications
Parallel running, constructs virtual machine environment in Android system, and the application of attending to anything else of specified Android application is put into into the virtual machine
Middle operation, and attend to anything else using for Android system is unknown and then application of attending to anything else cannot be accessed in Android system to overcome
The problem of the higher specified services of authority, this programme safeguards the agency service corresponding with the specified services in Android system, will
Attending to anything else for specified Android application in virtual machine be converted to described specifying using the event for accessing the specified services in Android system
Attending to anything else using the event for accessing the corresponding agency service of the specified services safeguarded for Android application, can ideally realize
Android system middle finger Dingan County is tall and erect to apply the parallel running of its corresponding application of attending to anything else, and application of attending to anything else normally to access
Specified services, its operation will not be affected.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the technological means of the present invention,
And can be practiced according to the content of specification, and in order to allow the above and other objects of the present invention, feature and advantage can
Become apparent, below especially exemplified by the specific embodiment of the present invention.
Description of the drawings
By the detailed description for reading hereafter preferred embodiment, various other advantages and benefit is common for this area
Technical staff will be clear from understanding.Accompanying drawing is only used for illustrating the purpose of preferred embodiment, and is not considered as to the present invention
Restriction.And in whole accompanying drawing, it is denoted by the same reference numerals identical part.In the accompanying drawings:
Fig. 1 shows a kind of flow chart of the service broker method of Android application according to an embodiment of the invention
Fig. 2 shows a kind of schematic diagram of service broker's device of Android application according to an embodiment of the invention
Fig. 3 shows a kind of schematic diagram of service broker's device of Android application in accordance with another embodiment of the present invention.
Specific embodiment
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although showing the disclosure in accompanying drawing
Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure and should not be by embodiments set forth here
Limited.On the contrary, there is provided these embodiments are able to be best understood from the disclosure, and can be by the scope of the present disclosure
Complete conveys to those skilled in the art.
Fig. 1 shows a kind of flow chart of the service broker method of Android application according to an embodiment of the invention.Such as
Shown in Fig. 1, the method includes:
S110, virtual machine constructor environment puts the application of attending to anything else of one or more the specified Android applications in Android system
Enter in virtual machine and run.
Wherein, it is intended that Android application refers to what is can normally run in Android system, browse similar to QQ chats, UC
The application software of device etc..And attending to anything else using as the replisome for specifying Android application for specified Android application, can regard as and refer to
What Dingan County's Zhuo was applied attends to anything else.In prior art, attending to anything else for each specified Android application is applied and with corresponding Android can be specified to answer
With cannot parallel running, its reason is the identical registration that Android system cannot approve that two identical applications are stated
Information, therefore, in the case of specified Android application is mounted, it is intended that the application of attending to anything else of Android application is to be successfully registered to
In Android system, for Android system, it is intended that the application of attending to anything else of Android application is unknown, and Android system cannot be with it
Normally interacted.
S120, safeguards the agency service corresponding with the specified services in Android system.
In general, the authority of the specified services of Android system is all higher, it is desirable to access the specified clothes in Android system
The application of business must have the signature of system level, if can not access, application cannot normally run.Therefore this programme needs
Pass through safeguarded agency service to solve the problem.
S130, monitors the thing attended to anything else using the specified services in access Android system of the specified Android application in virtual machine
Part;Intercepted when the event is listened to, the event is converted to and applies access attending to anything else for the specified Android application
The event of the corresponding agency service of the specified services safeguarded, is responded by the agency service to the event.
It can be seen that, the method shown in Fig. 1 in order to realize Android system in multiple identical Android applications parallel running, in Android
Virtual machine environment is constructed in system, by specified Android application attend to anything else using put in the virtual machine run, and in order to gram
Clothes are attended to anything else using for Android system is unknown and then application of attending to anything else cannot access that authority in Android system is higher to specify
The problem of service, this programme safeguards the agency service corresponding with the specified services in Android system, by specifying in virtual machine
Attending to anything else for Android application be converted to attending to anything else for the specified Android application using the event for accessing the specified services in Android system
Using the event for accessing the corresponding agency service of the specified services safeguarded, can ideally realize being specified in Android system
The parallel running of its corresponding application of attending to anything else of Android application, and attend to anything else using can normally access specified services, it is transported
Row will not be affected.
In one embodiment of the invention, the agency clothes corresponding with the specified services in Android system are safeguarded described
Before business, the method shown in Fig. 1 is further included:The registration procedure information in Android system;Register the purpose of the progress information
It is in order to safeguard previously described agency service, specifically:It is described to safeguard the generation corresponding with the specified services in Android system
Reason service includes:The relevant information of each specified services in Android system, generates agency corresponding with the specified services
Service;According to the progress information registered, the agency service is distributed into corresponding process so that the proxy server
Load and run in the process.
For example, the corresponding source code of specified services in Android system is replicated a by us, for this part of source code for replicating
Adaptively changed, i.e., cutting is carried out to it, removed useless information so that it can be realized that adapting to this programme is tieed up
The corresponding agency service of specified services of shield.The agency service is moved in the process that we are registered and is run.
Under normal circumstances, the specified services in Android system can provide corresponding interface for accessing, then we are in monitoring point
Body application can carry out HOOK either with or without when occurring and accessing the event of specified services to the interface for being provided, and extremely should with intercepting to send
The request of interface.Specifically, described monitoring applies the finger accessed in Android system attending to anything else for the specified Android application in virtual machine
The event of fixed service includes:By on the access interface of specified services of the Hook Function carry in Android system, using the hook
Subfunction intercepts the call request sent to the access interface;Whether the sender for judging the call request is in virtual machine
Specified Android application application of attending to anything else;It is that determination is listened to pacify using access attending to anything else for the specified Android application in virtual machine
The event of the specified services in tall and erect system;Otherwise let pass the call request.
Because the configuration file of application of attending to anything else is not registered in Android system, this programme is applied in configuration to know to attend to anything else
Corresponding resource stated in file etc., needs the information in the configuration file for replacing Android system record to attend to anything else application, with
Judgement matching is carried out when needed.In one embodiment of the invention, dividing for each specified Android application is installed in virtual machine
During body application, the method is further included:Obtain the configuration information of the application of attending to anything else of each specified Android application and record in configuration
In management table;Whether the sender for judging the call request is that the specified Android application in virtual machine is attended to anything else using bag
Include:Intent parameters are extracted from the call request, judges that the data that caller information is indicated in the Intent parameters are
It is no to hit the distribution management table;It is then to determine that the sender of the call request is the specified Android application in virtual machine
Attend to anything else application, be not otherwise.
It can be static registration specifically to attend to anything else using the logon mode being registered in the resident service of this programme, i.e., described
Obtain the configuration information and record of the application of attending to anything else of each specified Android application includes in distribution management table:Obtain each specified Android
Using installation kit copy and preserve to assigned catalogue, as the installation kit of the application of attending to anything else of each specified Android application;Parsing is each
Configuration file in the installation kit of the application of attending to anything else of specified Android application, obtains and applies corresponding each specified attending to anything else for Android application
Configuration information in configuration file is simultaneously preserved into the distribution management table.
In one embodiment of the invention, the application of attending to anything else that the event is converted to the specified Android application
The event of the corresponding agency service of the specified services that access is safeguarded includes:When it is determined that listening to the specified peace in virtual machine
When attending to anything else using the event for accessing the specified services in Android system of Zhuo Yingyong, according to the access of Hook Function institute carry
The information of interface, determines the information of the specified services in the corresponding Android system of the access interface;According to the specified services
Information determines the corresponding agency service of the specified services;Intent ginsengs are extracted in the message call intercepted from the Hook Function
Number, by the Intent parameters agency service is transferred to.
In a specific example, the specified services in the Android system include:Account service in Android system,
And/or, the user service in Android system.The authority of both services is higher, and the mode for accessing both services is to access
Both interfaces for providing of service, wherein, the access interface of the specified services in the Android system include one kind as follows or
It is various:The interface of account is created, the interface of account is changed, the interface of account is deleted.If it is intended to accessing successfully, attending to anything else application must
There must be the signature of system level, and we do not have this signature as common third-party application, so basic just access not
Account service and user service, can not access and attend to anything else using cannot normally run, both service supports storage accounts and
The data of user, if obsolete, application is behaved and have certainly many problems.Therefore, we are by Android system
Both services respectively adaptively cutting portion, the two services are moved in our process, as resident service
Two sub-services, that is, agency service corresponding with account service and user service respectively.We are account service and use
Access interface HOOK that family service is provided are lived, and are all gone to attending to anything else in the two sub-services using the method for accessing these interfaces
Go to process.
This programme does not carry out ROOT to android system, there is no System Privileges, merely by it is above-mentioned cleverly
Method come the normal operation of application of realizing attending to anything else, with wide applicability.
In one embodiment of the invention, described monitoring is pacified attending to anything else for the specified Android application in virtual machine using access
The event of the specified services in tall and erect system;Intercepted when the event is listened to, the event is converted to into described specifying
Attending to anything else for Android application includes using the event for accessing the corresponding agency service of the specified services safeguarded:By virtual machine
In resident service monitor virtual machine in specified Android application attend to anything else using access Android system in specified services thing
Part;Intercepted when the event is listened to, the event is converted to and applies access attending to anything else for the specified Android application
The event of the corresponding agency service of the specified services safeguarded.
Fig. 2 shows a kind of schematic diagram of service broker's device of Android application according to an embodiment of the invention.Such as
Shown in Fig. 2, service broker's device 200 of the Android application includes:
Environment construction unit 210, is suitable to virtual machine constructor environment, should by one or more the specified Androids in Android system
Attend to anything else to apply to be put in virtual machine and run.
Resident service unit 220, is suitable to safeguard the agency service corresponding with the specified services in Android system;Monitor empty
The event attended to anything else using the specified services in access Android system of the specified Android application in plan machine;When listening to the event
Shi Jinhang is intercepted, and the application of attending to anything else that the event is converted to the specified Android application is accessed the specified services safeguarded
The event of corresponding agency service, is responded by the agency service to the event.
It can be seen that, the device shown in Fig. 2 in order to realize Android system in multiple identical Android applications parallel running, in Android
Virtual machine environment is constructed in system, by specified Android application attend to anything else using put in the virtual machine run, and in order to gram
Clothes are attended to anything else using for Android system is unknown and then application of attending to anything else cannot access that authority in Android system is higher to specify
The problem of service, this programme safeguards the agency service corresponding with the specified services in Android system, by specifying in virtual machine
Attending to anything else for Android application be converted to attending to anything else for the specified Android application using the event for accessing the specified services in Android system
Using the event for accessing the corresponding agency service of the specified services safeguarded, can ideally realize being specified in Android system
The parallel running of its corresponding application of attending to anything else of Android application, and attend to anything else using can normally access specified services, it is transported
Row will not be affected.
Fig. 3 shows a kind of schematic diagram of service broker's device of Android application in accordance with another embodiment of the present invention.
As shown in figure 3, service broker's device 300 of the Android application includes:Environment construction unit 210, resident service unit 220 and letter
Breath dispensing unit 230.
Wherein, environment construction unit 210, the partial function of resident service unit 220 have been described above, and no longer go to live in the household of one's in-laws on getting married
State.
Information configuration unit 230, is suitable to be safeguarded and the specified services phase in Android system in the resident service unit 220
Before corresponding agency service, the registration procedure information in Android system.
The resident service unit 220, the relevant information of each specified services being suitable in Android system, generate with
The corresponding agency service of the specified services;According to the progress information registered, the agency service is distributed to corresponding process
In so that the proxy server is loaded and run in the process.
In one embodiment of the invention, resident service unit 220, is suitable to Hook Function carry in Android system
Specified services access interface on, using the Hook Function intercept send to the access interface call request;Judge
Whether the sender of the call request is the application of attending to anything else of the specified Android application in virtual machine;It is that determination listens to virtual
The event attended to anything else using the specified services in access Android system of the specified Android application in machine;Calling described in otherwise letting pass please
Ask.
Wherein, the resident service unit 220, is further adapted for installing the application of attending to anything else of each specified Android application in virtual machine
When, obtain the configuration information of the application of attending to anything else of each specified Android application and record in distribution management table;The resident service list
Unit 220, is suitable to extract Intent parameters from the call request, judges to indicate caller information in the Intent parameters
Whether data hit the distribution management table;It is then to determine that the sender of the call request is the specified Android in virtual machine
Using application of attending to anything else, be not otherwise.
Wherein, the resident service unit 220, is suitable to obtain the installation kit copy of each specified Android application and preserve to finger
Catalogue is determined, as the installation kit of the application of attending to anything else of each specified Android application;Parse the peace of the application of attending to anything else of each specified Android application
Configuration file in dress bag, obtains and applies the configuration information in respective profiles and preserve each attending to anything else for specified Android application
Into the distribution management table.
In one embodiment of the invention, resident service unit 220, is suitable to when determination listens to specifying in virtual machine
When attending to anything else using the event for accessing the specified services in Android system of Android application, according to the visit of Hook Function institute carry
The information of interface is asked, the information of the specified services in the corresponding Android system of the access interface is determined;According to the specified services
Information determine the corresponding agency service of the specified services;Intent is extracted in the message call intercepted from the Hook Function
Parameter, by the Intent parameters agency service is transferred to.
Specifically, the specified services in the Android system include:Account service in Android system, and/or, Android system
User service in system.Wherein, the access interface of the specified services in the Android system includes following one or more:Create
The interface of account, changes the interface of account, deletes the interface of account.
In one embodiment of the invention, resident service unit 220, is suitable to be monitored by the resident service in virtual machine
The event attended to anything else using the specified services in access Android system of the specified Android application in virtual machine;When listening to the thing
Intercepted during part, the application of attending to anything else that the event is converted to the specified Android application is accessed the described specified clothes safeguarded
The event of corresponding agency service of being engaged in.
It should be noted that each embodiment of Fig. 2-Fig. 3 shown devices phase corresponding with each embodiment of method shown in Fig. 1
Together, it has been described in detail above, has will not be described here.
In sum, in the inventive solutions, in order to realize Android system in multiple identical Android applications and
Capable operation, constructs virtual machine environment in Android system, and the application of attending to anything else of specified Android application is put in the virtual machine
Operation, and attend to anything else using for Android system is unknown and then application of attending to anything else cannot access power in Android system to overcome
The problem of the higher specified services of limit, this programme safeguards the agency service corresponding with the specified services in Android system, by void
Attending to anything else for specified Android application in plan machine be converted to the specified peace using the event for accessing the specified services in Android system
Zhuo Yingyong's attends to anything else using the event for accessing the corresponding agency service of the specified services safeguarded, can ideally realize peace
Tall and erect system middle finger Dingan County is tall and erect to apply the parallel running of its corresponding application of attending to anything else, and application of attending to anything else normally to access and refer to
Fixed service, its operation will not be affected.
It should be noted that:
Provided herein algorithm and display be not inherently related to any certain computer, virtual bench or miscellaneous equipment.
Various fexible units can also be used together based on teaching in this.As described above, construct required by this kind of device
Structure be obvious.Additionally, the present invention is also not for any certain programmed language.It is understood that, it is possible to use it is various
Programming language realizes the content of invention described herein, and the description done to language-specific above is to disclose this
Bright preferred forms.
In specification mentioned herein, a large amount of details are illustrated.It is to be appreciated, however, that the enforcement of the present invention
Example can be put into practice in the case of without these details.In some instances, known method, structure is not been shown in detail
And technology, so as not to obscure the understanding of this description.
Similarly, it will be appreciated that in order to simplify the disclosure and help understand one or more in each inventive aspect, exist
Above in the description of the exemplary embodiment of the present invention, each feature of the present invention is grouped together into single enforcement sometimes
In example, figure or descriptions thereof.However, the method for the disclosure should be construed to reflect following intention:I.e. required guarantor
The more features of feature that the application claims ratio of shield is expressly recited in each claim.More precisely, such as following
Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore,
Thus the claims for following specific embodiment are expressly incorporated in the specific embodiment, wherein each claim itself
All as the separate embodiments of the present invention.
Those skilled in the art are appreciated that can be carried out adaptively to the module in the equipment in embodiment
Change and they are arranged in one or more equipment different from the embodiment.Can be the module or list in embodiment
Unit or component are combined into a module or unit or component, and can be divided in addition multiple submodule or subelement or
Sub-component.In addition at least some in such feature and/or process or unit is excluded each other, can adopt any
Combine to all features disclosed in this specification (including adjoint claim, summary and accompanying drawing) and so disclosed
Where all processes or unit of method or equipment are combined.Unless expressly stated otherwise, this specification is (including adjoint power
Profit is required, summary and accompanying drawing) disclosed in each feature can it is identical by offers, be equal to or the alternative features of similar purpose carry out generation
Replace.
Although additionally, it will be appreciated by those of skill in the art that some embodiments described herein include other embodiments
In included some features rather than further feature, but the combination of the feature of different embodiments means in of the invention
Within the scope of and form different embodiments.For example, in the following claims, embodiment required for protection appoint
One of meaning can in any combination mode using.
The present invention all parts embodiment can be realized with hardware, or with one or more processor operation
Software module realize, or with combinations thereof realization.It will be understood by those of skill in the art that can use in practice
Microprocessor or digital signal processor (DSP) are realizing service broker's device of Android application according to embodiments of the present invention
In some or all parts some or all functions.The present invention is also implemented as described herein for performing
Some or all equipment of method or program of device (for example, computer program and computer program).So
Realization the present invention program can store on a computer-readable medium, or can have one or more signal shape
Formula.Such signal can be downloaded from internet website and obtained, or be provided on carrier signal, or with any other shape
Formula is provided.
It should be noted that above-described embodiment the present invention will be described rather than limits the invention, and ability
Field technique personnel can design without departing from the scope of the appended claims alternative embodiment.In the claims,
Any reference symbol between bracket should not be configured to limitations on claims.Word "comprising" is not excluded the presence of not
Element listed in the claims or step.Word "a" or "an" before element does not exclude the presence of multiple such
Element.The present invention can come real by means of the hardware for including some different elements and by means of properly programmed computer
It is existing.If in the unit claim for listing equipment for drying, several in these devices can be by same hardware branch
To embody.The use of word first, second, and third does not indicate that any order.These words can be explained and be run after fame
Claim.
The invention discloses A1, a kind of service broker method of Android application, wherein, including:
Virtual machine constructor environment, attending to anything else for one or more the specified Android applications in Android system is virtual using being put into
Run in machine;
Safeguard the agency service corresponding with the specified services in Android system;
Monitor the event attended to anything else using the specified services in access Android system of the specified Android application in virtual machine;When
Intercepted when listening to the event, the event is converted to and is safeguarded using access attending to anything else for the specified Android application
The corresponding agency service of the specified services event, the event is responded by the agency service.
A2, the method as described in A1, wherein, safeguard the agency clothes corresponding with the specified services in Android system described
Before business, the method is further included:The registration procedure information in Android system;
It is described to safeguard that the agency service corresponding with the specified services in Android system includes:It is every in Android system
The relevant information of individual specified services, generates agency service corresponding with the specified services;According to the progress information registered, by institute
State agency service to distribute into corresponding process so that the proxy server is loaded and run in the process.
A3, the method as described in A1, wherein, described monitoring is pacified attending to anything else for the specified Android application in virtual machine using access
The event of the specified services in tall and erect system includes:
By on the access interface of specified services of the Hook Function carry in Android system, intercepted using the Hook Function
Send to the call request of the access interface;
Whether the sender for judging the call request is the application of attending to anything else of the specified Android application in virtual machine;
Being that determination is listened to applies the specified clothes accessed in Android system attending to anything else for the specified Android application in virtual machine
The event of business;Otherwise let pass the call request.
A4, the method as described in A3, wherein, the attending to anything else when applying of each specified Android application, the party are installed in virtual machine
Method is further included:Obtain the configuration information of the application of attending to anything else of each specified Android application and record in distribution management table;
Whether the sender for judging the call request is that the specified Android application in virtual machine is attended to anything else using bag
Include:Intent parameters are extracted from the call request, judges that the data that caller information is indicated in the Intent parameters are
It is no to hit the distribution management table;It is then to determine that the sender of the call request is the specified Android application in virtual machine
Attend to anything else application, be not otherwise.
A5, the method as described in A4, wherein, the configuration information of the application of attending to anything else for obtaining each specified Android application is simultaneously remembered
Record includes in distribution management table:
Obtain the installation kit copy of each specified Android application and preserve to assigned catalogue, dividing as each specified Android application
The installation kit of body application;
Configuration file in the installation kit of the application of attending to anything else for parsing each specified Android application, obtains each specified Android application
Attend to anything else and apply the configuration information in respective profiles and preserve into the distribution management table.
A6, the method as described in A3, wherein, the application of attending to anything else that the event is converted to the specified Android application
The event of the corresponding agency service of the specified services that access is safeguarded includes:
When it is determined that listening to attending to anything else for the specified Android application in virtual machine applies the specified services accessed in Android system
Event when,
According to the information of the access interface of Hook Function institute carry, in determining the corresponding Android system of the access interface
Specified services information;The corresponding agency service of the specified services is determined according to the information of the specified services;
Intent parameters are extracted in the message call intercepted from the Hook Function, the Intent parameters are transferred to into institute
State agency service.
A7, the method as any one of A1-A6, wherein, the specified services in the Android system include:
Account service in Android system, and/or, the user service in Android system.
A8, the method as described in A7, wherein, the access interface of the specified services in the Android system includes following one kind
Or it is various:
The interface of account is created, the interface of account is changed, the interface of account is deleted.
A9, the method as described in A1, wherein, described monitoring is pacified attending to anything else for the specified Android application in virtual machine using access
The event of the specified services in tall and erect system;Intercepted when the event is listened to, the event is converted to into described specifying
Attending to anything else for Android application includes using the event for accessing the corresponding agency service of the specified services safeguarded:
Attending to anything else for specified Android application in virtual machine is monitored by the resident service in virtual machine and applies access Android system
The event of the specified services in system;Intercepted when the event is listened to, the event is converted to into the specified Android
Using attend to anything else using accessing the event of the corresponding agency service of the specified services safeguarded.
The invention also discloses B10, a kind of service broker's device of Android application, wherein, including:
Environment construction unit, is suitable to virtual machine constructor environment, by one or more the specified Android applications in Android system
Attend to anything else using be put in virtual machine run;
Resident service unit, is suitable to safeguard the agency service corresponding with the specified services in Android system;Monitor virtual
The event attended to anything else using the specified services in access Android system of the specified Android application in machine;When the event is listened to
Intercepted, the application of attending to anything else that the event is converted to the specified Android application is accessed the specified services pair safeguarded
The event of the agency service answered, is responded by the agency service to the event.
B11, the device as described in B10, wherein, the device is further included:Information configuration unit, is suitable to described resident
Service unit safeguards before the agency service corresponding with the specified services in Android system that registration procedure is believed in Android system
Breath;
The resident service unit, the relevant information of each specified services being suitable in Android system is generated and is somebody's turn to do
The corresponding agency service of specified services;According to the progress information registered, the agency service is distributed into corresponding process,
So that the proxy server is loaded and run in the process.
B12, the device as described in B10, wherein,
The resident service unit, the access interface of the specified services being suitable to by Hook Function carry in Android system
On, the call request sent to the access interface is intercepted using the Hook Function;Judge the sender of the call request
It is whether the application of attending to anything else of the specified Android application in virtual machine;It is that determination listens to the specified Android application in virtual machine
Attend to anything else using the event for accessing the specified services in Android system;Otherwise let pass the call request.
B13, the device as described in B12, wherein, the resident service unit is further adapted for installing each specifying in virtual machine
When applying the attending to anything else of Android application, the configuration information and record of the application of attending to anything else of each specified Android application are obtained in distribution management table
In;
The resident service unit, is suitable to extract Intent parameters from the call request, judges the Intent ginsengs
Indicate whether the data of caller information hit the distribution management table in number;It is the sender for then determining the call request
It is the application of attending to anything else of the specified Android application in virtual machine, is not otherwise.
B14, the device as described in B13, wherein, the resident service unit is suitable to obtain the peace of each specified Android application
Dress cladding part is simultaneously preserved to assigned catalogue, used as the installation kit of the application of attending to anything else of each specified Android application;Parse each specified Android
Using application of attending to anything else installation kit in configuration file, obtain and apply in respective profiles each specified attending to anything else for Android application
In configuration information and preserve into the distribution management table.
B15, the device as described in B12, wherein,
The resident service unit, is suitable to apply access when determination listens to attending to anything else for the specified Android application in virtual machine
During the event of the specified services in Android system, according to the information of the access interface of Hook Function institute carry, the visit is determined
Ask the information of the specified services in the corresponding Android system of interface;The specified services are determined according to the information of the specified services
Corresponding agency service;Intent parameters are extracted in the message call intercepted from the Hook Function, by the Intent parameters
It is transferred to the agency service.
B16, the device as any one of B10-B15, wherein, the specified services in the Android system include:
Account service in Android system, and/or, the user service in Android system.
B17, the device as described in B16, wherein, the access interface of the specified services in the Android system is included as next
Plant or various:
The interface of account is created, the interface of account is changed, the interface of account is deleted.
B18, the device as described in B10, wherein,
The resident service unit, is suitable to monitor the specified Android application in virtual machine by the resident service in virtual machine
Attend to anything else using access Android system in specified services event;Intercepted when the event is listened to, by the thing
Part is converted to the thing of the corresponding agency service of the specified services safeguarded using access of attending to anything else of the specified Android application
Part.
Claims (10)
1. a kind of service broker method of Android application, wherein, including:
Virtual machine constructor environment, the application of attending to anything else of one or more the specified Android applications in Android system is put in virtual machine
Operation;
Safeguard the agency service corresponding with the specified services in Android system;
Monitor the event attended to anything else using the specified services in access Android system of the specified Android application in virtual machine;Work as monitoring
Intercepted during to the event, the application of attending to anything else that the event is converted to the specified Android application is accessed into safeguarded institute
The event of the corresponding agency service of specified services is stated, the event is responded by the agency service.
2. the method for claim 1, wherein in the agency that the maintenance is corresponding with the specified services in Android system
Before service, the method is further included:The registration procedure information in Android system;
It is described to safeguard that the agency service corresponding with the specified services in Android system includes:Each in Android system refers to
The relevant information of fixed service, generates agency service corresponding with the specified services;According to the progress information registered, by the generation
Reason service distribution is into corresponding process so that the proxy server is loaded and run in the process.
3. the method for claim 1, wherein described monitoring applies access attending to anything else for the specified Android application in virtual machine
The event of the specified services in Android system includes:
By on the access interface of specified services of the Hook Function carry in Android system, intercepted using the Hook Function and sent
To the call request of the access interface;
Whether the sender for judging the call request is the application of attending to anything else of the specified Android application in virtual machine;
Being that determination is listened to applies the specified services accessed in Android system attending to anything else for the specified Android application in virtual machine
Event;Otherwise let pass the call request.
4. method as claimed in claim 3, wherein, the attending to anything else when applying of each specified Android application is installed in virtual machine, should
Method is further included:Obtain the configuration information of the application of attending to anything else of each specified Android application and record in distribution management table;
Whether the sender for judging the call request is that the specified Android application in virtual machine is attended to anything else using including:From
Intent parameters are extracted in the call request, judges to indicate whether the data of caller information hit in the Intent parameters
The distribution management table;It is then to determine that the sender of the call request is that attending to anything else for the specified Android application in virtual machine should
With not otherwise being.
5. method as claimed in claim 4, wherein, the configuration information of the application of attending to anything else for obtaining each specified Android application is simultaneously
Record includes in distribution management table:
Obtain the installation kit copy of each specified Android application and preserve to assigned catalogue, should as attending to anything else for each specified Android application
Installation kit;
Configuration file in the installation kit of the application of attending to anything else for parsing each specified Android application, obtains attending to anything else for each specified Android application
Apply the configuration information in respective profiles and preserve into the distribution management table.
6. a kind of service broker's device of Android application, wherein, including:
Environment construction unit, is suitable to virtual machine constructor environment, dividing one or more the specified Android applications in Android system
Body application is put in virtual machine and runs;
Resident service unit, is suitable to safeguard the agency service corresponding with the specified services in Android system;In monitoring virtual machine
Specified Android application attend to anything else using access Android system in specified services event;Carry out when the event is listened to
Intercept, the application of attending to anything else that the event is converted to the specified Android application is accessed the specified services safeguarded corresponding
The event of agency service, is responded by the agency service to the event.
7. device as claimed in claim 6, wherein, the device is further included:Information configuration unit, is suitable to described resident
Service unit safeguards before the agency service corresponding with the specified services in Android system that registration procedure is believed in Android system
Breath;
The resident service unit, the relevant information of each specified services being suitable in Android system is generated and specified with this
Service relative answers agency service;According to the progress information registered, the agency service is distributed into corresponding process so that
The proxy server is loaded and run in the process.
8. device as claimed in claim 6, wherein,
The resident service unit, on the access interface of the specified services being suitable to by Hook Function carry in Android system, profit
The call request sent to the access interface is intercepted with the Hook Function;Whether the sender for judging the call request be
The application of attending to anything else of the specified Android application in virtual machine;It is that determination listens to attending to anything else for the specified Android application in virtual machine should
With the event for accessing the specified services in Android system;Otherwise let pass the call request.
9. device as claimed in claim 8, wherein, the resident service unit is further adapted for installing each specifying in virtual machine
When applying the attending to anything else of Android application, the configuration information and record of the application of attending to anything else of each specified Android application are obtained in distribution management table
In;
The resident service unit, is suitable to extract Intent parameters from the call request, in judging the Intent parameters
Whether the data for indicating caller information hit the distribution management table;It is then to determine that the sender of the call request is empty
The application of attending to anything else of the specified Android application in plan machine, be not otherwise.
10. device as claimed in claim 9, wherein, the resident service unit is suitable to obtain the peace of each specified Android application
Dress cladding part is simultaneously preserved to assigned catalogue, used as the installation kit of the application of attending to anything else of each specified Android application;Parse each specified Android
Using application of attending to anything else installation kit in configuration file, obtain and apply in respective profiles each specified attending to anything else for Android application
In configuration information and preserve into the distribution management table.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611249850.0A CN106657358A (en) | 2016-12-29 | 2016-12-29 | Service proxy method and device for Android applications |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611249850.0A CN106657358A (en) | 2016-12-29 | 2016-12-29 | Service proxy method and device for Android applications |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106657358A true CN106657358A (en) | 2017-05-10 |
Family
ID=58835991
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611249850.0A Pending CN106657358A (en) | 2016-12-29 | 2016-12-29 | Service proxy method and device for Android applications |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106657358A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107635011A (en) * | 2017-10-17 | 2018-01-26 | 上海哎媲媲网络技术有限公司 | A kind of Android platform realizes the system and method for the interior network Transparent Proxy of application |
CN108804147A (en) * | 2018-05-28 | 2018-11-13 | 新华三云计算技术有限公司 | Link closedown method, device and client |
CN108959916A (en) * | 2017-05-22 | 2018-12-07 | 华为技术有限公司 | Methods, devices and systems for the access safety world |
CN109002323A (en) * | 2018-06-27 | 2018-12-14 | 北京金山安全软件有限公司 | Data processing method and device and electronic equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104267984A (en) * | 2014-09-23 | 2015-01-07 | 上海卓盟信息科技有限公司 | Android platform based automatic application and game upgrading method |
CN104866342A (en) * | 2015-05-07 | 2015-08-26 | 北京数字天域科技有限责任公司 | Method and device for simultaneously starting multiple same applications on intelligent terminal |
CN105164644A (en) * | 2013-06-28 | 2015-12-16 | 惠普发展公司,有限责任合伙企业 | Hook framework |
CN105426310A (en) * | 2015-11-27 | 2016-03-23 | 北京奇虎科技有限公司 | Method and apparatus for detecting performance of target process |
CN105843668A (en) * | 2016-03-11 | 2016-08-10 | 北京奇虎科技有限公司 | Derived process staying-resident method, derived program generating method and corresponding device |
-
2016
- 2016-12-29 CN CN201611249850.0A patent/CN106657358A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105164644A (en) * | 2013-06-28 | 2015-12-16 | 惠普发展公司,有限责任合伙企业 | Hook framework |
CN104267984A (en) * | 2014-09-23 | 2015-01-07 | 上海卓盟信息科技有限公司 | Android platform based automatic application and game upgrading method |
CN104866342A (en) * | 2015-05-07 | 2015-08-26 | 北京数字天域科技有限责任公司 | Method and device for simultaneously starting multiple same applications on intelligent terminal |
CN105426310A (en) * | 2015-11-27 | 2016-03-23 | 北京奇虎科技有限公司 | Method and apparatus for detecting performance of target process |
CN105843668A (en) * | 2016-03-11 | 2016-08-10 | 北京奇虎科技有限公司 | Derived process staying-resident method, derived program generating method and corresponding device |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108959916A (en) * | 2017-05-22 | 2018-12-07 | 华为技术有限公司 | Methods, devices and systems for the access safety world |
CN108959916B (en) * | 2017-05-22 | 2022-01-14 | 华为技术有限公司 | Method, device and system for accessing secure world |
CN107635011A (en) * | 2017-10-17 | 2018-01-26 | 上海哎媲媲网络技术有限公司 | A kind of Android platform realizes the system and method for the interior network Transparent Proxy of application |
CN107635011B (en) * | 2017-10-17 | 2021-01-15 | 四川智魔王智能科技股份有限公司 | System and method for realizing transparent proxy of network in application by Android platform |
CN108804147A (en) * | 2018-05-28 | 2018-11-13 | 新华三云计算技术有限公司 | Link closedown method, device and client |
CN108804147B (en) * | 2018-05-28 | 2022-05-10 | 新华三云计算技术有限公司 | Linkage shutdown method and device and client |
CN109002323A (en) * | 2018-06-27 | 2018-12-14 | 北京金山安全软件有限公司 | Data processing method and device and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109787830B (en) | Gray scale distribution control method, device, system, electronic device and storage medium | |
KR102527445B1 (en) | Messaging bot technology for rich communication | |
US10296440B2 (en) | Multi-tenant aware debugging methods and systems | |
US9047643B2 (en) | Method of extending web service application programming interfaces using query languages | |
CN106657358A (en) | Service proxy method and device for Android applications | |
CN115668185B (en) | Method and apparatus for managing external approval provisioning and external messaging communication requests in a group-based communication system | |
CN102957696B (en) | A kind of data processing method and device | |
CN108234475A (en) | Account management method, electronic equipment and computer storage media | |
US10645087B2 (en) | Centralized authenticating abstraction layer with adaptive assembly line pathways | |
CN111861140A (en) | Service processing method, device, storage medium and electronic device | |
CN107333248B (en) | A kind of real-time sending method of short message and system | |
CN102955907B (en) | Cipher management method and device | |
CN108933695B (en) | Method and apparatus for processing information | |
CN105979294A (en) | Data processing method and device based on users | |
CN105530311A (en) | Load distribution method and device | |
US20210390510A1 (en) | Dynamically Providing Cybersecurity Training Based on User-Specific Threat Information | |
EP3874436A1 (en) | Method, apparatus, and computer program product for group-based communication interface with email channeling | |
CN103617381A (en) | Permission configuration method and permission configuration system of equipment | |
JP2022510067A (en) | Authorization associated with an external shared communication resource | |
CN109587280A (en) | A kind of Business Process Management method and device | |
CN116737598B (en) | Page debugging method, device, electronic equipment and computer readable medium | |
CN106775952A (en) | A kind of process management method and device of Android application | |
CN112733001A (en) | Method and device for acquiring subscription information and electronic equipment | |
US11734057B2 (en) | Method and apparatus for processing a service of an abnormal server | |
US11023672B1 (en) | Dynamic service injection |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170510 |