CN107665302A - A kind of Android applications opens implementation method, mobile terminal and storage medium - Google Patents

A kind of Android applications opens implementation method, mobile terminal and storage medium Download PDF

Info

Publication number
CN107665302A
CN107665302A CN201710879961.8A CN201710879961A CN107665302A CN 107665302 A CN107665302 A CN 107665302A CN 201710879961 A CN201710879961 A CN 201710879961A CN 107665302 A CN107665302 A CN 107665302A
Authority
CN
China
Prior art keywords
application
clone
host
android
implementation method
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201710879961.8A
Other languages
Chinese (zh)
Other versions
CN107665302B (en
Inventor
涂斌健
陈东持
郑嘉斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huizhou TCL Mobile Communication Co Ltd
Original Assignee
Huizhou TCL Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huizhou TCL Mobile Communication Co Ltd filed Critical Huizhou TCL Mobile Communication Co Ltd
Priority to CN201710879961.8A priority Critical patent/CN107665302B/en
Publication of CN107665302A publication Critical patent/CN107665302A/en
Priority to PCT/CN2018/107691 priority patent/WO2019062771A1/en
Application granted granted Critical
Publication of CN107665302B publication Critical patent/CN107665302B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/51Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems at application loading time, e.g. accepting, rejecting, starting or inhibiting executable software based on integrity or source reliability
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order

Landscapes

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

Abstract

The invention discloses a kind of Android applications to open implementation method, mobile terminal and storage medium more, wherein, method includes:After the former application of mobile terminal starts, clone the startup of application;In ccf layer registration and store path are provided for clone's application;The clone applies carries out information communication as in host in original application with far-end server.Android applications of the present invention implementation method, mobile terminal and the storage mediums opened operate more due to using to pass through in the host set on mobile terminals, realize that same application open more, realized from ccf layer, all without causing confusion or mislead collapse for application and system, it can securely achieve and open application program more, execution without influenceing application originally, it realizes more simple possible.

Description

A kind of Android applications opens implementation method, mobile terminal and storage medium
Technical field
The present invention relates to mobile communication technology field, more particularly to a kind of Android applications to open implementation method more, move Dynamic terminal and storage medium.
Background technology
The android system of prior art does not support multiple examples of same application, that is to say, that an application is general An example can only be opened, opens an Application Program Interface.But as present people's demand is growing and change, particularly To necessary more status needs in social activity, mobile terminal system (Android) social software can not be logged in simultaneously multiple accounts/ Open multiple examples and be unsatisfied with.This kind of demand shows especially prominent in " wechat " social software of CHINESE REGION.
In order to solve this demand, emerged on network and many give user and complete the more of same application under specific circumstances The demand has been incorporated base by the implementation method of individual example, even mobile terminal developer when developing android system In this market demand.But still solved the above problems at present without particularly effective implementation.
It is right after user can download application unpacking before the several years during Android 4.0 epoch by taking " wechat " as an example The bag name of application is changed in AndroidManifest.xml, then third party in secondary packing/personal signature again, installed in being One " wechat " application can be opened after on system more.But because different bag names have different signatures, so two bags from the point of view of system Different applications, so as to reach " same application " and the effect of " two examples ".
But subsequent wechat operationally can dynamically check whether the bag name of oneself is tampered in subsequent editions, if It is tampered or signs and be not inconsistent with original signature, then can refuses to start.It can be seen that this method does not have versatility.
Therefore, the prior art is defective, has much room for improvement and develops.
The content of the invention
It is an object of the invention to provide a kind of Android applications to open implementation method, mobile terminal and storage medium, pin more To the drawbacks described above of prior art, the opening of the two or more example of same application can be realized, so as to accomplish to facilitate multiple use Family logs in the application of different instances in same system and used.
The technical proposal for solving the technical problem of the invention is as follows:
A kind of Android applications opens implementation method, wherein, including:
After the former application of mobile terminal starts, clone the startup of application;
In ccf layer registration and store path are provided for clone's application;
The clone applies carries out information communication as in host in original application with far-end server.
The Android applications opens implementation method, wherein, clone's application also includes before starting:
All it must apply for authority to user when original application starts as host;If user refuses to assign wherein some authority, Host refuses to start.
The Android applications opens implementation method, wherein, the starting step of clone's application also includes:
The storage path of clone's application, for host, stores the memory space distributed to system for former application with original application It is interior.
Android application opens implementation method, wherein, the startup of clone's application include event Activity, Service, Content Provider ContentProvider and receiver Receiver correspondence are serviced from the request at remote service end Start.
The Android applications opens implementation method, wherein, the startup of clone's application includes step:
Several events Activity is stated in Android original applies host, services Service placeholder, with Identified for system AMS;
Per newly-built one, clone applies user in host, and host can go to travel through under the application by PMS The information such as the component that AndroidManifest.xml was stated, get up information cache;
Carry out cloning the startup and operation of application in android system.
The Android applications opens implementation method, wherein, the startup of clone's application also includes:
Host asks to start an empty service;
Except host in itself, service background is opened for a corresponding new process.
A kind of mobile terminal, wherein, including processor, and the memory being connected with the processor,
The memory storage has open of Android applications to realize processing routine more, and Android applications opens realization processing Following steps are realized when program is by the computing device:
After the former application of mobile terminal starts, clone the startup of application;
In ccf layer registration and store path are provided for clone's application;
The clone applies carries out information communication as in host in original application with far-end server.
The mobile terminal, wherein, Android application opens when realizing processing routine by the computing device, Also realize following steps:
Clone's application also includes before starting:
All it must apply for authority to user when original application starts as host;If user refuses to assign wherein some authority, Host refuses to start.
The mobile terminal, wherein, Android application opens when realizing processing routine by the computing device, Also realize following steps:
The storage path of clone's application, for host, stores the memory space distributed to system for former application with original application It is interior.
A kind of storage medium, wherein, the storage medium is stored with open of Android applications more and realizes processing routine, should Android applications opens the steps realized and realize that implementation method is opened in the Android applications more when processing routine is executed by processor Suddenly.
A kind of Android applications provided by the present invention opens implementation method, mobile terminal and storage medium, due to using By being operated in the host that sets on mobile terminals, realize that same application open more, realized from ccf layer, to application and All without causing confusion or misleading collapse for system, it can securely achieve and open application program more, without influenceing originally should Execution, it realizes more simple possible.
Brief description of the drawings
Fig. 1 is that open when implementation method preferred embodiment is installed of Android applications of the present invention is adapted to fragmentary views more.
Fig. 2 is that open when implementation method preferred embodiment is called of Android applications of the present invention is adapted to fragmentary views more.
Fig. 3 is to be recorded in the Android of the present invention applications AMS opened in implementation method and mobile terminal preferred embodiment more Four big module information schematic diagrames.
Fig. 4 is event Activity and AMS when Android of the present invention applications open the startup of implementation method preferred embodiment more Interactive schematic flow sheet.
Fig. 5 is the Android of the present invention applications original application live for opening another preferred embodiment of implementation method more Desktop entrance Intent handling process schematic diagrames.
Fig. 6 is that the Android of the present invention applications clone's application startups for opening another preferred embodiment of implementation method are flowed more Journey schematic diagram.
Fig. 7 is to open clone in implementation method Android of the present invention is applied to apply the principle started in host to show more It is intended to.
Fig. 8 is that the present invention performs the Android applications mobile terminal system schematic diagrames for opening implementation method more.
Embodiment
To make the objects, technical solutions and advantages of the present invention clearer, clear and definite, develop simultaneously embodiment pair referring to the drawings The present invention is further described.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and do not have to It is of the invention in limiting.
Android applications of the present invention implementation method, mobile terminal and the storage mediums opened utilize application more examples compatibility more Way, by changing framework layer identification code (in packet management service PackageMangerService, event management service Increase more example compatibility codes in the system services such as ActivityManagerService), support it is specific it is several application (wechat, QQ, footpath between fields footpath between fields, Taobao etc.) double examples.Mobile phone development business positioned at system development layer can be to being customized of android system Exploitation, on the premise of with system privileges, the double example compatibilities of specific implementation application to can be achieved on, second of application Example referred to as " is cloned " or " clone's application ".
It is the implementation of the specific embodiment of the invention below, it is necessary first to bag name and component statement are adapted to, it is this to do It is different that method and user oneself reach the way of " modification bag name " by changing the bag of application.The inventive method is intended to erection stage To " clone application " include bag name, a series of statements in AndroidManifest are adapted to so that in initial rank Another application in section clone using the necessary being that disguises oneself as.
Android applications of the present invention opens implementation method, and it includes step:In the former application startup of mobile terminal Afterwards, carry out cloning the startup of application;In ccf layer registration and store path are provided for clone's application;The clone applies should in original It is used as carrying out information communication with far-end server in host.
Specific description is done to the implementation process of the present invention so that wechat is applied as an example:
First to Content Provider ContentProvider adaptation, as shown in figure 1, illustrate the program to comprising A mounting adaptation process (being only illustrated that an adaptation fragment, not complete scheme) for ContentProvider application. Packet management service PackageManagerService can exist when application is installed to statement Content on AndroidManifest.xml is registered.Due to having existed for com.tencent.mm bag names originally, so Need exist for modifying to bag name.But only change bag name not enough, it there are if application is internal ContentProvider, then also need to uri (Uniform Resource Identifier, the Uniform Resource to them Identifier an adaptation) is carried out, otherwise clone applies can ask to apply originally when request ContentProvider, rather than clone apply the ContentProvider of itself, will ultimately result in:If should ContentProvider be it is derived and be allow it is all using free access, then clone application will have access to mistake Data, cause internal logic mistake;If the ContentProvider is non-derived, then clone's application will collapse.
Apply for clone, should be adapted to for accessing the ContentProvider of itself, shown during calling substantially It is intended to as shown in Figure 2.The sub-fraction content of technical solution of the present invention is simply illustrated above, and it is also in need right that the present invention realizes Other assemblies are adapted to.Its core thinking is that the local requests of Hook are adapted to another proxy requests, is then servicing Appropriate specially treated (be adapted to appropriately can be directly according to primary flow) is done to this kind of request in end, then hands to former flow Processing.
Adaptation about path:These paths include path of picture etc..The adaptation of this part is comparatively laborious, because Using inside think that they are primary paths always, so Load Image, dynamic base when do not process if very may be used It can be loaded under the catalogue of former application, because authority is not right, application crashes can be directly resulted in.So relevant picture path etc. Adaptation it is particularly important.
The inventive method also needs to dynamic modification bag name, the Bao Laida by changing application of this way and prior art Way to " modification bag name " is different.It is to applying " the distorting " of itself that user itself, which is changed using bag, is a kind of illegal act. This behavior can identify that feasibility is very low inside application.And dynamically modification comes from clone to the present invention on ccf layer " the bag name " of application, is by the primary android system code of modification " out-tricking " on ccf layer actually, allows it to think this Request is from an independent application, so as to reach " the legalizing " of clone's application.
Due to being the modification made in ccf layer, so being screened using itself being also impossible to make what effective judgement Oneself whether it is on earth " clone ".Therefore, the inventive method is feasible to pay particular attention to own when only realization The key code quoted to bag name is both needed to do one layer of processing, if missing a processing, then is likely to may result in clone and answers Collapse, or even influence the processing of normal use.
Because the inventive method only carries out " clone " to specific application or the application of special marking, even if code aspect has The impact that will not also cause to normal use is omitted, so program risk is relatively low, more suitable for being applied in practical programs.
Android applications of the present invention opens in implementation method, mobile terminal and storage medium implementation, it is not necessary to Customized modification is carried out to system, it is not necessary to system intervention and root authority are high to the compatibility of original application.Due to need not be to being System framework carry out it is any modification (modification be application program operation ccf layer), so its risk is very little, substantially It is risky all control it is inner in applying for oneself.In description of the invention hereafter can to it is " double to hold/hold more " out applications, Original application is different from, is designated as " clone quotes ".Hereafter the description to " double to open " can expand to " opening " more, i.e. support gram It is grand go out two or more applications.Strategy and demand are depended entirely on as how many specific to bottom clone, in this hair In bright technical scheme and it is not present technical difficult point.
Android applications of the present invention implementation method, mobile terminal and the storage mediums opened are realized based on the double of application realization more Evolution case, it is an application based on Android.Original application is referred to as " host ", and reason is most of data of clone's application, group Part details is responsible for adaptation by " host " or provided.For android system, the bag name of host is set to “com.tct.parallel”.It is as follows to implement details
Angle is realized from data, cloning the data of application needs to store, it is necessary first to apply allocation space for clone, be adapted to The demand of its own storage data.After common application is installed to android system, system can be its storage of distribution based on its application Space is deposited, typically in path:/ data/data/ [applying unique bag name]/.Creating the initial stage of clone's application, mobile terminal meeting Independent storage area is opened up for it in the storage catalogue of oneself, is applied using wechat as original, application is cloned based on host Citing is:/data/data/com.tct.parallel/com.tencent.mm-1/0.
It is in the storage path of mobile terminal itself:/ data/data/com.tct.parallel, the path are given for system The path of original application distribution.Implementation of the present invention may proceed to be created that form for " [the unique bag of original application below the catalogue Name]-[n-th more open example]/[user id] " catalogue, distribute to clone and apply the storage area independent as its.Such as the The clone of one wechat applies as com.tencent.mm-1, and second is then com.tencent.mm-2, and n-th is then com.tencent.mm-N.User Id, directly it is 0 typically not on the Android for supporting multi-user, if supporting other use Family, such as Guest, that can create 1,2 etc. more.
The Information Security of clone's application is realized, in technical solution of the present invention, as long as terminal device is not by root, number It is in the case where being protected by system mechanism according to storage, can not be peeped surreptitiously by the simply instrument such as adb, security can obtain System Computer The guarantee of system.Adb full name is Android Debug Bridge, exactly plays a part of debugging bridge., can by adb instruments With management equipment or the state of mobile phone simulator, many mobile phone operations can also be carried out, software, system upgrade, operation are such as installed Shell-command etc..Say in short, adb is exactly the bridge for connecting Android phone and PC ends, can allow user on computers Mobile phone is comprehensively operated.
Implementation method of the present invention in the method for the upper tetra- big components of support Android of clone's application is being serviced due to known The four of the in store all Android applications of the inner event management service ActivityManagerService of process (service end) are big Component includes event Activity, service Service, Content Provider ContentProvider and receiver Receiver's Record information, it is the inner four big module information examples recorded of AMS (ActivityManagerService) as shown in Figure 3, this is Its responsibility as a service end.When any one application request associated component, locally one can be initiated to service end Individual request, go to add, inquire about, change or delete some components oneself having permission to access.
When technical solution of the present invention starts an application in desktop, below scheme as shown in Figure 4 is substantially undergone: APP is registered from local corresponding A PP framework to AMS, after AMS confirms ok, the framework triggering clone event occurs.
Use of the clone's application of the present invention to original application code, is realized by following steps:One application of installation, The files such as the apk (AndroidPackage abbreviation, i.e. Android installation kits) of application can copy/data/app/ [applications to Unique bag name]/under, there is JNI's (Java Native Interface) can also decompress out dynamic base.Locally applied is not weigh Limit the file under access/data/app, then how it will load their apk to build clone's application
Android applications of the present invention implementation method, mobile terminal and the storage mediums opened register clone's application more in AMS Four big module informations, it is impossible to simply travel through the module information stated on the AndroidManifest.xml original application, so Afterwards traversing result with chapter and verse again toward re-registration on ActivityManagerService once because so will make Into repeated registration (conflict), component register is caused to fail.If AMS returns to request failure, then although the process of clone's application Get up, corresponding component will not also be loaded into initialization, can still cause clone to apply unsuccessful.
The inventive method must realize the Receiver of static registration by AMS calling, when application does not start, Their Receiver is not registered in AMS, so the broadcast required for them can not be received.Asked to solve this Topic, the present invention are applied when installation, state that the component in AndroidManifest.xml can all be noted after the system starts Volume is among AMS.
There are two important services in technical solution of the present invention, in service end, be packet management service respectively PackageManagerService (PMS) and event management service ActivityManagerService (AMS).The present invention The preferred embodiments for telling about the inventive method are used as by the use of original application Line.Start the Line of an original application, this hair first Bright mobile terminal is judged on PackageManagerService resolveIntent, observes the details of its calling, As shown in fig. 6, original application Line desktop entrance Intent processing procedures are realized, wherein, " jp.naver.line.android.activity.SplashActivity " is the one of " jp.naver.line.android " Individual desktop entrance.The code details of specific implementation are as follows:
As shown in fig. 6, in the processing routine of its original application, arrow 1:When clicking on Line in desktop, (unique bag name is " jp.naver.line.android ") when, desktop application will start one to AMS requests Entrance SplashActivitys of the jp.naver.line.android under;Arrow 2:AMS copies process and allowed Jp.naver.line.android applications initialize the SplashActivity of oneself;Arrow 3: The SplashActivity completions processing of jp.naver.line.android applications, SplashActivity has been reported to AMS Initialization finishes, and AMS formally saves application record.
In implementation method of the present invention, clone more complicated in the flow of application.First, the composition of host is as follows:
In AndroidManifest.xml, it can state to use all authorities that can be declared in android system. Because all clone's applications are all colonized in host, if not stating and successfully applying to all permissions first, then clone Using the service logic of authority operation its own corresponding to being impossible to obtain.So in this step, the present invention program can apply All authorities that can apply in the android system of complete corresponding version.
Secondly, several specific examples for example each 100 Activity, Service placeholder is stated.So-called " occupy-place Symbol ", actually 100 Activity are have registered to android system, but actual in host, corresponding to these Activity does not actually accomplish specific logic, and they are only to occupy a position, and the system AMS of allowing can be identified.It So to register 100, it is intended to (about) 100 clone's application/processes can be supported simultaneously, needed indeed according to specific application Will, the clone of varying number can be set to apply placeholder.
In android system of the present invention, host starts every time all can apply for authority to user, it is ensured that all permissions application Success.If user refuses to assign wherein some authority, host refuses to start, directly exited.So it is to ensure that clone should It can run, prevent because clone applies operation troubles caused by authority.
Per newly-built one, clone applies user in host, and host can go to travel through under the application by PMS The information such as the component that AndroidManifest.xml was stated, get up information cache.Specifically, host can ask startup one Individual " sky service ".So-called " sky service ", is exactly one " shell ", actually " shell " itself does not complete the thing of any practical significance Feelings, it is only occupy-place, marries again a Shell of request.Except host in itself, service background opens a new process again. How the present invention realizes that clone is correct using starting to restart the Line of clone's application to contrast, to illustrate Former application code entrance, it is as follows:
As shown in fig. 6, be that the present invention realizes the detailed process schematic diagram that clone's application is activated, wherein:
Arrow 1 in figure:When being clicked in desktop, " when clone applies Line ", desktop application will start to AMS requests Service.ServiceProxy $ P0 services under one host com.tct.multiagent;Arrow 2:Service broker P0 to AMS report initialization finishes;Arrow 3:Service broker P0 asks to start the client.ActivityProxy $ in application to AMS P0 active agents P0;Arrow 4,5:AMS, which sends out public notice, allows active agent P0 to start, and active agent P0 had previously been cached by obtaining Jp.naver.line.android.SplashActivity startup information after internal actual load and start up jp.naver.line.android.SplashActivity。
For system (service end), all are all simply started under a com.tct.multiagent Client.ActivityProxy $ P0Activity, but actually for terminal user, that it starts is Line, it is specific real Existing code is as follows, is the key code that host handles Activity:
From the graph it can be seen that have recorded the key message recorded in Fig. 6 in mType and resolvedType.Due to it The class for the Activity that will start is specified, intrinsic host is realized is passed to event agent this information ActivityProxy, agency is then allowed to go by applying the Starting mode for traveling through out in AndroidManifest.xml from former Start this and apply App Launcher.
As implied above realizes in code, and mClass indicates an ActivityProxy $ P0 class of intrinsic host, it It is Activity agency.As for P0, a process " P0 " in a host has actually been assigned to, it is as follows, It can be seen that the statement of this agency:
Process P0 is actually to clone one " host " using Line, and its intraware is hosted by P0.If at this moment Time restarts another clone's application, then process would is that P1, by that analogy, can start more clone's applications.But After process initialization, name can be changed into the process name of original application, such as Line will be “jp.naver.line.android”。
In client of the present invention, there are two crucial interface layers, one is exactly ActivityThread and local ActivityManagerNative.Processing to clone application component Activity is as follows, and which show break in P0 places Handler.dispatchMessage in host process, it can be seen that mComponent fields are “com.tct.multiagent.client.proxy.ActivityProxy$P0”:
Untill this step, the information at both ends or consistent.When flow is walked downward again, enter When mCallback.handleMessage, that find to enter is not ActivityThread.H.handleMessage, and It is the method for entering another in the object in host.
DispatchMessage flows as follows for Handler:
The n class handleMessage methods that flow enters com.tct.multiagent are:Host process passes through JAVA Reflex mechanism, being that the Handler objects of in store android.os skeleton codes have been substituted for what oneself was realized originally Handler, to filter the calling of all message, to handle script android.os frameworks thing to be processed.In other words, It is exactly in host process, the present invention replaces script by the JAVA reflex mechanism clone's application framework oneself realized Android.os frameworks.Implementation method of the present invention is created by common interface Context.createPackageContext () Jp.naver.line.android context ContextImpl.This crucial Context contains code, resource etc. It is interior etc. all jp.naver.line.android bags to realize.Then using this Context with can be created that Jp.naver.line.android SplashActivity.
Field in msg.obj.applicationInfo objects as follows, it is found that it is as follows it has had been replaced with Field, mComponent therein has been replaced by jp.naver.line.android, therefore script or intrinsic host " com.tct.multiagent.client.proxy.ActivityProxy $ P0 " calling have now becomes " jp.naver.line.android/jp.naver.line.android.activity.Spl ashActivity " calling:
MCallback of the invention by replacing ActivityThread, it make use of between service end and client both ends The endless Activity that clone's application is started into symmetrical mode of information.
As shown in fig. 7, present invention clone applies the starting pinciple schematic diagram in host, wherein example LBE Host (LBE:Local bio-emulator, code name when being inventor's exploitation) host process is represented, it initiates one to AMS please Ask, request starts " oneself " Activity A (ActivityProxy $ P0).Independent fortune is needed due to stating A components Row is in a process, so can ask a new process P0 to Zygote inside AMS.Treat that P0 starts to finish and return successfully Afterwards, AMS can send the Activity A (ActivityProxy $ P0) that instruction allows P0 to adjust intrinsic host.
After at this time P0 has grasped initiative, it should go to have adjusted Activity A (ActivityProxy $ P0) originally, But due to mCallback crucial in local client ccf layer by host to substituted for, flow is transferred to host's oneself again In method flow.The P0 processes of host are by changing the request sent from service end (information such as modification Intent), and let it be Start " the jp.naver.line.android/ of target jp.naver.line.android.activity.SplashActivity”.Finally, client is reported to service end AMS and started Success.
So for AMS, what it recorded is to have an ActivityProxy $ P0 component in P0, but actually P0 That it starts is " jp.naver.line.android/ jp.naver.line.android.activity.SplashActivity”。
Thus can essentially infer and draw " after this step of Load APK B ", " operation before Launch B.C ", Should be similar with ActivityThread.performLaunchActivity.It is explained above how the present invention notes in AMS The process of four big module informations of volume clone's application, and the wherein processing about Activity.Host is basic not to note to AMS About the Activity in clone's application, it employs the method modification local client of replacement (Hook), allows it have invoked volume Another Activity, therefore, for system and application, difference clone application and original application are all difficult to, thus can be with Realize more open shops of clone's application.
The inventive method also realizes the code for referring to original application by createPackageContext loading codes, As follows, host have invoked createPackageContext and go to create Line context:
By consulting API documents, the interface can even not have to the APK of any authority can loading other application Bag, including its code segment is loaded, as long as there is the Context cans of other side.
As it appears from the above, it is the generation that createPackageContext of the present invention can be put into LoadedApk in mPackages Code realizes that wherein Context is just in LoadedApk objects.As long as create later relevant " jp.naver.line.android " Related component, directly invokes Android and discloses interface, and its flow can be found correspondingly in mPackages automatically Component corresponding to LoadedApk establishments.
To realize the separate storage of clone's application data, the inventive method also reaches data storage by changing dataDir Independent, as follows, the amended msg.obj objects schematic diagram with original application:
Wherein mComponent is replaced by shown in foregoing Handler dispatchMessage flow codes In jp.naver.line.android flows, msg.obj.dataDir is modified as by JAVA reflex mechanism by "/data/ Data/com.tct.multiagent-1/0/jp.naver.line.android " and the not "/data/ of original application data/jp.naver.line.android”.Implementation method of the present invention is by changing this field, to reach clone's application Data are stored in the purpose under oneself catalogue.
Meanwhile the present invention is also locally transferring Activity, Service, Broadcast, ContentProvier tetra- Component;During host process of the present invention must be shown in the dispatchMessage flow codes in foregoing Handler, script The local agent of multiple key services such as ActivityMangerNative, PackageManagerNative, alternative costs hair The bright agency oneself to be realized.The local key service oneself to be realized of the invention is acted on behalf of shown in the following code segment of way, can be with For realizing that customized local ActivityManagerNative components, PackageManagerNative etc. are multiple The local agent of key service is all realized in this mode, then replaces the original corresponding with service of local, and original Agency save --- because they it is wherein in store with real service processes in the communication for service such as AMS, PMS weight Binder channels are wanted, the present invention needs to be communicated with these Binder with service end:
The implementation process of other 3 components of the invention substantially similarly, repeats no more here with the flow of above-mentioned event handling.
The present invention realizes the Android applications mobile terminals for opening implementation method more, as shown in figure 8, including processor 10, and the memory 20 being connected with the processor 10, the memory 20 is stored with that Android applications opens realization processing Program, Android applications opens and realizes and realize following steps when processing routine is performed by the processor 10:In mobile terminal After original application starts, clone the startup of application;In ccf layer registration and store path are provided for clone's application;Described gram Grand apply carries out information communication as in host in original application with far-end server.
Android application opens when realizing processing routine by the computing device, also realizes following steps:It is described Clone's application also includes before starting, and all must apply for authority to user when original application starts as host;If user refuses to assign Wherein some authority, then host's refusal startup.Open of Android applications realizes processing routine by the computing device more When, also realize following steps:With original application for host, storage to system is former application distribution in the storage path of clone's application In memory space.
The invention also discloses a kind of storage medium, the storage medium is stored with Android applications and opens realization processing more Program, open of Android applications realize that realizing that the foregoing Android applications when processing routine is executed by processor opens reality more Existing method.
Android applications of the present invention are opened implementation method, mobile terminal and storage medium more and passed through on mobile terminals Operated in the host of setting, realize that same application open more, realized from ccf layer, all without making for application and system Into chaotic or misleading collapse, the execution opened program, application originally can't be influenceed can be securely achieved, its realization is more simple more It is single feasible.It should be appreciated that the application of the present invention is not limited to above-mentioned citing, for those of ordinary skills, can To be improved or converted according to the above description, all these modifications and variations should all belong to the guarantor of appended claims of the present invention Protect scope.

Claims (10)

1. a kind of Android applications opens implementation method, it is characterised in that including:
After the former application of mobile terminal starts, clone the startup of application;
In ccf layer registration and store path are provided for clone's application;
The clone applies carries out information communication as in host in original application with far-end server.
2. Android applications according to claim 1 opens implementation method, it is characterised in that clone's application startup It is preceding also to include:
All it must apply for authority to user when original application starts as host;If user refuses to assign wherein some authority, host Refusal starts.
3. Android applications according to claim 1 opens implementation method, it is characterised in that the startup of clone's application Step also includes:
The storage path of clone's application, for host, is stored in the memory space distributed to system for former application with original application.
4. Android applications according to claim 3 opens implementation method, it is characterised in that the startup of clone's application Include event Activity, service Service, Content Provider ContentProvider and receiver Receiver correspondence Start from the request at remote service end.
5. Android applications according to claim 4 opens implementation method, it is characterised in that the startup of clone's application Including step:
Several events Activity is stated in Android original applies host, services Service placeholder, for being The AMS that unites is identified;
Per newly-built one, clone applies user in host, and host can go to travel through under the application by PMS The information such as the component that AndroidManifest.xml was stated, get up information cache;
Carry out cloning the startup and operation of application in android system.
6. Android applications according to claim 5 opens implementation method, it is characterised in that the startup of clone's application Also include:
Host asks to start an empty service;
Except host in itself, service background is opened for a corresponding new process.
A kind of 7. mobile terminal, it is characterised in that including processor, and the memory being connected with the processor,
The memory storage has open of Android applications to realize processing routine more, and open of Android applications realizes processing routine more Following steps are realized during by the computing device:
After the former application of mobile terminal starts, clone the startup of application;
In ccf layer registration and store path are provided for clone's application;
The clone applies carries out information communication as in host in original application with far-end server.
8. mobile terminal according to claim 7, it is characterised in that open of Android applications realizes processing routine quilt more During the computing device, following steps are also realized:
Clone's application also includes before starting:
All it must apply for authority to user when original application starts as host;If user refuses to assign wherein some authority, host Refusal starts.
9. mobile terminal according to claim 7, it is characterised in that open of Android applications realizes processing routine quilt more During the computing device, following steps are also realized:
The storage path of clone's application, for host, is stored in the memory space distributed to system for former application with original application.
A kind of 10. storage medium, it is characterised in that the storage medium is stored with open of Android applications more and realizes processing routine, Android applications opens and realizes and realize that any one of the claim 1-6 Android should when processing routine is executed by processor With the step of opening implementation method more.
CN201710879961.8A 2017-09-26 2017-09-26 Android application multi-open implementation method, mobile terminal and storage medium Active CN107665302B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201710879961.8A CN107665302B (en) 2017-09-26 2017-09-26 Android application multi-open implementation method, mobile terminal and storage medium
PCT/CN2018/107691 WO2019062771A1 (en) 2017-09-26 2018-09-26 Method for enabling multiple instances of one android application to be opened, mobile terminal, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710879961.8A CN107665302B (en) 2017-09-26 2017-09-26 Android application multi-open implementation method, mobile terminal and storage medium

Publications (2)

Publication Number Publication Date
CN107665302A true CN107665302A (en) 2018-02-06
CN107665302B CN107665302B (en) 2022-01-11

Family

ID=61097619

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710879961.8A Active CN107665302B (en) 2017-09-26 2017-09-26 Android application multi-open implementation method, mobile terminal and storage medium

Country Status (2)

Country Link
CN (1) CN107665302B (en)
WO (1) WO2019062771A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019062771A1 (en) * 2017-09-26 2019-04-04 惠州Tcl移动通信有限公司 Method for enabling multiple instances of one android application to be opened, mobile terminal, and storage medium
CN112825072A (en) * 2019-11-21 2021-05-21 青岛海信移动通信技术股份有限公司 Communication terminal and data sharing method
CN112836208A (en) * 2019-11-25 2021-05-25 英业达科技有限公司 Multiple login system and method for same user
CN113051122A (en) * 2019-12-26 2021-06-29 百度在线网络技术(北京)有限公司 Performance data acquisition method, performance data acquisition device, electronic equipment and medium
CN117234543A (en) * 2023-11-10 2023-12-15 亿咖通(湖北)技术有限公司 Application installation method, device and equipment based on multi-application running

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112379968B (en) * 2020-11-13 2024-07-23 网易(杭州)网络有限公司 Method, device, equipment and storage medium for applying multiple openings
CN117093351B (en) * 2023-10-13 2024-02-02 亿咖通(湖北)技术有限公司 Application multi-opening method, device, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104199734A (en) * 2014-09-12 2014-12-10 上海斐讯数据通信技术有限公司 Android smart terminal based application multi-run management method and system
CN105224322A (en) * 2015-09-25 2016-01-06 维沃移动通信有限公司 A kind of attend to anything else method and terminal of application program
CN105843668A (en) * 2016-03-11 2016-08-10 北京奇虎科技有限公司 Derived process staying-resident method, derived program generating method and corresponding device
CN106066803A (en) * 2016-05-25 2016-11-02 北京奇虎科技有限公司 Application program runs the method and device controlled
CN106227588A (en) * 2016-07-21 2016-12-14 北京奇虎科技有限公司 The creation method of a kind of multi-instance object, device and mobile terminal

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8656353B2 (en) * 2012-03-09 2014-02-18 User-Friendly Phone Book, L.L.C. Mobile application generator
CN106445647B (en) * 2016-10-10 2019-08-02 Oppo广东移动通信有限公司 Open the data manipulation method, device and mobile terminal of application more
CN106445612B (en) * 2016-10-10 2020-03-10 Oppo广东移动通信有限公司 Method and device for opening application and mobile terminal
CN107665302B (en) * 2017-09-26 2022-01-11 惠州Tcl移动通信有限公司 Android application multi-open implementation method, mobile terminal and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104199734A (en) * 2014-09-12 2014-12-10 上海斐讯数据通信技术有限公司 Android smart terminal based application multi-run management method and system
CN105224322A (en) * 2015-09-25 2016-01-06 维沃移动通信有限公司 A kind of attend to anything else method and terminal of application program
CN105843668A (en) * 2016-03-11 2016-08-10 北京奇虎科技有限公司 Derived process staying-resident method, derived program generating method and corresponding device
CN106066803A (en) * 2016-05-25 2016-11-02 北京奇虎科技有限公司 Application program runs the method and device controlled
CN106227588A (en) * 2016-07-21 2016-12-14 北京奇虎科技有限公司 The creation method of a kind of multi-instance object, device and mobile terminal

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019062771A1 (en) * 2017-09-26 2019-04-04 惠州Tcl移动通信有限公司 Method for enabling multiple instances of one android application to be opened, mobile terminal, and storage medium
CN112825072A (en) * 2019-11-21 2021-05-21 青岛海信移动通信技术股份有限公司 Communication terminal and data sharing method
CN112825072B (en) * 2019-11-21 2023-02-17 青岛海信移动通信技术股份有限公司 Communication terminal and data sharing method
CN112836208A (en) * 2019-11-25 2021-05-25 英业达科技有限公司 Multiple login system and method for same user
CN113051122A (en) * 2019-12-26 2021-06-29 百度在线网络技术(北京)有限公司 Performance data acquisition method, performance data acquisition device, electronic equipment and medium
CN113051122B (en) * 2019-12-26 2023-09-15 百度在线网络技术(北京)有限公司 Performance data acquisition method, device, electronic equipment and medium
CN117234543A (en) * 2023-11-10 2023-12-15 亿咖通(湖北)技术有限公司 Application installation method, device and equipment based on multi-application running
CN117234543B (en) * 2023-11-10 2024-02-13 亿咖通(湖北)技术有限公司 Application installation method, device and equipment based on multi-application running

Also Published As

Publication number Publication date
WO2019062771A1 (en) 2019-04-04
CN107665302B (en) 2022-01-11

Similar Documents

Publication Publication Date Title
CN107665302A (en) A kind of Android applications opens implementation method, mobile terminal and storage medium
US11848982B2 (en) Access services in hybrid cloud computing systems
US20200120082A1 (en) Techniques for securing credentials used by functions
US10467386B2 (en) Software development and deployment in multiple environments
KR101343258B1 (en) 3 secure and stable hosting of third-party extensions to web services
US10152211B2 (en) Application delivery agents on virtual desktop instances
Jeon et al. Dr. Android and Mr. Hide: fine-grained permissions in android applications
US7770185B2 (en) Interceptor method and system for web services for remote portlets
US10530775B2 (en) Usage tracking in hybrid cloud computing systems
CN102546788B (en) Cloud platform management method and cloud platform
US20060195816A1 (en) Methods and systems for implementing on-line financial institution services via a single platform
CN108491216A (en) A kind of method of android system unaware application installation upgrading
GB2413407A (en) Software distribution from a computer on which the software is installed
JP5543010B1 (en) Login request apparatus and method for requesting login to predetermined server, and program used therefor
US20230061228A1 (en) Managing shared applications at the edge of a content delivery network
US7200860B2 (en) Method and system for secure network service
US20100318967A1 (en) Supplementary deployment actions
CN110045998A (en) Load the method and device of dynamic base
Khare Apache Tomcat 7 Essentials
US20060047755A1 (en) System and method for managing connections
CN112835677A (en) Sandbox-based inherent data protection method and system
Sekar et al. Avoidance of security breach through selective permissions in android operating system
EP1810133A2 (en) Methods and systems for implementing on-line financial institution services via a single platform
JP2015122049A (en) Log-in request device which issues log-in request to predetermined server, method, and program used therefor
Pettersen et al. Dynamically Loading Mobile/Cloud Assemblies

Legal Events

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