CN108958785A - A kind of application program updating method and device - Google Patents
A kind of application program updating method and device Download PDFInfo
- Publication number
- CN108958785A CN108958785A CN201710366234.1A CN201710366234A CN108958785A CN 108958785 A CN108958785 A CN 108958785A CN 201710366234 A CN201710366234 A CN 201710366234A CN 108958785 A CN108958785 A CN 108958785A
- Authority
- CN
- China
- Prior art keywords
- android
- bridge
- application program
- specified
- server
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
- Stored Programmes (AREA)
Abstract
The embodiment of the invention provides a kind of application program updating method and devices, are implemented in the application program of terminal local.On the one hand, the embodiment of the present invention updates detection request by sending to server;The server is received according to the download address for updating detection request and returning;According to the download address, downloading request is sent to the server;Receive the specified more new information that the server is returned according to the downloading request;Obtain specified more new information;To enable the command analysis device running environment of Android debugging bridge by calling specified order;And then in the command analysis device running environment of Android debugging bridge, the upgrading of the application program is carried out based on the specified more new information.Technical solution provided in an embodiment of the present invention reduces the version degree of fragmentation of application program, and avoids cumbersome updating operation process, improves upgrading efficiency.
Description
[technical field]
The present invention relates to field of computer technology more particularly to a kind of application program updating method and devices.
[background technique]
As IOS, Android etc. are applied to the rapid development of the intelligent operating system of electronic equipment, application program
(Application, APP) is also being developed rapidly.APP is generally referred to as the third-party application journey being mounted in intelligent operating system
Sequence.Currently, the third party application for being mounted on electronic equipment needs to carry out upgrading update in order to meet the needs of various aspects.
Used upgrading scheme is in the prior art, when application program detects the presence of more new information, to user into
Row prompt when the user clicks when respective keys triggering upgrading, can just download more new information and be upgraded based on more new information.So
And if user does not click respective keys, it will result in the early version of application program there is still a need for safeguarding, cause using journey
The version degree of fragmentation of sequence is relatively high.Moreover, user, which needs to be implemented specified operation, just can be carried out upgrading, and it is cumbersome, cause
The upgrading efficiency of application program is relatively low.
[summary of the invention]
In view of this, reducing application program the embodiment of the invention provides a kind of application program updating method and device
Version degree of fragmentation, and avoid cumbersome updating operation process, improve upgrading efficiency.
On the one hand, the embodiment of the invention provides a kind of application program updating methods, are implemented in the application journey of terminal local
In sequence;Include:
It is sent to server and updates detection request;
The server is received according to the download address for updating detection request and returning;
According to the download address, downloading request is sent to the server;
Receive the specified more new information that the server is returned according to the downloading request;
By calling specified order, the command analysis device running environment of Android debugging bridge is enabled;
In the command analysis device running environment of Android debugging bridge, answered described in the progress of more new information based on described specify
With the upgrading of program.
The aspect and any possible implementation manners as described above, it is further provided a kind of implementation is referred to by calling
Fixed order enables the command analysis device running environment of Android debugging bridge, comprising:
By calling Android to debug the enable command of bridge, operation Android debugs bridge;
In the case where Android debugs bridge operating status, by calling Android to debug bridge bind command, establish and the application program
Connection in the electronic equipment of place between designated equipment;Wherein, the designated equipment is the order of the carrying Android debugging bridge
The equipment of resolver running environment.
The aspect and any possible implementation manners as described above, it is further provided a kind of implementation, in the Android
In the command analysis device running environment for debugging bridge, before the upgrading that the application program is carried out based on the specified more new information,
Further include:
Order is obtained by calling Android to debug bridge device, obtains connected device information;
Judge the connected device information whether include the designated equipment information;
When the connected device information includes the information of the designated equipment, the life in Android debugging bridge is executed
The step of enabling in resolver running environment, the upgrading of the application program carried out based on the specified more new information.
The aspect and any possible implementation manners as described above, it is further provided a kind of implementation, in the Android
In the command analysis device running environment for debugging bridge, the upgrading of the application program is carried out based on the specified more new information, comprising:
In the command analysis device running environment of Android debugging bridge, by calling installation order, set in described specify
The standby middle load specified more new information.
The aspect and any possible implementation manners as described above, it is further provided a kind of implementation receives the clothes
When being engaged in device according to the specified more new information for downloading request return, further includes: receive the check information that the server returns;
By calling specified order, before the command analysis device running environment for enabling Android debugging bridge, further includes:
Based on the check information, the specified more new information is verified;
When passed the verification, it executes by calling specified order, enables the command analysis device running environment of Android debugging bridge
The step of.
In another aspect, being set to the application of terminal local the embodiment of the invention provides a kind of application program updating device
In program;Include:
Transmission unit updates detection request for sending to server;
Receiving unit, for receiving the server according to the download address for updating detection request and returning;
The transmission unit, is also used to according to the download address, sends downloading request to the server;
The receiving unit is also used to receive the specified more new information that the server is returned according to the downloading request;
Environment acquiring unit, for enabling the command analysis device running environment of Android debugging bridge by calling specified order;
Upgrading processing unit, for being specified based on described in the command analysis device running environment of Android debugging bridge
More new information carries out the upgrading of the application program.
The aspect and any possible implementation manners as described above, it is further provided a kind of implementation, the environment obtain
Unit is taken, is specifically used for:
By calling Android to debug the enable command of bridge, operation Android debugs bridge;
In the case where Android debugs bridge operating status, by calling Android to debug bridge bind command, establish and the application program
Connection in the electronic equipment of place between designated equipment;Wherein, the designated equipment is the order of the carrying Android debugging bridge
The equipment of resolver running environment.
The aspect and any possible implementation manners as described above, it is further provided a kind of implementation, the environment obtain
Unit is taken, is specifically also used to:
Order is obtained by calling Android to debug bridge device, obtains connected device information;
Judge the connected device information whether include the designated equipment information;
When the connected device information includes the information of the designated equipment, triggers the upgrading processing unit and execute
In the command analysis device running environment of Android debugging bridge, the application program is carried out based on the specified more new information
Upgrading.
The aspect and any possible implementation manners as described above, it is further provided a kind of implementation, at the upgrading
Unit is managed, is specifically used for: in the command analysis device running environment of Android debugging bridge, by calling installation order, in institute
It states and loads the specified more new information in designated equipment.
The aspect and any possible implementation manners as described above, it is further provided a kind of implementation, the reception are single
Member is also used to receive the check information that the server returns;
Described device further include:
Information checking unit verifies the specified more new information for being based on the check information;And when verification
By when, triggering environment acquiring unit is executed by calling specified order, and the command analysis device for enabling Android debugging bridge runs ring
Border.
In another aspect, the embodiment of the invention also provides a kind of computer-readable mediums, comprising: computer is executable to be referred to
It enables, executes following steps when the computer executable instructions are run:
It is sent to server and updates detection request;
The server is received according to the download address for updating detection request and returning;
According to the download address, downloading request is sent to the server;
Receive the specified more new information that the server is returned according to the downloading request;
By calling specified order, the command analysis device running environment of Android debugging bridge is enabled;
In the command analysis device running environment of Android debugging bridge, answered described in the progress of more new information based on described specify
With the upgrading of program.
A technical solution in above-mentioned technical proposal has the following beneficial effects:
In the embodiment of the present invention, the application program of terminal local obtains specified update and believes by interacting with server
Breath, and after obtaining specified more new information, by calling specified order, the command analysis device for enabling Android debugging bridge runs ring
Border, and then in the command analysis device running environment of Android debugging bridge, it is answered described in the progress of more new information based on described specify
With the upgrading of program;After command analysis device running environment due to getting Android debugging bridge, so that it may there is permission, so as to
To realize automatic upgrading.The automatic upgrading scheme can not need user and click respective keys triggering upgrading, therefore can be to avoid
The problem of maintenance is still needed to as early version that user does not click application program brought by respective keys, thus to a certain extent
The version degree of fragmentation for reducing application program, to reduce maintenance cost to a certain extent.In addition, due to avoiding
User clicks respective keys, may be implemented to simplify updating operation, to improve the upgrading efficiency of application program.
[Detailed description of the invention]
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be to needed in the embodiment attached
Figure is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for this field
For those of ordinary skill, without creative efforts, it can also be obtained according to these attached drawings other attached drawings.
Fig. 1 is the flow diagram of application program updating method provided by the embodiment of the present invention;
Fig. 2 is another flow diagram of application program updating method provided by the embodiment of the present invention;
Fig. 3 is the flow diagram of the embodiment of step 105 provided by the embodiment of the present invention;
Fig. 4 is the flow diagram of the embodiment of step 302 provided by the embodiment of the present invention;
Fig. 5 is that application program provided by the embodiment of the present invention interacts the process signal for realizing upgrade package downloading with server
Figure;
Fig. 6 is the flow diagram of the installation of application program updating packet provided by the embodiment of the present invention;
Fig. 7 is the functional block diagram of application program updating device provided by the embodiment of the present invention;
Fig. 8 is another functional block diagram of application program updating device provided by the embodiment of the present invention.
[specific embodiment]
For a better understanding of the technical solution of the present invention, being retouched in detail to the embodiment of the present invention with reference to the accompanying drawing
It states.
It will be appreciated that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Base
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts it is all its
Its embodiment, shall fall within the protection scope of the present invention.
The term used in embodiments of the present invention is only to be not intended to be limiting merely for for the purpose of describing particular embodiments
The present invention.In the embodiment of the present invention and the "an" of singular used in the attached claims, " described " and "the"
It is also intended to including most forms, unless the context clearly indicates other meaning.
It should be appreciated that term "and/or" used herein is only a kind of incidence relation for describing affiliated partner, indicate
There may be three kinds of relationships, for example, A and/or B, can indicate: individualism A, exist simultaneously A and B, individualism B these three
Situation.In addition, character "/" herein, typicallys represent the relationship that forward-backward correlation object is a kind of "or".
Depending on context, word as used in this " if " can be construed to " ... when " or " when ...
When " or " in response to determination " or " in response to detection ".Similarly, depend on context, phrase " if it is determined that " or " if detection
(condition or event of statement) " can be construed to " when determining " or " in response to determination " or " when the detection (condition of statement
Or event) when " or " in response to detection (condition or event of statement) ".
When triggering upgrading for the key when the user clicks in the presence of the prior art, the update of application program can be just obtained
Information is simultaneously upgraded, and the version degree of fragmentation of bring application program is relatively high and relatively low this of upgrading efficiency
Class problem, the embodiment of the invention provides corresponding resolving ideas: after getting the specified more new information of application program, leading to
Calling designated order is crossed, the command analysis device running environment of Android debugging bridge is enabled, in the command analysis device fortune of Android debugging bridge
In row environment, the upgrading of application program is carried out based on the specified more new information.This upgrading mode can not need user's triggering
It could upgrade, the automatic upgrading of application program may be implemented, so as to realize the experience of silent upgrading.
Under the guidance of the thinking, the embodiment of the invention provides following feasible embodiments.
The embodiment of the present invention provides a kind of application program updating method, is implemented in the application program of terminal local.It please join
Fig. 1 is examined, is the flow diagram of application program updating method provided by the embodiment of the present invention, as shown in Figure 1, this method packet
Include following steps:
101, it is sent to server and updates detection request.
102, the download address that server is returned according to detection request is updated is received.
103, according to download address, downloading request is sent to server.
104, the specified more new information that server is returned according to downloading request is received.
105, by calling specified order, the command analysis device running environment of Android debugging bridge is enabled.
106, in the command analysis device running environment of Android debugging bridge, application program is carried out based on specified more new information
Upgrading.
Application program involved in the embodiment of the present invention can be mounted in the third party application on electronic equipment.It needs
It is noted that electronic equipment involved in the embodiment of the present invention can include but is not limited to radio hand-held equipment, plate electricity
Brain, mobile phone, smart television, smart television box etc. use the smart machine of Android operation system.
For the realization of step 101, the embodiment of the present invention there is provided herein following feasible embodiment.
In a kind of feasible embodiment, application program (such as application program after actuation or when meeting other conditions
When reaching given time in the process of running), it can be sent to server and update detection request, to realize upgrading detection.Wherein,
The current version information of the application program can be carried by updating detection request.It should be noted that as described herein apply journey
It is for example, being not intended to restrict the invention embodiment that sequence, which sends the condition met required for updating detection request to server,
Embodiment.
For the realization of step 102, the embodiment of the present invention there is provided herein following feasible embodiment.
It can be with pre-configured escalation policy in server.For example, when the version information of application program is 1.0, it is corresponding
Escalation policy is mandatory upgrade, and when the version information of application program is non-1.0 (such as 1.9 and 2.0), corresponding escalation policy is
Recommend upgrading.
In a kind of feasible embodiment, after server receives the update detection request of application program transmission, by it
The current version information of the application program of carrying is compared with the latest version information of the application program, if unanimously, explanation
The application program has been latest edition, does not need to be updated, that is to say, that there is no specified more new information, server to
Application program, which returns, updates detection response, and update detection response carries the instruction for not needing to be updated.
, whereas if it is inconsistent, illustrate that application program needs are updated, that is to say, that there is specified more new information.
The embodiment of the present invention is applied to recommend under upgrading scene, therefore server is believed according to the current version that detection request carries is updated
Breath judges whether its corresponding escalation policy is to recommend upgrading, and if it is upgrading is recommended, server generates upgrade information, the liter
Grade information may include the download address and check information of specified more new information.
Further, the upgrade information of generation is sent to application program by updating detection response by server.In this way, answering
It can receive with program when there is specified more new information, the specified more new information that server is returned according to detection request is updated
Download address.
In a kind of feasible embodiment, server can use assignment algorithm and carry out operation to specified more new information,
Operation result is obtained, is sent to application program for the operation result as the check information.For example, the assignment algorithm can wrap
It includes but is not limited to Message Digest 5 (such as Message Digest Algorithm 5 or Message Digest 5 fourth edition) or Hash is calculated
Method etc., the embodiment of the present invention to this without being particularly limited to, but need it is consensus in application program and server in advance,
Both sides use identical algorithm.
For example, specifying more new information involved in the embodiment of the present invention can be the upgrade package of application program.
For the realization of step 103, the embodiment of the present invention there is provided herein following feasible embodiment.A kind of feasible
Embodiment in, application program receive server return update detection response after, from the update detection response in extract
Then upgrade information parses upgrade information, obtain the download address and check information of specified more new information.
Further, after the download address for obtaining specified more new information, application program sends downloading request to server,
Downloading request can carry the download address of specified more new information, and specified more new information is obtained from server to request.
For the realization of step 104, the embodiment of the present invention there is provided herein following feasible embodiment.
In a kind of feasible embodiment, after server receives the downloading request of application program transmission, according to downloading
The download address of the specified more new information carried in request obtains specified more new information, then passes through the specified more new information
Downloading response return to application program, in this way, application program can receive server according to downloading request return it is specified more
New information realizes acquisition of the application program to specified more new information.
In a kind of feasible embodiment, as shown in Fig. 2, can also include: before step 105
105A, check information is obtained.
The embodiment that application program obtains check information can be no longer superfluous here with reference to the associated description in step 102
It states.
105B, it is based on the check information, the specified more new information is verified;And when passed the verification, it holds
The step of row is by calling specified order, enabling the command analysis device running environment of Android debugging bridge (i.e. step 105).
In a kind of feasible embodiment, application program is being executed after getting specified more new information based on finger
Before more new information is upgraded calmly, need first to verify based on integrality of the check information to specified more new information.
In a kind of specific embodiment, application program is utilized and identical algorithm used in server side, docking
The specified more new information received carries out operation, obtains operation result, and using the operation result as locally-available check information.
Then, the obtained check information after itself operation is compared application program with the check information received from server,
If two check informations are consistent, illustrate that the specified more new information received from server is completely, to determine that verification passes through, so
Step 105 is executed afterwards.
Opposite, if two check informations are inconsistent, illustrate that the specified more new information received from server is endless
It is whole, determine verification not over.Further, when verification not over when, can be downloaded again from server and specified update letter
Breath, then executes the verification that step 105B re-starts integrality again.
For the realization of step 105, the embodiment of the present invention there is provided herein following feasible embodiment.As shown in figure 3,
Include:
301, by calling Android to debug the enable command of bridge, operation Android debugs bridge.
It should be noted that when there is application program Android to debug bridge (Android Debug Bridge, ADB) permission
When, it is just capable of calling the related command of Android debugging bridge, therefore, application program needs first to start Android debugging bridge, debugs Android
Bridge enters operating status.
In the embodiment of the present invention, in order to enable applications to call the enable command and Android debugging bridge of Android debugging bridge
Related command, need by these order configuration realize application program code in, in this way, application program can be in specified item
These orders are run under part.
It in a kind of feasible embodiment, is downloaded when application program from server and specifies more new information, and this is specified more
After new information passes through completeness check, application program can open Android tune by calling Android to debug the enable command of bridge
Try bridge.
For example, the enable command of Android debugging bridge can be with are as follows: #start adbd, that is, application program can pass through tune
Start Android debugging bridge with #start adbd, Android debugging bridge is made to enter operating status.
It should be noted that if can successfully open Android debugging bridge by calling Android to debug the enable command of bridge,
The subsequent related command that can call Android debugging bridge.If do not succeeded by calling Android to debug the enable command of bridge
It opens Android and debugs bridge, it is impossible to call the related command of Android debugging bridge.Further, when by calling Android to debug bridge
Enable command when not opening Android debugging bridge successfully, can repeat the start command for calling Android debugging bridge, again attempt to out
Android debugging bridge is opened, until when successfully opening Android debugging bridge.Alternatively, can also be in advance peace in the embodiment of the present invention
The start command of Zhuo debugging bridge configures corresponding repetition and calls threshold value, when the enable command by calling Android debugging bridge, does not have
When Android debugging bridge is opened in success, the start command of Android debugging bridge can be called repeatedly, still, if call number reaches this
It repeats to call threshold value, then stops calling process, terminate process.
302, in the case where Android debugs bridge operating status, the Android tune is enabled by the related command for calling Android to debug bridge
Try the command analysis device running environment of bridge.
For the realization of step 302, the embodiment of the present invention there is provided herein following feasible embodiment.As shown in figure 4,
Include:
401, it in the case where Android debugs bridge operating status, by calling Android to debug bridge bind command, establishes and the application
Connection where program in electronic equipment between designated equipment;Wherein, the designated equipment is to hold to carry the Android debugging bridge perhaps
Command analysis device running environment equipment.
It should be noted that establish and application program the connection between the designated equipment in the electronic device, be in order to
Obtain the command analysis device running environment of Android debugging bridge.It is also understood that if being successfully established and application program place
Connection in electronic equipment between designated equipment is equivalent to get the command analysis device running environment of Android debugging bridge.
Explanation is needed further exist for, under the command analysis device running environment of Android debugging bridge, executes installation order
When just there is installation permission, can realize the automatic upgrading of application program, and when realizing the automatic upgrading of application program, together
When can be realized the complete upgrading of application program, rather than part upgrades.Opposite, if not getting the life of Android debugging bridge
Resolver running environment is enabled, permission is also just fitted without, if calling installation order, operating system can detect whether there is power
Limit, if without permission, it will installation order failure is called, so as to cause the automatic upgrading that cannot achieve application program and completely
Upgrading.When not having permission, other upgrading modes can only be used, such as the passive upgrading of application program, i.e., after user's triggering
It could upgrade, alternatively, can only upgrade to part of module when to realizing automatic upgrading, not can be carried out complete upgrading.
In addition, it is necessary to which explanation is equivalent to electronic equipment after obtaining the command analysis device running environment that Android debugs bridge
Designated mode is entered, the upgrading of application program is carried out under the command analysis device running environment of Android debugging bridge, in electronics
When equipment is in other modes, the upgrading is equally effective.
In a kind of feasible embodiment, Android debugs bridge bind command can be with are as follows: #adb connect (designated equipment
Address), that is, application program can by call #adb connect (address of designated equipment), request establish with it is described
Connection where application program in electronic equipment between designated equipment.
In the embodiment of the present invention, above-mentioned designated equipment holds the command analysis device operation ring for carrying the Android debugging bridge perhaps
The equipment in border, can be for using the simulator in the electronic equipment of Android operation system.
In a kind of feasible embodiment, Android debugs bridge bind command can be with are as follows: #adb
Connect172.0.0.1, that is, application program can request to establish by call instruction #adb connect 172.0.0.1
With the application program the connection between each simulator in the electronic device, wherein the order solution comprising carrying Android debugging bridge
The simulator of parser running environment.
Alternatively, in another feasible embodiment, if the command analysis device running environment of carrying Android debugging bridge
The port numbers of simulator are 5555, and Android debugs bridge bind command can be with are as follows: #adb connect172.0.0.1:5555,
That is, application program can request to establish and the application program by call instruction #adb connect 172.0.0.1:5555
The connection between the simulator in the electronic device.
It should be noted that the address 172.0.0.1 for including in Android debugging bridge bind command is the address of electronic equipment,
When including the address in the Android debugging bridge bind command of application call, expression is wanted to set up respectively to be set with the electronic equipment
Standby connection, wherein containing above-mentioned designated equipment.The address 172.0.0.1 for including in Android debugging bridge bind command and port
Number when, application call Android debug bridge bind command, expression want to set up it is corresponding with the port numbers in the electronic equipment
The connection of equipment.Therefore, it can be realized by the debugging bridge bind command of above two Android and be built between trial and designated equipment
Vertical connection.
402, order is obtained by calling Android to debug bridge device, obtains connected device information.
403, judge the connected device information whether include the designated equipment information, if it is execute 404, such as
Fruit is no, executes 401.
404, it when the connected device information includes the information of the designated equipment, executes and debugs bridge in the Android
Command analysis device running environment in, the step of upgrading of the application program is carried out based on the specified more new information.
It should be noted that above-mentioned calling Android debugs bridge bind command, it is an attempt to establish between above-mentioned designated equipment
Connection, but it is whether that successful connection is not aware that, therefore, application program can also be further by calling Android to debug bridge device
Order is obtained, connected device information is obtained, believes in the connected device information comprising being successfully established each equipment of connection
Breath.Further, according to the connected device information, whether the connection between detection and the designated equipment is successfully established.Specifically
, if in the connected device information include the information of above-mentioned designated equipment, it is believed that with the connection between the designated equipment
It is successfully established, that is, successfully getting the command analysis device running environment of Android debugging bridge, then can be carried out application program
Upgrading, i.e., execution step 103.
Opposite, if there is no the information comprising above-mentioned designated equipment in the connected device information, it is believed that refer to this
Failure is established in connection between locking equipment, does not get the command analysis device running environment of Android debugging bridge, application program is also
It can repeat to call above-mentioned Android debugging bridge bind command, again attempt to establish and electronic equipment middle finger where the application program
Connection between locking equipment.
It should be noted that application program can be called repeatedly after failure is established in the connection between the designated equipment
Above-mentioned Android debugging bridge bind command stops when the connection between the designated equipment is successfully established to attempt to establish connection
Only, alternatively, can also in advance for the Android debug bridge bind command setting it is corresponding repeat call threshold value, when application program repeatedly
When calling the number of above-mentioned Android debugging bridge bind command to reach repetitions to call threshold value, stop calling, if still not with
It is successfully established connection between the designated equipment, current process can be terminated.
In a kind of feasible embodiment, Android debug bridge device obtain order can be with are as follows: #adb devices,
That is, application program can obtain connected device information by calling #adb devices.
For the realization of step 106, the embodiment of the present invention there is provided herein following feasible embodiment.
In a kind of feasible embodiment, in the command analysis device running environment of Android debugging bridge, it is based on the finger
The upgrading that fixed more new information carries out the application program may include: the command analysis device running environment in Android debugging bridge
In, by calling installation order, the specified more new information is loaded in the designated equipment.
It should be noted that if being successfully established and the company in electronic equipment where application program between designated equipment
It connects, is equivalent to get the command analysis device running environment of Android debugging bridge.In the command analysis device of Android debugging bridge
Under running environment, just there is installation permission when executing installation order.Therefore, in the embodiment of the present invention, in the life of Android debugging bridge
It enables in resolver running environment, application program loads the specified update letter of acquisition by calling installation order in designated equipment
Breath, realizes the automatic upgrading of application program.
In a kind of feasible embodiment, above-mentioned installation order can be with are as follows:
#adb–s emulator-5444shell pm install–r xxx.apk。
That is, application program can be by calling #adb-s emulator-5444shell pm install-r
Xxx.apk loads specified more new information in designated equipment.
By taking the specified more new information of application program is the upgrade package of application program as an example, in the installation order, emulator-
5444 be the title for carrying the simulator of command analysis device running environment of Android debugging bridge, and xxx.apk indicates upgrade package, the peace
Dress order indicates: upgrade package xxx.apk is installed on simulator emulator-5444.
In another feasible embodiment, above-mentioned installation order can be with are as follows:
#adb–s 127.0.0.1:5555shell pm install–r xxx.apk。
That is, application program can be by calling #adb-s 127.0.0.1:5555shell pm install-r
Xxx.apk loads specified more new information in designated equipment.
By taking the specified more new information of application program is the upgrade package of application program as an example, in the installation order,
127.0.0.1:5555 the address of the designated equipment of the command analysis device running environment of bridge is debugged for above-mentioned carrying Android, wherein
5555 be the port numbers of the designated equipment, and xxx.apk indicates upgrade package, which indicates: in 127.0.0.1:5555 institute
Upgrade package xxx.apk is installed in the equipment of representative.
It is illustrated so that specified more new information is upgrade package as an example below.
Referring to FIG. 5, it, which is interacted for application program provided by the embodiment of the present invention with server, realizes upgrade package downloading
Flow diagram, as shown in Figure 5, comprising:
501, server obtains the escalation policy of configuration.
502, application program is sent to server updates detection request, to realize upgrading detection.
503, server is according to detection request is updated, by the newest of the current version information of application program and the application program
Version information is compared, and both discoveries are inconsistent, illustrates that there are upgrade package.
504, server generates upgrade information, which may include the download address and check information of upgrade package.
505, server is returned to application program updates detection response, carries the upgrade information.
506, application program extracts the download address of upgrade package.
507, application program is based on the download address, sends downloading request to server.
508, server is requested according to downloading, obtains upgrade package.
509, server returns to downloading response to application program, carries the upgrade package.
510, application program generates check information according to the upgrade package received.
511, the check information itself generated is compared application program with the check information obtained from server, obtains
Comparison result.
If comparison result is that two check informations are consistent, subsequent upgrade package installation procedure is needed to be implemented.If two
Check information is inconsistent, needs to re-download installation kit.
It is illustrated so that designated equipment is specified simulator emulator-5444 as an example below.
Referring to FIG. 6, its flow diagram for the installation of application program updating packet provided by the embodiment of the present invention, such as schemes
Shown in 6, comprising:
601, the enable command #start adbd of application call Android debugging bridge, to run Android debugging bridge.
602, in the case where Android debugs bridge operating status, application call Android debugs bridge bind command #adb connect
172.0.0.1, request establish and application program institute in the electronic device one or more simulators between connection.
603, application call Android debugging bridge device obtains order #adb devices, obtains connected device letter
It ceases, the title comprising each simulator in simulators one or more in the electronic equipment in the connected device information.
604, whether application program judges comprising simulator emulator-5444 in connected device information, if so, holding
Row step 605;If it is not, executing step 602.
605, application call installation order #adb-s emulator-5444shell pm install-r
Xxx.apk or installation order #adb-s emulator-5444shell pm install-r xxx.apk, in simulator
Upgrade package is installed in emulator-5444.
The embodiment of the present invention, which further provides, realizes the Installation practice of each step and method in above method embodiment.
The embodiment of the invention also provides a kind of application program updating device, which is set in application program.It please join
Fig. 7 is examined, is the functional block diagram of application program updating device provided by the embodiment of the present invention.As shown, the device packet
It includes:
Transmission unit 10 updates detection request for sending to server;
Receiving unit 20, for receiving the server according to the download address for updating detection request and returning;
The transmission unit 10, is also used to according to the download address, sends downloading request to the server;
The receiving unit 20 is also used to receive the server and is believed according to the specified update that the downloading request returns
Breath;
Environment acquiring unit 30, for by calling specified order, the command analysis device for enabling Android debugging bridge to run ring
Border;
Upgrading processing unit 40, for being based on the finger in the command analysis device running environment of Android debugging bridge
Fixed more new information carries out the upgrading of the application program.
In a kind of feasible embodiment, the environment acquiring unit 30 is specifically used for:
By calling Android to debug the enable command of bridge, operation Android debugs bridge;
In the case where Android debugs bridge operating status, the Android debugging bridge is enabled by the related command for calling Android to debug bridge
Command analysis device running environment.
In a kind of feasible embodiment, the environment acquiring unit 30 is used in the case where Android debugs bridge operating status,
It is specific to use when debugging the command analysis device running environment of bridge by calling the dependent instruction of Android debugging bridge to enable the Android
In:
In the case where Android debugs bridge operating status, by calling Android to debug bridge bind command, establish and the application program
Connection in the electronic equipment of place between designated equipment;Wherein, the designated equipment is the order of the carrying Android debugging bridge
The equipment of resolver running environment.
In a kind of feasible embodiment, the environment acquiring unit 30 is specifically also used to:
Order is obtained by calling Android to debug bridge device, obtains connected device information;
Judge the connected device information whether include the designated equipment information;
When the connected device information includes the information of the designated equipment, triggers the upgrading processing unit and execute
In the command analysis device running environment of Android debugging bridge, the application program is carried out based on the specified more new information
Upgrading.
In a kind of feasible embodiment, the upgrading processing unit 40 is specifically used for: in Android debugging bridge
In command analysis device running environment, by calling installation order, the specified more new information is loaded in the designated equipment.
In a kind of feasible embodiment, as shown in figure 8, the receiving unit 10, is also used to: receiving the server
The check information of return;
Described device further include:
Information checking unit 50 verifies the specified more new information for being based on the check information;And work as school
Test by when, triggering environment acquiring unit is executed by calling specified order, enables the command analysis device operation of Android debugging bridge
Environment.
Fig. 1 is able to carry out to method shown in fig. 6 by each unit in this present embodiment, what the present embodiment was not described in detail
Part can refer to the related description to Fig. 1 to Fig. 6.
The embodiment of the invention also provides a kind of computer-readable mediums, comprising: computer executable instructions, when the calculating
Machine executable instruction executes following steps when being run:
It is sent to server and updates detection request;
The server is received according to the download address for updating detection request and returning;
According to the download address, downloading request is sent to the server;
Receive the specified more new information that the server is returned according to the downloading request;
By calling specified order, the command analysis device running environment of Android debugging bridge is enabled;
In the command analysis device running environment of Android debugging bridge, answered described in the progress of more new information based on described specify
With the upgrading of program.
In a kind of feasible embodiment, by calling specified order, the command analysis device fortune of Android debugging bridge is enabled
The step of row environment, specifically includes:
By calling Android to debug the enable command of bridge, operation Android debugs bridge;
In the case where Android debugs bridge operating status, by calling Android to debug bridge bind command, establish and the application program
Connection in the electronic equipment of place between designated equipment;Wherein, the designated equipment is the order of the carrying Android debugging bridge
The equipment of resolver running environment.
In a kind of feasible embodiment, in the command analysis device running environment of Android debugging bridge, it is based on institute
Before stating the upgrading that specified more new information carries out the application program, following steps are also executed:
Order is obtained by calling Android to debug bridge device, obtains connected device information;
Judge the connected device information whether include the designated equipment information;
When the connected device information includes the information of the designated equipment, the life in Android debugging bridge is executed
The step of enabling in resolver running environment, the upgrading of the application program carried out based on the specified more new information.
In a kind of feasible embodiment, in the command analysis device running environment of Android debugging bridge, it is based on institute
Stating the step of specified more new information carries out the upgrading of the application program includes:
In the command analysis device running environment of Android debugging bridge, by calling installation order, set in described specify
The standby middle load specified more new information.
In a kind of feasible embodiment, receives the server and believed according to the specified update that the downloading request returns
When breath, step is also executed: receiving the check information that the server returns;
By calling specified order, before the command analysis device running environment for enabling Android debugging bridge, following step is also executed
It is rapid:
Based on the check information, the specified more new information is verified;
When passed the verification, it executes by calling specified order, enables the command analysis device running environment of Android debugging bridge
The step of.
The technical solution of the embodiment of the present invention has the advantages that
In the embodiment of the present invention, after obtaining specified more new information, by calling specified order, Android debugging bridge is enabled
Command analysis device running environment, and then in the command analysis device running environment of Android debugging bridge, it is specified more based on described
New information carries out the upgrading of the application program;After command analysis device running environment due to getting Android debugging bridge, so that it may
With with permission, so as to realize automatic upgrading.The automatic upgrading scheme can not need user and click respective keys triggering
Upgrading, therefore asking for maintenance can be still needed to avoid the early version for not clicking application program brought by respective keys as user
Topic, so that the version degree of fragmentation of application program is reduced to a certain extent, to reduce maintenance to a certain extent
Cost.In addition, clicking respective keys due to avoiding user, may be implemented to simplify updating operation, to improve application program
Upgrading efficiency.
In addition, technical solution provided by the embodiment of the present invention realizes automatic upgrading, achieve the effect that silent upgrading,
Avoiding mandatory upgrade mode gives user's bring bad experience, and the user experience is improved.Moreover, the embodiment of the present invention is by obtaining
The command analysis device running environment for taking Android debugging bridge, to obtain permission, further as with permission, so that it may according to obtaining
Specified more new information carry out application program complete upgrading.
Moreover, by downloaded more new information and pacifying with needing to connect by computer with terminal in the prior art
The technical solution for being attached to terminal is compared, technical solution provided by the embodiment of the present invention, the application program and service of terminal local
Device interacts, and downloads more new information, and complete application in the related command of local runtime Android debugging bridge to cross over permission
The upgrading of program, therefore do not need for terminal to connect with computer, without relying on the downloading and installation of computer, get rid of needs
The limitation that installation could be completed using computer, is improved the flexibility of application program updating, improves upgrading efficiency.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided by the present invention, it should be understood that disclosed system, device and method can be with
It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit
It divides, only a kind of logical function partition, there may be another division manner in actual implementation, for example, multiple units or group
Part can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown
Or the mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, device or unit it is indirect
Coupling or communication connection can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of hardware adds SFU software functional unit.
The above-mentioned integrated unit being realized in the form of SFU software functional unit can store and computer-readable deposit at one
In storage media.Above-mentioned SFU software functional unit is stored in a storage medium, including some instructions are used so that a computer
It is each that device (can be personal computer, server or network equipment etc.) or processor (Processor) execute the present invention
The part steps of embodiment the method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (Read-
Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic or disk etc. it is various
It can store the medium of program code.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention
Within mind and principle, any modification, equivalent substitution, improvement and etc. done be should be included within the scope of the present invention.
Claims (11)
1. a kind of application program updating method, which is characterized in that be implemented in the application program of terminal local;The method packet
It includes:
It is sent to server and updates detection request;
The server is received according to the download address for updating detection request and returning;
According to the download address, downloading request is sent to the server;
Receive the specified more new information that the server is returned according to the downloading request;
By calling specified order, the command analysis device running environment of Android debugging bridge is enabled;
In the command analysis device running environment of Android debugging bridge, carried out based on the specified more new information described using journey
The upgrading of sequence.
2. the method according to claim 1, wherein enabling the life of Android debugging bridge by calling specified order
Enable resolver running environment, comprising:
By calling Android to debug the enable command of bridge, operation Android debugs bridge;
In the case where Android debugs bridge operating status, by calling Android to debug bridge bind command, where foundation and the application program
Connection in electronic equipment between designated equipment;Wherein, the designated equipment is the command analysis of the carrying Android debugging bridge
The equipment of device running environment.
3. according to the method described in claim 2, it is characterized in that, debugging the command analysis device running environment of bridge in the Android
In, before the upgrading that the application program is carried out based on the specified more new information, further includes:
Order is obtained by calling Android to debug bridge device, obtains connected device information;
Judge the connected device information whether include the designated equipment information;
When the connected device information includes the information of the designated equipment, the order solution in Android debugging bridge is executed
In parser running environment, based on described the step of specifying more new information to carry out the upgrading of the application program.
4. method according to any one of claims 1 to 3, which is characterized in that in the command analysis of Android debugging bridge
In device running environment, the upgrading of the application program is carried out based on the specified more new information, comprising:
In the command analysis device running environment of Android debugging bridge, by calling installation order, in the designated equipment
Load the specified more new information.
5. the method according to claim 1, wherein receiving what the server was returned according to the downloading request
When specified more new information, further includes: receive the check information that the server returns;
By calling specified order, before the command analysis device running environment for enabling Android debugging bridge, further includes:
Based on the check information, the specified more new information is verified;
When passed the verification, it executes by calling specified order, enables the step of the command analysis device running environment of Android debugging bridge
Suddenly.
6. a kind of application program updating device, which is characterized in that be set in the application program of terminal local;Described device packet
It includes:
Transmission unit updates detection request for sending to server;
Receiving unit, for receiving the server according to the download address for updating detection request and returning;
The transmission unit, is also used to according to the download address, sends downloading request to the server;
The receiving unit is also used to receive the specified more new information that the server is returned according to the downloading request;
Environment acquiring unit, for enabling the command analysis device running environment of Android debugging bridge by calling specified order;
Upgrading processing unit, for being based on the specified update in the command analysis device running environment of Android debugging bridge
Information carries out the upgrading of the application program.
7. device according to claim 6, which is characterized in that the environment acquiring unit is specifically used for:
By calling Android to debug the enable command of bridge, operation Android debugs bridge;
In the case where Android debugs bridge operating status, by calling Android to debug bridge bind command, where foundation and the application program
Connection in electronic equipment between designated equipment;Wherein, the designated equipment is the command analysis of the carrying Android debugging bridge
The equipment of device running environment.
8. device according to claim 7, which is characterized in that the environment acquiring unit is specifically also used to:
Order is obtained by calling Android to debug bridge device, obtains connected device information;
Judge the connected device information whether include the designated equipment information;
When the connected device information includes the information of the designated equipment, triggers the upgrading processing unit and execute in institute
In the command analysis device running environment for stating Android debugging bridge, the liter of the application program is carried out based on the specified more new information
Grade.
9. according to the device any in claim 6 to 8, which is characterized in that the upgrading processing unit is specifically used for:
In the command analysis device running environment of Android debugging bridge, by calling installation order, loaded in the designated equipment
The specified more new information.
10. device according to claim 6, which is characterized in that the receiving unit is also used to receive the server and returns
The check information returned;
Described device further include:
Information checking unit verifies the specified more new information for being based on the check information;And when verification passes through
When, triggering environment acquiring unit is executed by calling specified order, enables the command analysis device running environment of Android debugging bridge.
11. a kind of computer-readable medium characterized by comprising computer executable instructions refer to when the computer is executable
Following steps are executed when order is run:
It is sent to server and updates detection request;
The server is received according to the download address for updating detection request and returning;
According to the download address, downloading request is sent to the server;
Receive the specified more new information that the server is returned according to the downloading request;
By calling specified order, the command analysis device running environment of Android debugging bridge is enabled;
In the command analysis device running environment of Android debugging bridge, carried out based on the specified more new information described using journey
The upgrading of sequence.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710366234.1A CN108958785B (en) | 2017-05-23 | 2017-05-23 | Application program upgrading method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710366234.1A CN108958785B (en) | 2017-05-23 | 2017-05-23 | Application program upgrading method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108958785A true CN108958785A (en) | 2018-12-07 |
CN108958785B CN108958785B (en) | 2022-01-07 |
Family
ID=64462633
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710366234.1A Active CN108958785B (en) | 2017-05-23 | 2017-05-23 | Application program upgrading method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108958785B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109684026A (en) * | 2019-01-14 | 2019-04-26 | 武汉斗鱼鱼乐网络科技有限公司 | APP replacing skins method, apparatus, electronic equipment and storage medium |
CN110018838A (en) * | 2019-03-01 | 2019-07-16 | 视联动力信息技术股份有限公司 | A kind of method and system configuring program in Android medical terminal |
CN112783519A (en) * | 2019-11-04 | 2021-05-11 | 航天科工惯性技术有限公司 | Application program updating method and system for measuring pup joint |
CN116541045A (en) * | 2023-07-03 | 2023-08-04 | 京东科技信息技术有限公司 | Application resource updating method, device and system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104679654A (en) * | 2015-02-26 | 2015-06-03 | 百度在线网络技术(北京)有限公司 | Method, equipment and system for testing application program |
CN105323299A (en) * | 2015-03-06 | 2016-02-10 | 维沃移动通信有限公司 | Data transmission method and terminal |
CN105786538A (en) * | 2014-12-24 | 2016-07-20 | 博雅网络游戏开发(深圳)有限公司 | Software upgrading method and device based on Android system |
US9459858B2 (en) * | 2015-01-07 | 2016-10-04 | International Business Machines Corporation | Selectively hotpatching only a selection of processes of a running instance of an application that match a selection criteria |
CN106686073A (en) * | 2016-12-19 | 2017-05-17 | 北京东方车云信息技术有限公司 | Information processing method and system |
-
2017
- 2017-05-23 CN CN201710366234.1A patent/CN108958785B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105786538A (en) * | 2014-12-24 | 2016-07-20 | 博雅网络游戏开发(深圳)有限公司 | Software upgrading method and device based on Android system |
US9459858B2 (en) * | 2015-01-07 | 2016-10-04 | International Business Machines Corporation | Selectively hotpatching only a selection of processes of a running instance of an application that match a selection criteria |
CN104679654A (en) * | 2015-02-26 | 2015-06-03 | 百度在线网络技术(北京)有限公司 | Method, equipment and system for testing application program |
CN105323299A (en) * | 2015-03-06 | 2016-02-10 | 维沃移动通信有限公司 | Data transmission method and terminal |
CN106686073A (en) * | 2016-12-19 | 2017-05-17 | 北京东方车云信息技术有限公司 | Information processing method and system |
Non-Patent Citations (1)
Title |
---|
KOOZXCV: "adb协议模拟实现静默安装apk", 《HTTPS://BLOG.CSDN.NET/KOOZXCV/ARTICLE/DETAILS/52162462》 * |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109684026A (en) * | 2019-01-14 | 2019-04-26 | 武汉斗鱼鱼乐网络科技有限公司 | APP replacing skins method, apparatus, electronic equipment and storage medium |
CN110018838A (en) * | 2019-03-01 | 2019-07-16 | 视联动力信息技术股份有限公司 | A kind of method and system configuring program in Android medical terminal |
CN110018838B (en) * | 2019-03-01 | 2022-05-06 | 视联动力信息技术股份有限公司 | Method and system for configuring programs in android medical terminal |
CN112783519A (en) * | 2019-11-04 | 2021-05-11 | 航天科工惯性技术有限公司 | Application program updating method and system for measuring pup joint |
CN112783519B (en) * | 2019-11-04 | 2023-10-20 | 航天科工惯性技术有限公司 | Application program updating method and system for measuring nipple |
CN116541045A (en) * | 2023-07-03 | 2023-08-04 | 京东科技信息技术有限公司 | Application resource updating method, device and system |
CN116541045B (en) * | 2023-07-03 | 2023-11-03 | 京东科技信息技术有限公司 | Application resource updating method, device and system |
Also Published As
Publication number | Publication date |
---|---|
CN108958785B (en) | 2022-01-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107979508B (en) | Micro-service test method and device | |
CN104063239B (en) | Application program update method and server, the client of mobile terminal | |
CN105389222B (en) | A kind of methods, devices and systems of dynamic call native interface | |
US8612947B2 (en) | System and method for remotely compiling multi-platform native applications for mobile devices | |
CN106502747A (en) | A kind of method of application upgrade and mobile terminal | |
CN104199654B (en) | The call method and device of open platform | |
CN108958785A (en) | A kind of application program updating method and device | |
US20090124251A1 (en) | Method of Assessing Compatibility Between Applications and Processor Devices | |
CN105389263B (en) | Application software authority monitoring method, system and equipment | |
CN105307195B (en) | A kind of method and device updating access point name parameter | |
CN107832065A (en) | Firmware upgrade method, water purifier, upgrade-system and readable storage medium storing program for executing | |
CN111159019B (en) | Application program testing method, testing control terminal and testing terminal | |
AU2005218288A1 (en) | Execution of unverified programs in a wireless device operating environment | |
CN107172075B (en) | Communication method, system and readable storage medium based on network isolation | |
CN115659343B (en) | Container attack simulation method and detection method for simulating real attack, and terminal | |
CN109672553A (en) | Gateway Dynamic Configuration, system, computer equipment and storage medium | |
CN105786636B (en) | A kind of system repair and device | |
CN108366127A (en) | A kind of acquisition methods and device of software package | |
CN108512682B (en) | Method and device for determining false terminal identification | |
CN113872812B (en) | Information processing method, network equipment and terminal equipment | |
CN114363225A (en) | MTQQ protocol-based device debugging mode, system and storage medium | |
CN104869129B (en) | A kind of application management method, equipment and system | |
CN103984541B (en) | Method and system based on terminal source code building application program | |
CN105512032B (en) | A kind of middle database virtual controlling test method and its system | |
CN110471689A (en) | A kind of application program updating method and device |
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 |