CN109818742A - A kind of apparatus debugging method, device and storage medium - Google Patents

A kind of apparatus debugging method, device and storage medium Download PDF

Info

Publication number
CN109818742A
CN109818742A CN201711175809.8A CN201711175809A CN109818742A CN 109818742 A CN109818742 A CN 109818742A CN 201711175809 A CN201711175809 A CN 201711175809A CN 109818742 A CN109818742 A CN 109818742A
Authority
CN
China
Prior art keywords
public key
equipment
debugging
connection
maintenance tools
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
CN201711175809.8A
Other languages
Chinese (zh)
Other versions
CN109818742B (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201711175809.8A priority Critical patent/CN109818742B/en
Publication of CN109818742A publication Critical patent/CN109818742A/en
Application granted granted Critical
Publication of CN109818742B publication Critical patent/CN109818742B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of apparatus debugging method, device and storage mediums, are related to smart machine communication field, which comprises after equipment receives the connection request for debugging, the debugging public key for this connection is obtained from the connection request received;The equipment obtains the verification public key connected for this from reliable channel;The equipment determines whether the requesting party of the connection request is operation and maintenance tools according to the debugging public key and the verification public key;If the requesting party is the operation and maintenance tools, the equipment and the operation and maintenance tools establish the connection for debugging.By distinguishing operation and maintenance tools and non-operation and maintenance tools, achieve the purpose that the operation and maintenance tools of only device manufacturer can debug equipment.

Description

A kind of apparatus debugging method, device and storage medium
Technical field
The present invention relates to smart machine communication field, in particular to a kind of adjustment method, device, equipment and storage medium.
Background technique
O&M is the indispensable work of each device manufacturer.After each device product factory, if equipment breaks down, It requires operation and maintenance tools and carrys out the reason of positioning test failure occurs.Adb (android debug bridge) is that android is provided A general debugging tool, as crawl log, installation with unloading application, remotely connect android equipment, replicate file arrive The various debugging operations such as equipment.Android device manufacturer can reach many mesh to android equipment O&M by adb tool 's.
If current equipment supports the debugging of adb tool, normal process is as follows.The adb means requests at the end PC connect the android Equipment, android equipment send a random AUTH TOKEN message.The adb tool at the end PC with oneself RSA private key to this with Machine token signs, and sends back to android equipment.Android equipment is attempted with all RSA for being stored in oneself somewhere Public key checks the token by signature sent back.If checking signature failure, equipment is sent newly to adb tool token.If adb tool has had attempted to all RSA public private key pairs, equipment still checks failure, then adb tool is sent out to equipment Send AUTH RSA PUBLIC KEY message, the RSA public key comprising an adb.The RSA public key inspection label that equipment utilization is sent Pop-up message box asks whether to allow (or permanent allow) the adb tool using debugging interface after name passes through, one in the message box As can show the fingerprint (MD5) of adb public key, rather than host public key itself.After user's authorization, adb tool then be can be used ?.That is adb tool requests that a RSA public key for representing PC Android device can be issued simultaneously when connection for the first time, The android equipment utilization public key authenticates adb tool, this is the use normal process of the adb tool of android.
But the above normal process, anyone can debug android equipment by standard adb, and user is only needed Authorization is primary.If user does not know that this is authorization adb debugging function in a daze, ACK button is pressed, then will be hacked Visitor is utilized to operate the equipment.And many device manufacturers are it is not desirable that third can debug oneself equipment.The above normal stream Journey android equipment does not identify that the request at operation and maintenance tools end connects or third party is in the standard using android Adb tool is connected in request.Device manufacturer is to reach security purpose, it is common practice to directly when leaving the factory close adb function It closes.But oneself is also prevented using adb tool to debug while closing adb method.Some device manufacturers are developed by oneself A set of operation and maintenance tools are done, and to reach the same debugging function of adb tool in this way and the workload of exploitation operation and maintenance tools that carries out Greatly, and it is not general.Some device manufacturers then require carry out adb debugging before must the end PC install mutually should product drive It is dynamic, but since driving is general, once others obtains a driving can carry out adb in the equipment of all products Debugging.
Therefore, how to allow device manufacturer using android general adb tool to carry out debugging O&M, while preventing again Third party debugs the equipment using adb tool, becomes urgent problem to be solved.
Summary of the invention
A kind of apparatus debugging method, device, equipment and storage medium provided in an embodiment of the present invention realize only device manufacturer Operation and maintenance tools equipment can be debugged.
A kind of apparatus debugging method provided according to embodiments of the present invention, comprising:
After equipment receives the connection request for debugging, obtain from the connection request received for this connection Debug public key;
The equipment obtains the verification public key connected for this from reliable channel;
The equipment according to the debugging public key and the verification public key, determine the connection request requesting party whether be Operation and maintenance tools;
If the requesting party is the operation and maintenance tools, the equipment and the operation and maintenance tools establish the company for debugging It connects.
Preferably, the equipment is obtained from reliable channel includes: for this verification public key connected
The request for being used to download the verification public key is sent to server by the equipment;
The verification public key prestored that the equipment waits the server to be returned according to the request.
Preferably, the equipment determines the request of the connection request according to the debugging public key and the verification public key Whether side is that operation and maintenance tools include:
If the verification public key got from the server is consistent with the debugging public key, the equipment determines institute The requesting party for stating connection request is operation and maintenance tools;
If having not been obtained from the server to the verification public key, or the verifying got from the server is public Key and the debugging public key are inconsistent, then the equipment determines that the requesting party of the connection request is not operation and maintenance tools.
Preferably, the equipment is obtained from reliable channel includes: for this verification public key connected
After receiving the connection request, the requesting party of the equipment and the connection request establishes another communication connection;
The equipment obtains the verification public key from the requesting party by another communication connection.
Preferably, the equipment determines the request of the connection request according to the debugging public key and the verification public key Whether side is that operation and maintenance tools include:
If the verification public key and the debugging public key that are got by another communication connection from the requesting party Unanimously, then the equipment determines that the requesting party of the connection request is operation and maintenance tools;
If another communication connection between the equipment and the requesting party can not be established, or by described another It communicates to connect the verification public key got from the requesting party and the debugging public key is inconsistent, then the equipment determines institute The requesting party for stating connection request is not operation and maintenance tools.
Preferably, the equipment is obtained from reliable channel includes: for this verification public key connected
After receiving the connection request, the equipment reads specified external memory;
The equipment obtains the verification public key from the external memory.
Preferably, the equipment determines the request of the connection request according to the debugging public key and the verification public key Whether side is that operation and maintenance tools include:
If the verification public key obtained from the external memory is consistent with the debugging public key, the equipment is true The requesting party of the fixed connection request is operation and maintenance tools;
If not finding the external memory, perhaps from the external memory it is unread to the verification public key or The verification public key read from the external memory is out of date, or the verifying read from the external memory is public Key and the debugging public key are inconsistent, then the equipment determines that the requesting party of the connection request is not operation and maintenance tools.
Preferably, the debugging public key and the verification public key are the public keys of public-key encryptosystem RSA key centering, It is regenerated by the operation and maintenance tools in each connection request initiated for debugging.
A kind of equipment debugging device provided according to embodiments of the present invention, comprising:
Debugging public key acquisition module is asked after receiving the connection request for commissioning device from the connection received Seek the middle debugging public key obtained for this connection;
Verification public key obtains module, for obtaining the verification public key connected for this from reliable channel;
Request originator determining module, for determining that the connection is asked according to the debugging public key and the verification public key Whether the requesting party asked is operation and maintenance tools;
Connection request processing module, if being the operation and maintenance tools for the requesting party, establish the equipment with it is described The connection for debugging of operation and maintenance tools.
A kind of Android device provided according to embodiments of the present invention, comprising: processor, and with the processor coupling The memory connect;The equipment debugging program that can be run on the processor, the equipment debugging are stored on the memory Program realizes the step of above-mentioned apparatus debugging method when being executed by the processor.
A kind of storage medium provided according to embodiments of the present invention is stored thereon with equipment debugging program, the equipment tune The step of examination program realizes above-mentioned apparatus debugging method when being executed by processor.
Technical solution provided in an embodiment of the present invention has the following beneficial effects:
The equipment of the embodiment of the present invention manufacturer operation and maintenance tools are used when being used for the connection of debugging to device request every time Debugging key pair will regenerate, and guarantee that the public key for being transferred to equipment is newest public key, accordingly even when being obtained this time by hacker The debugging public key of connection, connection next time still cannot use old public key, while be by comparing verification public key and debugging public key It is no consistent, distinguish device manufacturer's operation and maintenance tools request connection or the request connection of third party's debugging tool, thus reach only this set The operation and maintenance tools of standby manufacturer can combine device security to the purpose that equipment is debugged.
Detailed description of the invention
Fig. 1 is apparatus debugging method block diagram provided in an embodiment of the present invention;
Fig. 2 is equipment debugging device block diagram provided in an embodiment of the present invention;
Fig. 3, which is server as the adb in reliable channel, requests connection framework figure;
Fig. 4 is socket link between operation and maintenance tools and equipment as reliable channel, and android equipment is as visitor at this time Adb request connection flow chart when the end of family;
Fig. 5 is adb request connection flow chart of the reliable channel using external memory;
Fig. 6 is socket link between operation and maintenance tools and equipment as reliable channel, and android equipment is as clothes at this time Adb request connection flow chart when business end.
Specific embodiment
Below in conjunction with attached drawing to a preferred embodiment of the present invention will be described in detail, it should be understood that described below is excellent Select embodiment only for the purpose of illustrating and explaining the present invention and is not intended to limit the present invention.
Fig. 1 is apparatus debugging method block diagram provided in an embodiment of the present invention, as shown in Figure 1, step includes:
Step S101: it after equipment receives the connection request for debugging, obtains and is used for from the connection request received The debugging public key of this connection.
Step S102: the equipment obtains the verification public key connected for this from reliable channel.
The mode for obtaining verification public key is as follows:
1. server is as reliable channel.
The request for being used to download the verification public key is sent to server by the equipment, and the equipment waits the service The verification public key prestored that device is returned according to the request.
When server is as reliable channel, operation and maintenance tools can initiate the connection request premise previous existence into public key, and by institute The public key of generation is sent to server preservation.
2. another communication connection is used as reliable channel.
After receiving the connection request, the requesting party of the equipment and the connection request establishes another communication connection, The equipment obtains the verification public key from the requesting party by another communication connection.For example, another communication link Connecing can be socket connection and can also be used as client at this point, the equipment can be used as server-side.
3. external memory is as reliable channel.
After receiving the connection request, the equipment reads specified external memory, and from the external memory It is middle to obtain the verification public key.
When external memory is as reliable channel, public key generated can be stored in external storage in advance by operation and maintenance tools In device, then external memory is inserted into the slot of the equipment, so as to the equipment after receiving the connection request from institute It states external memory and obtains the verification public key.
Step S103: the equipment determines asking for the connection request according to the debugging public key and the verification public key Whether the side of asking is operation and maintenance tools.
When server is as reliable channel, the equipment according to from server obtain verification public key the case where, determination ask The legitimacy for the side of asking.Specifically, if the verification public key got from the server is consistent with the debugging public key, The equipment determines that the requesting party of the connection request is operation and maintenance tools, if having not been obtained from the server public to the verifying Key, or the verification public key got from the server and the debugging public key it is inconsistent, then the equipment determines institute The requesting party for stating connection request is not operation and maintenance tools.
When another communication connection is as reliable channel, the equipment obtains verification public key according to from another communication connection Situation determines the legitimacy of requesting party.Specifically, if the institute got by another communication connection from the requesting party It is consistent with the debugging public key to state verification public key, then the equipment determines that the requesting party of the connection request is operation and maintenance tools;If Can not establish another communication connection between the equipment and the requesting party, or by another communication connection from The verification public key that the requesting party gets and the debugging public key are inconsistent, then the equipment determines the connection request Requesting party be not operation and maintenance tools.
When external memory is as reliable channel, if the verification public key obtained from the external memory and institute State debugging public key it is consistent, then the equipment determines that the requesting party of the connection request is operation and maintenance tools;If not finding described external Memory, perhaps from the external memory it is unread to the verification public key or from the external memory read institute State that verification public key is out of date, or the verification public key read from the external memory and the debugging public key it is inconsistent, Then the equipment determines that the requesting party of the connection request is not operation and maintenance tools.
Step S104: if the requesting party is the operation and maintenance tools, the equipment is used for operation and maintenance tools foundation The connection of debugging.
Above equipment is Android device;
The above-mentioned connection for debugging is adb connection;
Above-mentioned operation and maintenance tools be device manufacturer the equipment is debugged, the tool of O&M.
Debugging public key described above and the verification public key are the public keys of public-key encryptosystem RSA key centering, by The operation and maintenance tools are regenerated in each connection request initiated for debugging.
It will appreciated by the skilled person that implement the method for the above embodiments be can be with Relevant hardware is instructed to complete by program, the program can store in computer-readable storage medium.Into One step says that the present invention can also provide a kind of storage medium, is stored with equipment debugging program, and the equipment debugging program is processed The step of device realizes above-mentioned apparatus debugging method when executing.Wherein, the storage medium may include ROM/RAM, magnetic disk, CD, USB flash disk.
Fig. 2 is equipment debugging device block diagram provided in an embodiment of the present invention, as shown in Figure 2, comprising:
Public key acquisition module 21 is debugged, after receiving the connection request for commissioning device, from the connection received The debugging public key for this connection is obtained in request;
Verification public key obtains module 22, for obtaining the verification public key connected for this from reliable channel;
Request originator determining module 23, for determining the connection according to the debugging public key and the verification public key Whether the requesting party of request is operation and maintenance tools;
Connection request processing module 24 establishes the equipment and institute if being the operation and maintenance tools for the requesting party State the connection for debugging of operation and maintenance tools.
Described device can be set in Android device, and the course of work includes: that debugging public key acquisition module 21 receives For the connection request of commissioning device, and the debugging public key connected for this is obtained from the connection request.Verification public key It obtains module 22 and obtains the verifying for being used for this connection by server or the reliable channel such as socket connection or external memory Public key.Request originator determining module 23 compares the debugging public key and the verification public key of acquisition, if two public keys are consistent, Then illustrate that the requesting party of the connection request is operation and maintenance tools, connection request processing module 24 establishes the equipment and the O&M The connection for debugging of tool illustrates the connection if the verification public key can not be got or two public keys are inconsistent The requesting party of request is not operation and maintenance tools, and as third party's debugging tool or non-operation and maintenance tools, connection request processing module 24 are refused The connection for debugging of the equipment and the operation and maintenance tools is established absolutely.
The present embodiment provides a kind of Android devices, comprising: processor, and the memory with processor coupling; The equipment debugging program that can be run on the processor is stored on the memory, the equipment debugging program is by the place The step of reason device realizes above-mentioned apparatus debugging method when executing.
To keep the objectives, technical solutions, and advantages of the present invention clearer, below with android equipment and integrated adb work It elaborates for the operation and maintenance tools of tool.For the adb debugging technique of android smart machine, technology to be solved is asked Topic is how not only to have allowed oneself carry out debugging O&M to the android equipment using android general adb tool, but also prevent other People debugs the android equipment using adb tool.Based on this, the embodiment of the present invention provides one kind device manufacturer certainly The method and apparatus that oneself operation and maintenance tools can carry out adb debugging, specific as follows:
The embodiment of the present invention provides a kind of method that operation and maintenance tools can carry out adb debugging: operation and maintenance tools firstly generate newly RSA key pair.Operation and maintenance tools issue the public key of RSA key centering needed for authentication when being connected with adb means requests Android equipment, while same public key is also transmitted to by Android device by another reliable channel.Android is set It is standby to be compared the RSA public key that reliable channel is sent with the RSA public key being transmitted through from adb tool, if unanimously, then it is assumed that It is the adb connection of operation and maintenance tools request, the adb connection is then allowed to be debugged;Otherwise refusal connection.If Android is set It is standby that any RSA public key can not be obtained from reliable channel, also not think it is that operation and maintenance tools are connected in request, then refuses.The technology Have a main points: operation and maintenance tools are every time to when the adb connection of android device request, and RSA key is to will regenerate.
The embodiment of the present invention provides the android device that one kind operation and maintenance tools can carry out adb debugging, comprising: (1) Android equipment;(2) operation and maintenance tools.
The android equipment, the RSA public key obtained by comparing reliable channel and the RSA sended over from adb tool Whether public key unanimously connects to determine receiving or refuse this adb request.The android device not sent out by persistence The public key come, is kept only temporarily, and the public key that adb is used just is deleted after this time connecting use.
The operation and maintenance tools are integrated with adb tool, in addition to there is the approach of adb tool standard that RSA public key is transmitted to equipment Outside, there are also additional reliable channels is transmitted to equipment for the RSA public key of adb tool.The operation and maintenance tools have one to regenerate RSA Key pair module, when operation and maintenance tools can all regenerate RSA key pair before with adb request connection.
Fig. 3, which is server as the adb in reliable channel, requests connection framework figure, as shown in figure 3, the present embodiment is reliable logical Road is realized using additional server, and step includes:
Step S301: operation and maintenance tools generate a new RSA key pair, and RSA public key therein is sent to server.
The server can both be serviced with HTTP (Hyper Text Transfer Protocol, hypertext transfer protocol) Device, it is also possible to FTP (File Transfer Protocol, File Transfer Protocol) server, not limiting server type.
Step S302: operation and maintenance tools request connection android equipment with adb, and also send one and step by adb simultaneously The rapid identical RSA public key of S301 gives android equipment.
After step S303:android equipment receives the public key that adb is issued, downloading operation and maintenance tools are requested to server Public key.
Public key (such as being refused or be not present by server the server) is obtained if can not download from server, is shown not It is that operation and maintenance tools using adb are attached request, then refuses the request of this adb connection.
Step S304: after server receives the downloading request of android equipment, by what is received from operation and maintenance tools RSA public key is sent to android equipment.
After server sends public key to android equipment, while deleting and being stored in local public key.
If server is also deleted and is stored in local public affairs if issuing public key without client request whithin a period of time Key, so as not to reusing the public key by people.
Step S305:Android equipment receives after the RSA public key that server is downloaded, it is obtained with issuing from adb RSA public key compare, if two public keys are consistent, be shown to be operation and maintenance tools use adb carry out connection request, then receive It this time requests, allows adb connection.Adb order can be used to carry out normal adb after permission to debug.If the knot compared Fruit be it is inconsistent, show that be non-operation and maintenance tools connected using adb in request, refusal is this time requested.
Fig. 4 is socket link between operation and maintenance tools and equipment as reliable channel, and android equipment is as visitor at this time Adb request connection flow chart when the end of family, as shown in figure 4, reliable channel in the present embodiment using operation and maintenance tools with The socket connection directly created between android equipment, without server additional in Fig. 3 embodiment, step includes:
Step S401: operation and maintenance tools establish adb connection to android device request with adb, and are sent simultaneously by adb The public key of one newly-generated RSA key centering gives android equipment.
Step S402: operation and maintenance tools are used as server-side to open some socket listening port simultaneously, subsequent to monitor Android equipment establishes the request of socket communication link.
After step S403:Android equipment receives the public key that adb is issued, built as client to operation and maintenance tools request Found an other socket communication link.
If establishing the socket communication link not successfully after certain a period of time after request, then it is assumed that this time adb connection Request is not that operation and maintenance tools are making requests connection with adb, and then refusal is this time requested.
Step S404: operation and maintenance tools receive after android equipment establishes the request of new socket communication link, with Android equipment establishes socket link.
After step S405:Socket communication link is successfully established, operation and maintenance tools by the socket link issue one and The RSA public key of step S401 system gives android equipment.
After step S406:android equipment receives the public key issued from the socket link, it is issued with from adb The RSA public key of acquisition compares, if two public keys are consistent, is shown to be the connection request that operation and maintenance tools use adb to carry out, then Receiving this time request allows adb connection.Adb order can be used to carry out normal adb after permission to debug.If comparing The result is that it is inconsistent, show it is that non-operation and maintenance tools are connected using adb in request, refusal is this time requested.
Fig. 5 is adb request connection flow chart of the reliable channel using external memory, as shown in figure 5, in the present embodiment RSA public key is transmitted using external memory (such as TF card or USB flash disk) in reliable channel, and step includes:
Step S501: the new RSA public key that operation maintenance personnel generates operation and maintenance tools and the temporal information for generating the public key etc. are protected There are under certain catalogue of external memory (such as USB flash disk etc.).The memory is inserted into the corresponding of android equipment by operation maintenance personnel In the slot of external memory.
Step S502: operation and maintenance tools establish adb connection to android device request by adb, and are sent out simultaneously by adb Identical RSA public key in one and step S501 is sent to give android equipment.
After step S503:Android equipment receives the public key issued from adb, external memory directory content is read. If android equipment can not read any information from external memory respective directories, show be not operation and maintenance tools adb connection Request, then refuses this connection request.
Step S504: when the success of android equipment reads RSA public key and the generation of RSA public key from external memory Between when, compare the system time of current device and the generation time of public key first.If time interval is big (such as small more than one When) then refuse this connection request, terminate process.If time interval is little, continue later step.
Step S505: comparing RSA public key that adb is issued and whether the RSA public key in external memory is consistent.If two parts of public affairs Key comparison result be it is inconsistent, then refuse this adb connection request;If comparison result be it is consistent, allow this adb connection to ask It asks, then adb can be used normally to debug after allowing.
Fig. 6 is socket link between operation and maintenance tools and equipment as reliable channel, and android equipment is as clothes at this time Adb request connection flow chart when business end, as shown in fig. 6, the reliable channel in the present embodiment as Fig. 4 embodiment, uses Be the socket connection directly created between operation and maintenance tools and android equipment, the difference is that the present embodiment Socket connection is android equipment as server-side, and Fig. 4 embodiment is operation and maintenance tools as server-side.Step includes:
Step S601: operation and maintenance tools establish adb connection to android device request with adb, and are sent simultaneously by adb The public key of one newly-generated RSA key centering gives android equipment.
After step S602:android equipment receives adb request, a socket port is opened as server-side and is monitored, To monitor the request for establishing socket communication link of operation and maintenance tools.
If (such as 2 minutes) do not listen to any connection in certain time, it is believed that this time adb connection request is not operation and maintenance tools Connection is being made requests with adb, then refusal is this time requested, and the listening port is closed.
Step S603: after the public key that operation and maintenance tools are issued by adb in step s 601 is to android equipment, as visitor An other socket communication link to android device request is established at regular intervals (such as 10 seconds) in family end.If in 2 minutes The socket communication link is all established not successfully after attempting repeatedly request, then is terminated.
Step S604:android equipment receives after operation and maintenance tools establish the request of new socket communication link, with Android equipment establishes socket link.
After step S605:Socket communication link is successfully established, operation and maintenance tools by the socket link issue one and Step S601 the same RSA public key gives android equipment.
After step S606:Android equipment receives the public key issued from the socket link, it is issued with from adb The RSA public key of acquisition compares, if two public keys are consistent, is shown to be the connection request that operation and maintenance tools use adb to carry out, then Receiving this time request allows adb connection.Adb order can be used to carry out normal adb after permission to debug.If comparing The result is that it is inconsistent, show it is that non-operation and maintenance tools are connected using adb in request, refusal is this time requested.
In summary, adb tool is the debugging tool of android Device-General, anyone can use adb tool pair Android device is debugged, but many manufacturers wish that our company can be debugged with adb, other manufacturers can not debug, with Reach security purpose, therefore the operation and maintenance tools at the end PC of the embodiment of the present invention are integrated with the function of adb tool.Meanwhile operation and maintenance tools It is connect by adb means requests with Android device, can will represent a RSA public key of PC when adb means requests connect simultaneously It issues Android device to be authenticated, this is the normal process of the adb tool of android, and this process android equipment is simultaneously The request connection or third party that cannot identify operation and maintenance tools end connect in the standard adb tool using android in request It connects, therefore the operation and maintenance tools of the embodiment of the present invention lead to RSA public key needed for authentication when being connected with adb means requests simultaneously It crosses another reliable channel and is also transmitted to android equipment, the RSA public key that android equipment sends reliable channel It is compared with the RSA public key come is transmitted through from adb tool, if unanimously, then it is assumed that be the adb connection of operation and maintenance tools request, then The adb connection is allowed to be debugged;Otherwise refusal connection.If it is public that android equipment can not obtain any RSA from reliable channel Key is also not thought it is that operation and maintenance tools are connected in request, is then refused.Differentiation operation and maintenance tools request connection or the are thus reached The purpose that tripartite connects in the standard adb means requests using android.In actual use, only our company's operation and maintenance tools The Android device of our company can be debugged with adb tool, and RSA public key when due to connecting every time all regenerates, this Even if sample is obtained the RSA public key of this time connection by hacker, next time, connection still cannot be used, i.e., not can be carried out Replay Attack.
In conclusion the embodiment of the present invention has following technical effect that
1. the RSA public key that the embodiment of the present invention is obtained by comparing reliable channel and the RSA sended over from adb tool are public Whether key is consistent, has reached differentiation operation and maintenance tools request connection or third party is asked using the standard adb tool of android Seek the purpose of connection.
2. the operation and maintenance tools of the embodiment of the present invention are every time to when the adb connection of android device request, used RSA is close For key to that will regenerate, it will be new for being transferred to the RSA public key of android equipment in this way, even if being obtained this time by hacker The RSA public key of connection, connection next time still cannot use old public key, and the operation and maintenance tools for being finally reached the only device manufacturer can The purpose debugged using adb is reached debugging purpose and has combined safety.
Although describing the invention in detail above, but the invention is not restricted to this, those skilled in the art of the present technique It can be carry out various modifications with principle according to the present invention.Therefore, all to be modified according to made by the principle of the invention, all it should be understood as Fall into protection scope of the present invention.

Claims (11)

1. a kind of apparatus debugging method characterized by comprising
After equipment receives the connection request for debugging, the debugging for this connection is obtained from the connection request received Public key;
The equipment obtains the verification public key connected for this from reliable channel;
The equipment determines whether the requesting party of the connection request is O&M according to the debugging public key and the verification public key Tool;
If the requesting party is the operation and maintenance tools, the equipment and the operation and maintenance tools establish the connection for debugging.
2. the method according to claim 1, wherein the equipment is obtained from reliable channel for this connection Verification public key includes:
The request for being used to download the verification public key is sent to server by the equipment;
The verification public key prestored that the equipment waits the server to be returned according to the request.
3. according to the method described in claim 2, it is characterized in that, the equipment is public according to the debugging public key and the verifying Key determines whether the requesting party of the connection request is that operation and maintenance tools include:
If the verification public key got from the server is consistent with the debugging public key, the equipment determines the company The requesting party for connecing request is operation and maintenance tools;
If have not been obtained from the server to the verification public key, or the verification public key got from the server with The debugging public key is inconsistent, then the equipment determines that the requesting party of the connection request is not operation and maintenance tools.
4. the method according to claim 1, wherein the equipment is obtained from reliable channel for this connection Verification public key includes:
After receiving the connection request, the requesting party of the equipment and the connection request establishes another communication connection;
The equipment obtains the verification public key from the requesting party by another communication connection.
5. according to the method described in claim 4, it is characterized in that, the equipment is public according to the debugging public key and the verifying Key determines whether the requesting party of the connection request is that operation and maintenance tools include:
If consistent with the debugging public key by another verification public key got from the requesting party that communicates to connect, Then the equipment determines that the requesting party of the connection request is operation and maintenance tools;
If another communication connection between the equipment and the requesting party can not be established, or pass through another communication It connects the verification public key got from the requesting party and the debugging public key is inconsistent, then the equipment determines the company The requesting party for connecing request is not operation and maintenance tools.
6. the method according to claim 1, wherein the equipment is obtained from reliable channel for this connection Verification public key includes:
After receiving the connection request, the equipment reads specified external memory;
The equipment obtains the verification public key from the external memory.
7. according to the method described in claim 6, it is characterized in that, the equipment is public according to the debugging public key and the verifying Key determines whether the requesting party of the connection request is that operation and maintenance tools include:
If the verification public key obtained from the external memory is consistent with the debugging public key, the equipment determines institute The requesting party for stating connection request is operation and maintenance tools;
It is perhaps unread to the verification public key or from institute from the external memory if not finding the external memory State external memory reading the verification public key it is out of date, or from the external memory read the verification public key with The debugging public key is inconsistent, then the equipment determines that the requesting party of the connection request is not operation and maintenance tools.
8. method described in -7 any one according to claim 1, which is characterized in that the debugging public key and the verification public key It is the public key of public-key encryptosystem RSA key centering, initiates to ask for the connection of debugging each by the operation and maintenance tools It is regenerated when asking.
9. a kind of equipment debugging device characterized by comprising
Public key acquisition module is debugged, after receiving the connection request for commissioning device, from the connection request received Obtain the debugging public key for this connection;
Verification public key obtains module, for obtaining the verification public key connected for this from reliable channel;
Request originator determining module, for determining the connection request according to the debugging public key and the verification public key Whether requesting party is operation and maintenance tools;
Connection request processing module establishes the equipment and the O&M if being the operation and maintenance tools for the requesting party The connection for debugging of tool.
10. a kind of Android device characterized by comprising processor, and the memory with processor coupling;Institute The equipment debugging program for being stored with and being run on memory on the processor is stated, the equipment debugging program is by the processing It realizes when device executes such as the step of apparatus debugging method described in any item of the claim 1 to 8.
11. a kind of storage medium, which is characterized in that be stored with equipment debugging program, the equipment debugging program is held by processor It realizes when row such as the step of apparatus debugging method described in any item of the claim 1 to 8.
CN201711175809.8A 2017-11-22 2017-11-22 Equipment debugging method, device and storage medium Active CN109818742B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711175809.8A CN109818742B (en) 2017-11-22 2017-11-22 Equipment debugging method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711175809.8A CN109818742B (en) 2017-11-22 2017-11-22 Equipment debugging method, device and storage medium

Publications (2)

Publication Number Publication Date
CN109818742A true CN109818742A (en) 2019-05-28
CN109818742B CN109818742B (en) 2023-04-25

Family

ID=66599771

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711175809.8A Active CN109818742B (en) 2017-11-22 2017-11-22 Equipment debugging method, device and storage medium

Country Status (1)

Country Link
CN (1) CN109818742B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112035306A (en) * 2020-09-04 2020-12-04 浙江网商银行股份有限公司 Debugging robot and debugging method
CN112528257A (en) * 2020-12-04 2021-03-19 百度在线网络技术(北京)有限公司 Security debugging method and device, electronic equipment and storage medium
CN112948790A (en) * 2021-05-13 2021-06-11 神威超算(北京)科技有限公司 Equipment debugging method and system based on block chain
CN112968889A (en) * 2021-02-08 2021-06-15 深圳市慧为智能科技股份有限公司 Host right management method, terminal, device and computer readable storage medium
CN113722686A (en) * 2021-08-17 2021-11-30 深圳市新国都股份有限公司 Debugging bridge authorization method, device, equipment and computer readable storage medium
CN113760688A (en) * 2020-06-05 2021-12-07 腾讯科技(深圳)有限公司 Remote debugging method, system, webpage server, equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030065941A1 (en) * 2001-09-05 2003-04-03 Ballard Clinton L. Message handling with format translation and key management
US20070271461A1 (en) * 2006-05-22 2007-11-22 General Dynamics C4 Systems, Inc. Method for managing operability of on-chip debug capability
US7802092B1 (en) * 2005-09-30 2010-09-21 Blue Coat Systems, Inc. Method and system for automatic secure delivery of appliance updates
CN103634138A (en) * 2012-08-27 2014-03-12 阿里巴巴集团控股有限公司 Remote management, operation and maintenance method and system for distributed scheduling
CN103888292A (en) * 2014-02-25 2014-06-25 北京科东电力控制系统有限责任公司 Tool and method for operation and maintenance of distribution terminal
US20140229735A1 (en) * 2011-08-12 2014-08-14 Tridonic Gmbh & Co Kg Managing device ownership and commissioning in public-key encrypted wireless networks
US20150288526A1 (en) * 2014-04-04 2015-10-08 Qualcomm Incorporated Remote station and method for re-enabling a disabled debug capability in a system-on-a-chip device
CN105516948A (en) * 2014-09-26 2016-04-20 华为技术有限公司 Device control method and device control unit
CN105512538A (en) * 2015-12-11 2016-04-20 北京元心科技有限公司 debugging method and system of intelligent mobile operating system
CN107317711A (en) * 2017-06-30 2017-11-03 北京小度信息科技有限公司 Cloud O&M method, device and computer-readable recording medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030065941A1 (en) * 2001-09-05 2003-04-03 Ballard Clinton L. Message handling with format translation and key management
US7802092B1 (en) * 2005-09-30 2010-09-21 Blue Coat Systems, Inc. Method and system for automatic secure delivery of appliance updates
US20070271461A1 (en) * 2006-05-22 2007-11-22 General Dynamics C4 Systems, Inc. Method for managing operability of on-chip debug capability
US20140229735A1 (en) * 2011-08-12 2014-08-14 Tridonic Gmbh & Co Kg Managing device ownership and commissioning in public-key encrypted wireless networks
CN103634138A (en) * 2012-08-27 2014-03-12 阿里巴巴集团控股有限公司 Remote management, operation and maintenance method and system for distributed scheduling
CN103888292A (en) * 2014-02-25 2014-06-25 北京科东电力控制系统有限责任公司 Tool and method for operation and maintenance of distribution terminal
US20150288526A1 (en) * 2014-04-04 2015-10-08 Qualcomm Incorporated Remote station and method for re-enabling a disabled debug capability in a system-on-a-chip device
CN105516948A (en) * 2014-09-26 2016-04-20 华为技术有限公司 Device control method and device control unit
CN105512538A (en) * 2015-12-11 2016-04-20 北京元心科技有限公司 debugging method and system of intelligent mobile operating system
CN107317711A (en) * 2017-06-30 2017-11-03 北京小度信息科技有限公司 Cloud O&M method, device and computer-readable recording medium

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113760688A (en) * 2020-06-05 2021-12-07 腾讯科技(深圳)有限公司 Remote debugging method, system, webpage server, equipment and storage medium
CN112035306A (en) * 2020-09-04 2020-12-04 浙江网商银行股份有限公司 Debugging robot and debugging method
CN112528257A (en) * 2020-12-04 2021-03-19 百度在线网络技术(北京)有限公司 Security debugging method and device, electronic equipment and storage medium
CN112528257B (en) * 2020-12-04 2023-08-01 百度在线网络技术(北京)有限公司 Secure debugging method and device, electronic equipment and storage medium
CN112968889A (en) * 2021-02-08 2021-06-15 深圳市慧为智能科技股份有限公司 Host right management method, terminal, device and computer readable storage medium
CN112948790A (en) * 2021-05-13 2021-06-11 神威超算(北京)科技有限公司 Equipment debugging method and system based on block chain
CN113722686A (en) * 2021-08-17 2021-11-30 深圳市新国都股份有限公司 Debugging bridge authorization method, device, equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN109818742B (en) 2023-04-25

Similar Documents

Publication Publication Date Title
CN109818742A (en) A kind of apparatus debugging method, device and storage medium
CN109150907B (en) Vehicle-mounted industrial personal computer login method, device, system, computer equipment and medium
CN102195930B (en) Security access method among equipment and communication equipment
CN110719203B (en) Operation control method, device and equipment of intelligent household equipment and storage medium
WO2018036233A1 (en) Information processing method, device and computer storage medium
CN112468571B (en) Intranet and extranet data synchronization method and device, electronic equipment and storage medium
CN111586021B (en) Remote office business authorization method, terminal and system
CN108111486B (en) Method and device for avoiding repeated login
CN108134713A (en) A kind of communication means and device
CN112862487A (en) Digital certificate authentication method, equipment and storage medium
CN112838951B (en) Operation and maintenance method, device and system of terminal equipment and storage medium
CN111726328B (en) Method, system and related device for remotely accessing a first device
CN107763794A (en) The treating method and apparatus of fault data
CN107943622B (en) Standby operation and maintenance method, device and system
CN104270346B (en) The methods, devices and systems of two-way authentication
CN106130864A (en) A kind of privately owned cloud access method and apparatus based on VPN
CN109067749A (en) A kind of information processing method, equipment and computer readable storage medium
CN110190980B (en) System and method for supporting plug-in access to different blockchain alliance chain networks
US11240210B2 (en) Methods, apparatuses, and systems for acquiring local information
CN107920044A (en) A kind of safe verification method and device
CN110602133A (en) Intelligent contract processing method, block chain management device and storage medium
CN115129518A (en) Backup and recovery method, device, equipment and medium for TEE (trusted execution environment) stored data
CN104135482A (en) Authentication method and device as well as server
CN111814130B (en) Single sign-on method and system
CN113407931A (en) Password management method and device and input terminal

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