CN104079453B - The enumeration methodology and device of commissioning device - Google Patents

The enumeration methodology and device of commissioning device Download PDF

Info

Publication number
CN104079453B
CN104079453B CN201410320120.XA CN201410320120A CN104079453B CN 104079453 B CN104079453 B CN 104079453B CN 201410320120 A CN201410320120 A CN 201410320120A CN 104079453 B CN104079453 B CN 104079453B
Authority
CN
China
Prior art keywords
tested end
information
command
commissioning device
tested
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.)
Expired - Fee Related
Application number
CN201410320120.XA
Other languages
Chinese (zh)
Other versions
CN104079453A (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.)
Qisda Suzhou Co Ltd
Original Assignee
Qisda Suzhou Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qisda Suzhou Co Ltd filed Critical Qisda Suzhou Co Ltd
Priority to CN201410320120.XA priority Critical patent/CN104079453B/en
Publication of CN104079453A publication Critical patent/CN104079453A/en
Application granted granted Critical
Publication of CN104079453B publication Critical patent/CN104079453B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Test And Diagnosis Of Digital Computers (AREA)
  • Telephone Function (AREA)

Abstract

The invention discloses the enumeration methodologies and device of a kind of commissioning device.Wherein, the enumeration methodology of the commissioning device includes:When test lead is with tested end connection, it is tested end and receives the command information from test lead, wherein, command information enumerates the information of commissioning device in tested end for the tested end of instruction;Tested end generates loading command according to command information, wherein, loading command is the order of loading commissioning device;And tested end drives commissioning device to enumerate commissioning device according to loading command.By the present invention, the problem of solving in the prior art when terminal cannot start completely, the commissioning device in terminal can not be enumerated, reach when terminal is in the state that cannot start completely, can also enumerate the commissioning device in terminal device.

Description

The enumeration methodology and device of commissioning device
Technical field
The present invention relates to product development and testing field, in particular to a kind of enumeration methodology of commissioning device and Device.
Background technology
When terminal breaks down, it usually needs terminal is debugged.For example, the failure of Android mobile phone is adjusted Examination.When testing terminal, it can generally check the commissioning device in terminal, and pass through commissioning device and terminal is surveyed Examination.For example, the debugging bridge (Android debug bridge, referred to as ADB) in Android system, by debug bridge capture log, Cellphone information, file operation etc. are obtained, the failure of terminal is checked by obtaining the file of these terminals, for example, checking mobile phone Whether by root mistakes.No matter in the development process of terminal or in detection process, it is required for through commissioning device to terminal It is detected.Demand is, it is noted that ADB as a commissioning device, under terminal initial state will not generally enumerate ADB and set It is standby, after sale or want that the user for opening ADB can carry out corresponding operating to enumerate ADB equipment by system interface to system, For example it is chosen in the setting interface of Android system【Developer's option】In【USB is debugged】To open ADB equipment.But such as For fruit because of some exceptions, such as the mobile phone that user root is crossed, doing some special operations or hardware fault causes Android system System cannot start, then get on to operate to enumerate ADB equipment at interface with regard to no method, and need to be analyzed with ADB at this time Problem.It is exactly to re-download system to currently encounter the unique method of this problem, but the scene of problem can so be caused to be broken It is bad, so that leading to not know the reason for leading to system abnormity.
For the problem that when terminal cannot start completely, the commissioning device in terminal, mesh can not be enumerated in the prior art It is preceding not yet to propose effective solution.
The content of the invention
It is a primary object of the present invention to provide a kind of enumeration methodology of commissioning device and device, to solve in the prior art When terminal cannot start completely, the problem of commissioning device in terminal can not be enumerated.
To achieve these goals, according to an aspect of the invention, there is provided a kind of enumeration methodology of commissioning device.Root Enumeration methodology according to the commissioning device of the present invention includes:When test lead is with tested end connection, the tested end, which receives, to be come From the command information of the test lead, wherein, described instruction information is enumerated for the instruction tested end in the tested end The information of commissioning device;The tested end generates loading command according to described instruction information, wherein, the loading command is to add Carry the order of the commissioning device;And the tested end drives the commissioning device to enumerate according to the loading command State commissioning device.
Further, the tested end generates loading command according to described instruction information and includes:The tested end Kernel spacing in operating system monitors described instruction information;After the kernel spacing listens to described instruction information, to User's space in the operating system sends described instruction information;And the user's space is generated according to described instruction information The loading command, wherein, the loading command is sent to the kernel spacing by the user's space.
Further, the tested end drives the commissioning device according to the loading command and is set with enumerating the debugging It is standby to include:The kernel spacing receives the loading command;The kernel spacing drives the debugging according to the loading command Equipment, wherein, after the commissioning device is driven, the commissioning device is enumerated at the tested end.
Further, when test lead is with tested end connection, the tested end receives the finger from the test lead Information is made to include:The test lead and the tested end are connected by USB;Whether detect in the tested end has USB to set It is standby;If detecting has USB device in the tested end, predetermined instruction information is received, wherein, the predetermined instruction letter The form of communication protocol of the form of breath between the test lead and the tested end, the predetermined instruction information are instruction Enumerate the instruction of the USB device in the tested end.
Further, if detecting has USB device in the tested end, receiving predetermined instruction information includes: Whether the USB device for judging to detect is mass storage;And if the USB device detected is the massive store Device then receives the scsi command from the test lead, wherein, the scsi command is used to indicate the tested end and enumerates institute State USB device.
Further, if detecting has USB device in the tested end, receiving predetermined instruction information includes: The USB request bags sent by indexing order are received, wherein, the USB request bags are used to indicate the tested end and enumerate institute State USB device.
Further, the tested end receives the command information from the test lead and includes:The tested end inspection Survey keyboard-coding information, predetermined action information or predetermined image information;And when detecting the keyboard-coding information, described After predetermined action information or the predetermined image information, the command information for the information carrying that resolved detection arrives.
Further, the tested end receives the command information from the test lead and includes:The tested end leads to It crosses radio channel and receives the described instruction information from the test lead.
To achieve these goals, according to another aspect of the present invention, provide a kind of commissioning device enumerates device.Root Device of enumerating according to the commissioning device of the present invention includes:Receiving unit, for when test lead is with tested end connection, receiving and From the command information of the test lead, wherein, described instruction information is enumerated for the instruction tested end in the tested end The information of commissioning device;Generation unit, for generating loading command according to described instruction information, wherein, the loading command is Load the order of the commissioning device;And driving unit, for according to the loading command drive the commissioning device with piece Lift the commissioning device.
Further, the generation unit includes:Module is monitored, for by the operating system at the tested end Kernel spacing monitors described instruction information;Sending module, after listening to described instruction information in the kernel spacing, to User's space in the operating system sends described instruction information;And generation module, for passing through the user's space root The loading command is generated according to described instruction information, wherein, the loading command is sent to the kernel by the user's space Space.
Further, the driving unit includes:First receiving module receives described add for passing through the kernel spacing Carry order;Drive module drives the commissioning device for passing through the kernel spacing according to the loading command, wherein, After driving the commissioning device, the commissioning device is enumerated at the tested end.
Further, the receiving unit includes:Link block connects the test lead and the quilt for passing through USB Test lead;Detection module, for detecting in the tested end whether have USB device;Second receiving module, for detecting When there is USB device in the tested end, predetermined instruction information is received, wherein, the form of the predetermined instruction information is institute The form of the communication protocol between test lead and the tested end is stated, the predetermined instruction information is the instruction tested end Enumerate the instruction of the USB device.
By the present invention, using when test lead is with tested end connection, it is tested end and receives the instruction from test lead Information, wherein, command information enumerates the information of commissioning device in tested end for the tested end of instruction;Tested end is according to instruction Information generates loading command, wherein, loading command is the order of loading commissioning device;And tested end is driven according to loading command Dynamic commissioning device is solved in the prior art when terminal cannot start, can not enumerate terminal to enumerate the method for commissioning device In commissioning device the problem of, and then when terminal cannot start completely, enumerate the effect of the commissioning device in terminal.
Description of the drawings
The attached drawing for forming the part of the application is used for providing a further understanding of the present invention, schematic reality of the invention Example and its explanation are applied for explaining the present invention, is not constituted improper limitations of the present invention.In the accompanying drawings:
Fig. 1 is the flow chart of the enumeration methodology of commissioning device according to embodiments of the present invention;
Fig. 2 is the flow chart of the enumeration methodology of commissioning device according to the preferred embodiment of the invention;
Fig. 3 is the flow chart of the enumeration methodology of the commissioning device of another preferred embodiment according to the present invention;
Fig. 4 is the schematic diagram for enumerating device of commissioning device according to embodiments of the present invention;And
Fig. 5 is the schematic diagram for enumerating device of commissioning device according to the preferred embodiment of the invention.
Specific embodiment
It should be noted that in the case where there is no conflict, the feature in embodiment and embodiment in the application can phase Mutually combination.The present invention will be described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
In order to which those skilled in the art is made to more fully understand the present invention program, below in conjunction in the embodiment of the present invention The technical solution in the embodiment of the present invention is clearly and completely described in attached drawing, it is clear that described embodiment is only The embodiment of a part of the invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill people Member's all other embodiments obtained without making creative work should all belong to the model that the present invention protects It encloses.
Explanation of nouns:
ADB:That is Android debug bridge play the role of debugging bridge.Android program can be debugged by adb, It is a kind of detection instrument.ADB is an instrument in Android system, can directly operational administrative Android be simulated with this instrument Device or real Android device, its major function have:The port of the order line of running equipment, management simulation device or equipment is reflected It penetrates, upload/download file between computer and equipment, by local apk software installations to simulator or android equipment etc..
Kernel spacing:In an operating system, part kernel software operates in higher privilege independently of common applications In rank, they are resided on protected memory headroom, possess all permissions of access hardware devices, are kernel spacing.
User's space:In an operating system, the application program for operating in user's space can only see them is allowed to use Part system resource, and some specific system functions cannot be used, it can not directly access kernel space and hardware device. User's space and kernel spacing, which are placed under this asymmetric access mechanism, good security, can effectively prevent malice from using The snooping at family.
MTP:Media transfer protocol, media transmission protocol are based on PTP (picture transfer Protocol) the extension of agreement is mainly used for transmission media file.
RNDIS:Remote network driver interface specification, i.e. remote NDIS, far Journey Network Driver Interface specification.It realizes that RNDIS is actually TCP/IP over USB based on USB, is exactly to be transported on USB device Row TCP/IP allows USB as one piece of network interface card.
An embodiment of the present invention provides a kind of enumeration methodologies of commissioning device.
Android platform does kernel using linux operating systems, in many cases, although Android device cannot start shooting, What linux kernel still can start, and the USB drive parts of Android use USB driving structures in linux substantially, so only Linux is wanted to be activated, then USB drivings therein are also what can be worked, based on such situation, are not opened in Android device Machine can also enumerate commissioning device, i.e., when terminal cannot start completely, can also enumerate the commissioning device in terminal.
Fig. 1 is the flow chart of the enumeration methodology of commissioning device according to embodiments of the present invention.As shown in the figure, the commissioning device Enumeration methodology include the following steps:
Step S102 when test lead is with tested end connection, is tested end and receives the command information from test lead, In, command information enumerates the information of commissioning device in tested end for the tested end of instruction.
Tested terminal will be needed to be connected with the computer tested, i.e., test lead is connected with tested end, passes through Whether test lead is checked in tested end has commissioning device to be enumerated, if it is possible to check that into tested end there is debugging to set It is standby, but the commissioning device can not be enumerated, then test lead sends command information to tested end, correspondingly, is tested termination Receive the command information from test lead.
For example, test lead is the computer of windows systems, mobile phone of the end for Android system is tested, in computer and mobile phone Whether during in connection status, can be checked in mobile phone by the equipment manager in windows systems has commissioning device quilt piece It lifts, if viewing the commissioning device that has in mobile phone and can be enumerated, is used to indicate mobile phone to mobile phone transmission and enumerates the tune The information of equipment is tried, i.e., sends command information to mobile phone.
Step S104 is tested end and generates loading command according to command information, wherein, loading command is loading commissioning device Order.
Tested end receives command information, and generates loading command according to command information, to be adjusted by loading command The loading of equipment is tried, finally so that commissioning device is enumerated.
Step S106, tested end drive commissioning device to enumerate commissioning device according to loading command.
Tested end drives commissioning device according to loading command, so that commissioning device can be enumerated, i.e. test lead The commissioning device enumerated can be operated.For example, after commissioning device is enumerated, test lead can be set by debugging It is standby to complete crawl log, obtain cellphone information and obtain the actions such as operation file, so as to which the exception to tested end is analyzed.
By above-described embodiment, when cannot be started up at tested end, as long as when test lead is with tested end connection, surveying Examination end can view the commissioning device that the tested end can be enumerated, you can be believed by receiving the instruction from test lead Breath indicates to be tested end driving commissioning device, so that commissioning device is enumerated, so as to be held tested because failure leads to not out During machine, the commissioning device in tested end can be also enumerated, and then the commissioning device by enumerating is to tested the problem of holding It is analyzed and is solved.
Fig. 2 is the flow chart of the enumeration methodology of commissioning device according to the preferred embodiment of the invention.As shown in the figure, the debugging The enumeration methodology of equipment includes the following steps:
Step S202 when test lead is with tested end connection, is tested end and receives the command information from test lead, In, command information enumerates the information of commissioning device in tested end for the tested end of instruction.
Step S204, the kernel spacing being tested in the operating system at end monitor command information.
Kernel spacing in the operating system at tested end monitors command information, i.e., by kernel spacing detected whether come The command information at self-test end.
Step S206, after kernel spacing listens to command information, the user's space into operating system sends instruction Information.
After kernel spacing listens to command information, command information is sent to user's space.For example, in Android system In, by the use of netlink sockets as the communication interface of user's space and kernel spacing, by netlink sockets to user Space sends command information.
Step S208, user's space generate loading command according to command information, wherein, user's space sends loading command To kernel spacing.
User's space generates loading command according to command information, and loading command is sent to kernel spacing by user's space.
Step S210, tested end drive commissioning device to enumerate commissioning device according to loading command.
Above-mentioned steps S202 and step S210 is identical with step S102 shown in FIG. 1 and step S106 respectively, herein no longer It repeats.
By above-described embodiment, command information is received by kernel spacing, and command information is sent to user's space, is used Family space generates loading command according to command information, and the loading command of generation is sent to kernel spacing, passes through kernel spacing Drive commissioning device so that commissioning device is enumerated.Since kernel spacing and user's space are respectively intended to processing higher-rights Application program and common applications then can receive the command information from test lead by kernel spacing, and to use Family space generates loading command, then the loading command of generation is sent to kernel spacing, so as to both ensure tested end can and When receive command information, additionally it is possible to enumerate commissioning device in the case where ensureing tested end safety.
Further, be tested end drives commissioning device to include to enumerate commissioning device according to loading command:Kernel spacing Receive loading command.Kernel spacing drives commissioning device according to loading command, wherein, after commissioning device is driven, it is tested Enumerate commissioning device in end.
After kernel spacing receives the loading command from user's space, commissioning device is driven according to loading command, After commissioning device is driven, the commissioning device is enumerated at tested end.For example, it is set in kernel spacing according to loading command driving debugging It is standby, so that commissioning device can be enumerated.
Preferably, for the ease of enumerating commissioning device, when test lead is with tested end connection, tested end, which receives, to be come from The command information of test lead includes:Pass through USB connecting tests end and tested end.Whether detection has USB device in tested end. If detecting in tested end that there is USB device, predetermined instruction information is received, wherein, the form of predetermined instruction information is The form of communication protocol between test lead and tested end, predetermined instruction information enumerate USB device for the tested end of instruction Instruction.
After by USB connecting tests end and tested end, commissioning device can be enumerated by following two modes.
Mode one:
When cannot be started up at tested end, if detecting in tested end that there is USB device, predetermined instruction letter is received Breath includes:Whether the USB device for judging to detect is mass storage.If the USB device detected is massive store Device then receives the scsi command from test lead, wherein, scsi command is used to indicate tested end and enumerates USB device.
Mass storage, that is, mass storage equipment, after test lead is connected with tested end by USB, if It determines after there is USB device in tested end, judges whether the USB device is mass storage, and receive and carry out self-test The scsi command at end.Wherein, in order to enable tested end can recognize that command information, the command format of the scsi command with often The command format of SCSI is identical, but the content ordered is different from existing scsi command, since USB is enumerated at tested end The form of the scsi command of equipment is identical with existing scsi command, and content is different from existing scsi command, can avoid this The tested scsi command received that terminates is distinguished with other scsi commands, in order to avoid obscure.
Mode two:
It cannot be started up at tested end, and when the tested end cannot enumerate mass storage, it cannot Land use systems One progress commissioning device enumerates, then, if detecting in tested end that there is USB device, receive predetermined instruction letter Breath includes:Whether the USB device for judging to detect is media transmission equipment or remote network driver interface equipment.And if inspection The USB device measured is media transmission equipment or remote network driver interface equipment and other any one USB devices, then receives The USB request bags sent by indexing order, wherein, USB request bags are used to indicate tested end and enumerate USB device.
When the equipment for being detected progress file operation between responsible progress computer and terminal in end is not mass storage, The file of these progress file operations is detected by test side to enumerate USB device.For example, it is responsible between carrying out computer and interrupting The equipment for carrying out file operation is media transmission equipment or remote network driver interface equipment.Wherein, media transmission equipment is MTP, remote network driver interface equipment are rndis, judge the USB device monitored as MTP, Rndis or other USB device When, the USB request bags sent by indexing order are received, wherein, which, which is used to refer to tested end, enumerates USB and sets It is standby.Wherein, index order is the order in computer.
In the above-described embodiments, it is tested end and drives commissioning device by receiving command information, so that debugging is set During for the state without starting can be at tested end, commissioning device can be also enumerated.So as to solve the prior art In when terminal cannot start, the problem of commissioning device in terminal can not be enumerated, and then when terminal cannot start, Also the commissioning device in terminal can be enumerated, commissioning device is recycled to continue debugging and case study to terminal.
Preferably, in the above-described embodiments, being tested end command information of the reception from test lead includes:Tested end inspection Survey keyboard-coding information, predetermined action information or predetermined image information.And work as and detect keyboard-coding information, predetermined action After information or predetermined image information, the command information for the information carrying that resolved detection arrives.
Tested end is driven except through receiving scsi command and USB request bags beyond commissioning device, can also be passed through Keyboard-coding information, predetermined action information or predetermined image information etc. are detected to obtain command information, by these detections To information parsed and can obtain command information, and commissioning device is driven according to command information, it is achieved thereby that tested Commissioning device can be also enumerated under examination end resting state.
Keyboard-coding information can be received by physical keyboard, dummy keyboard even external connection keyboard, and predetermined action can be with It is received by being tested the displacement sensor set in end or gravity sensor, predetermined image information can pass through touch-screen Curtain draws predetermined image to receive.The case coding information received can be string number, letter or combination, go back Can be that long-time button and short time button combine immediately, the predetermined action information received can draw 8 fonts with mobile phone, The predetermined image information received can be lines that are circular, square or meeting certain rule.
By above-described embodiment, the mode that tested end receives command information is not limited to scsi command and USB Request bag can also be keyboard-coding information, predetermined action information and predetermined image information etc., it is necessary to which explanation, is being tested In the case that examination end is not actuated, the sensor at tested end etc. can also work, then the corresponding mode of operation of sensor may be employed Receive command information.
Preferably, being tested end command information of the reception from test lead includes:The side that tested end passes through radio channel Formula receives the command information from test lead.For example, tested end passes through in wifi, Bluetooth channels or other radio channels Any one mode receives the command information from test lead.
In test lead and tested end connection, appointing in wifi, Bluetooth channels or other radio channels can be passed through A kind of mode of anticipating receives the command information from test lead, however it is not limited to receive the command information from test lead by USB.And After generating the data processing means of loading command etc. after the reception command information such as wifi and receiving command information by USB Data processing means it is identical, therefore, connecting test end and tested end and in test lead and tested by other means The mode of end transmission data can be identical with the connection mode of USB, then other companies may be employed in the interface damage of USB The mode of connecing carries out the transmission and processing of data, during so as to ensure not starting at tested end, sets some connecting interfaces can not During normal work, the commissioning device in tested end can be also enumerated, and then the commissioning device by enumerating is to tested end The problem of analyzed and solved.
The enumeration methodology of the commissioning device of the embodiment of the present invention is illustrated below in conjunction with Fig. 3.
The application program of test lead sends command information, and the kernel spacing for being tested end receives command information, and will instruction Information is sent to user's space, and user's space generation loading command is simultaneously sent to drive module, and drive module is according to loading command Commissioning device is driven, so that commissioning device can be enumerated.
What the embodiment of the present invention additionally provided a kind of commissioning device enumerates device.
Fig. 4 is the schematic diagram for enumerating device of commissioning device according to embodiments of the present invention.As shown in the figure, the commissioning device Device of enumerating include:Receiving unit 10, generation unit 20 and driving unit 30.
Receiving unit 10 is used to, when test lead is with tested end connection, receive the command information from test lead, wherein, Command information enumerates the information of commissioning device in tested end for the tested end of instruction.
Tested terminal will be needed to be connected with the computer tested, i.e., test lead is connected with tested end, passes through Whether test lead is checked in tested end has commissioning device to be enumerated, if it is possible to check that into tested end there is debugging to set It is standby, but the commissioning device can not be enumerated, then test lead sends command information to tested end, correspondingly, is tested termination Receive the command information from test lead.
For example, test lead is the computer of windows systems, mobile phone of the end for Android system is tested, in computer and mobile phone Whether during in connection status, can be checked in mobile phone by the equipment manager in windows systems has commissioning device quilt piece It lifts, if viewing the commissioning device that has in mobile phone and can be enumerated, is used to indicate mobile phone to mobile phone transmission and enumerates the tune The information of equipment is tried, i.e., sends command information to mobile phone.
Generation unit 20 is used to generate loading command according to command information, wherein, loading command is loading commissioning device Order.
Tested end receives command information, and generates loading command according to command information, to be adjusted by loading command The loading of equipment is tried, finally so that commissioning device is enumerated.
Driving unit 30 is used to according to loading command commissioning device be driven to enumerate commissioning device.
Tested end drives commissioning device according to loading command, so that commissioning device can be enumerated, i.e. test lead The commissioning device enumerated can be operated.For example, after commissioning device is enumerated, test lead can be set by debugging It is standby to complete crawl log, obtain cellphone information and obtain the actions such as operation file, so as to which the exception to tested end is analyzed.
By above-described embodiment, when cannot be started up at tested end, as long as when test lead is with tested end connection, surveying Examination end can view the commissioning device that the tested end can be enumerated, you can be believed by receiving the instruction from test lead Breath indicates to be tested end driving commissioning device, so that commissioning device is enumerated, so as to be held tested because failure leads to not out During machine, the commissioning device in tested end can be also enumerated, and then the commissioning device by enumerating is to tested the problem of holding It is analyzed and is solved.
Fig. 5 is the schematic diagram for enumerating device of commissioning device according to the preferred embodiment of the invention.As shown in the figure, the debugging The device of enumerating of equipment includes:Receiving unit 10, generation unit 20 and driving unit 30, wherein, receiving unit 10, generation unit 20 is identical with the effect for acting on embodiment illustrated in fig. 4 of driving unit 30, repeats no more, generation unit 20 includes:
It monitors the kernel spacing that module 201 is used in the operating system by tested end and monitors command information.
Kernel spacing in the operating system at tested end monitors command information, i.e., by kernel spacing detected whether come The command information at self-test end.
Sending module 202 is used for after kernel spacing listens to command information, the user's space hair into operating system Send command information.
After kernel spacing listens to command information, command information is sent to user's space.For example, in Android system In, by the use of netlink sockets as the communication interface of user's space and kernel spacing, by netlink sockets to user Space sends command information.
Generation module 203 is used to generate loading command according to command information by user's space, wherein, user's space will add It carries order and is sent to kernel spacing.
User's space generates loading command according to command information, and loading command is sent to kernel spacing by user's space.
By above-described embodiment, command information is received by kernel spacing, and command information is sent to user's space, is used Family space generates loading command according to command information, and the loading command of generation is sent to kernel spacing, passes through kernel spacing Drive commissioning device so that commissioning device is enumerated.Since kernel spacing and user's space are respectively intended to processing higher-rights Application program and common applications then can receive the command information from test lead by kernel spacing, and to use Family space generates loading command, then the loading command of generation is sent to kernel spacing, so as to both ensure tested end can and When receive command information, additionally it is possible to enumerate commissioning device in the case where ensureing tested end safety.
Further, driving unit includes:First receiving module receives loading command for passing through kernel spacing.Driving Module drives commissioning device for passing through kernel spacing according to loading command, wherein, after commissioning device is driven, it is tested Enumerate commissioning device in end.
After kernel spacing receives the loading command from user's space, commissioning device is driven according to loading command, After commissioning device is driven, the commissioning device is enumerated at tested end.For example, it is set in kernel spacing according to loading command driving debugging It is standby, so that commissioning device can be enumerated.
Preferably, for the ease of enumerating commissioning device, receiving unit includes:Link block, for passing through USB connecting tests End and tested end.Detection module, for detecting in tested end whether have USB device.Second receiving module, for detecting When there is USB device into tested end, receive predetermined instruction information, wherein, the form of predetermined instruction information for test lead and The form of communication protocol between tested end, predetermined instruction information enumerate the instruction of USB device for the tested end of instruction.
After by USB connecting tests end and tested end, commissioning device can be enumerated by following two modes.
Mode one:
When cannot be started up at tested end, if detecting in tested end that there is USB device, predetermined instruction letter is received Breath includes:Whether the USB device for judging to detect is mass storage.If the USB device detected is massive store Device then receives the scsi command from test lead, wherein, scsi command is used to indicate tested end and enumerates USB device.
Mass storage, that is, mass storage equipment, after test lead is connected with tested end by USB, if It determines after there is USB device in tested end, judges whether the USB device is mass storage, and receive and carry out self-test The scsi command at end.Wherein, in order to enable tested end can recognize that command information, the command format of the scsi command with often The command format of SCSI is identical, but the content ordered is different from existing scsi command, since USB is enumerated at tested end The form of the scsi command of equipment is identical with existing scsi command, and content is different from existing scsi command, can avoid this The tested scsi command received that terminates is distinguished with other scsi commands, in case it is abnormal that MassStorage functions is caused to occur.
Mode two:
When cannot be started up at tested end, and when the tested end cannot enumerate mass storage, side cannot be utilized Formula one carries out enumerating for commissioning device, then, if detecting in tested end that there is USB device, receive predetermined instruction Information includes:Whether the USB device for judging to detect is media transmission equipment or remote network driver interface equipment.And if The USB device detected is media transmission equipment or remote network driver interface equipment, then receives what is sent by indexing order USB request bags, wherein, USB request bags are used to indicate tested end and enumerate USB device.
When the equipment for being detected progress file operation between responsible progress computer and terminal in end is not mass storage, The file of these progress file operations is detected by test side to enumerate USB device.For example, it is responsible between carrying out computer and interrupting The equipment for carrying out file operation is media transmission equipment or remote network driver interface equipment.Wherein, media transmission equipment is MTP, remote network driver interface equipment are rndis, judge the USB device monitored as MTP, rndis or any USB device When, the USB request bags sent by indexing order are received, wherein, which, which is used to refer to tested end, enumerates USB and sets It is standby.Wherein, index order is the USB request orders in computer.
In the above-described embodiments, it is tested end and drives commissioning device by receiving command information, so that debugging is set During for the state without starting can be at tested end, commissioning device can be also enumerated.So as to solve the prior art In when terminal cannot start, the problem of commissioning device in terminal can not be enumerated, and then when terminal cannot start, Also the commissioning device in terminal can be enumerated, commissioning device is recycled to continue debugging and case study to terminal.
The foregoing is only a preferred embodiment of the present invention, is not intended to limit the invention, for the skill of this field For art personnel, the invention may be variously modified and varied.Within the spirit and principles of the invention, that is made any repaiies Change, equivalent substitution, improvement etc., should all be included in the protection scope of the present invention.

Claims (10)

1. a kind of enumeration methodology of commissioning device, which is characterized in that including:
In the case of it cannot be started up at tested end, when test lead is connected with the tested end, the tested termination The command information from the test lead is received, wherein, described instruction information is enumerated described tested for the instruction tested end The information of commissioning device in end;
The tested end generates loading command according to described instruction information, wherein, the loading command is the loading debugging The order of equipment;And
The tested end drives the commissioning device to enumerate the commissioning device according to the loading command;
Wherein, when test lead is connected with the tested end, the tested end receives the instruction letter from the test lead Breath includes:
The test lead and the tested end are connected by USB;
Whether detect in the tested end has USB device;
If detecting has USB device in the tested end, predetermined instruction information is received, wherein, the predetermined instruction The form of communication protocol of the form of information between the test lead and the tested end, the predetermined instruction information are finger Show that the instruction of the USB device is enumerated at the tested end.
2. enumeration methodology according to claim 1, which is characterized in that the tested end is generated according to described instruction information Loading command includes:
Kernel spacing in the operating system at the tested end monitors described instruction information;
After the kernel spacing listens to described instruction information, the user's space into the operating system sends the finger Make information;And
The user's space generates the loading command according to described instruction information, wherein, the user's space is by the loading Order is sent to the kernel spacing.
3. enumeration methodology according to claim 2, which is characterized in that the tested end drives according to the loading command The commissioning device is included with enumerating the commissioning device:
The kernel spacing receives the loading command;
The kernel spacing drives the commissioning device according to the loading command, wherein, after the commissioning device is driven, Enumerate the commissioning device in the tested end.
4. enumeration methodology according to claim 1, which is characterized in that if detecting has USB in the tested end Equipment, then receiving predetermined instruction information includes:
Whether the USB device for judging to detect is mass storage;And
If the USB device detected is the mass storage, the scsi command from the test lead is received, In, the scsi command is used to indicate the tested end and enumerates the USB device.
5. enumeration methodology according to claim 1, which is characterized in that if detecting has USB in the tested end Equipment, then receiving predetermined instruction information includes:
The USB request bags sent by indexing order are received, wherein, the USB request bags are used to indicate the tested end piece Lift the USB device.
6. enumeration methodology according to claim 1, which is characterized in that the tested end is received from the test lead Command information includes:
The tested end detection keyboard-coding information, predetermined action information or predetermined image information;And
After the keyboard-coding information, the predetermined action information or the predetermined image information is detected, parsing inspection The command information that the information measured carries.
7. enumeration methodology according to claim 1, which is characterized in that the tested end is received from the test lead Command information includes:
The tested end receives the described instruction information from the test lead by way of radio channel.
8. a kind of commissioning device enumerates device, which is characterized in that including:
Receiving unit, in the case of it cannot be started up at tested end, when test lead is connected with the tested end, connecing The command information from the test lead is received, wherein, described instruction information is enumerated described tested for the instruction tested end The information of commissioning device in end;
Generation unit, for generating loading command according to described instruction information, wherein, the loading command is the loading debugging The order of equipment;And
Driving unit, for according to the loading command commissioning device being driven to enumerate the commissioning device;
Wherein, the receiving unit includes:
Link block connects the test lead and the tested end for passing through USB;
Detection module, for detecting in the tested end whether have USB device;
Second receiving module, for when having USB device in detecting the tested end, receiving predetermined instruction information, In, the form of the communication protocol of the form of the predetermined instruction information between the test lead and the tested end is described Predetermined instruction information enumerates the instruction of the USB device for the instruction tested end.
9. according to claim 8 enumerate device, which is characterized in that the generation unit includes:
Module is monitored, for monitoring described instruction information by the kernel spacing in the operating system at the tested end;
Sending module, after listening to described instruction information in the kernel spacing, the user into the operating system Space sends described instruction information;And
Generation module, for generating the loading command according to described instruction information by the user's space, wherein, the use The loading command is sent to the kernel spacing by family space.
10. according to claim 9 enumerate device, which is characterized in that the driving unit includes:
First receiving module receives the loading command for passing through the kernel spacing;
Drive module drives the commissioning device for passing through the kernel spacing according to the loading command, wherein, it is driving After the commissioning device, the commissioning device is enumerated at the tested end.
CN201410320120.XA 2014-07-07 2014-07-07 The enumeration methodology and device of commissioning device Expired - Fee Related CN104079453B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410320120.XA CN104079453B (en) 2014-07-07 2014-07-07 The enumeration methodology and device of commissioning device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410320120.XA CN104079453B (en) 2014-07-07 2014-07-07 The enumeration methodology and device of commissioning device

Publications (2)

Publication Number Publication Date
CN104079453A CN104079453A (en) 2014-10-01
CN104079453B true CN104079453B (en) 2018-05-18

Family

ID=51600508

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410320120.XA Expired - Fee Related CN104079453B (en) 2014-07-07 2014-07-07 The enumeration methodology and device of commissioning device

Country Status (1)

Country Link
CN (1) CN104079453B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104991846B (en) * 2015-07-01 2018-03-02 上海斐讯数据通信技术有限公司 The switching system and method for a kind of working mode of mobile terminal
WO2019061343A1 (en) * 2017-09-29 2019-04-04 深圳传音通讯有限公司 Method and apparatus for detecting device of smart terminal

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102131308A (en) * 2010-01-18 2011-07-20 盛大计算机(上海)有限公司 Method for operating Android mobile phone file system at PC (Personal Computer) terminal
CN102662924A (en) * 2012-03-14 2012-09-12 福州瑞芯微电子有限公司 Method for solving incompatibility problem in character set transmission from PC to Android system based on hybrid coding
CN103246586A (en) * 2013-04-19 2013-08-14 福州瑞芯微电子有限公司 Method for utilizing USB (universal serial bus) storage equipment for ADB (android debug bridge) debugging on android platform
CN103559126A (en) * 2013-10-25 2014-02-05 深圳市欧珀通信软件有限公司 Method, device and computer terminal for testing software versions

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102131308A (en) * 2010-01-18 2011-07-20 盛大计算机(上海)有限公司 Method for operating Android mobile phone file system at PC (Personal Computer) terminal
CN102662924A (en) * 2012-03-14 2012-09-12 福州瑞芯微电子有限公司 Method for solving incompatibility problem in character set transmission from PC to Android system based on hybrid coding
CN103246586A (en) * 2013-04-19 2013-08-14 福州瑞芯微电子有限公司 Method for utilizing USB (universal serial bus) storage equipment for ADB (android debug bridge) debugging on android platform
CN103559126A (en) * 2013-10-25 2014-02-05 深圳市欧珀通信软件有限公司 Method, device and computer terminal for testing software versions

Also Published As

Publication number Publication date
CN104079453A (en) 2014-10-01

Similar Documents

Publication Publication Date Title
CN109302522B (en) Test method, test device, computer system, and computer medium
KR101027971B1 (en) Mobile communication terminal capable of testing application and method thereof
US9697108B2 (en) System, method, and apparatus for automatic recording and replaying of application executions
CN109388569B (en) Method for remotely detecting environmental anomaly of client, test server and storage medium
US9767003B2 (en) Conditional component breakpoint setting system and method
KR101414720B1 (en) Functional safety testing device for train control system software and the method thereof
KR101874416B1 (en) Universal serial bus emulation of peripheral devices
CN109525509A (en) Network interface card mirror image packet snapping method, terminal and readable storage medium storing program for executing
CN110188013A (en) A kind of log read-write capability test method, device and electronic equipment and storage medium
CN106872879B (en) Hardware wireless debugging method and device, communication chip and electronic equipment
TW201423385A (en) Test system and method for computer
US20210111967A1 (en) Graphical user interface for traffic capture and debugging tool
CN104079453B (en) The enumeration methodology and device of commissioning device
CN109921960B (en) IDC machine room network anomaly testing method and device
TW201423387A (en) System and method for testing a plurality of SAS expanders synchronously
CN104536884B (en) Code test method and device
CN108364670A (en) Read and write method for testing pressure, device, equipment and storage medium
US8516311B2 (en) System and method for testing peripheral component interconnect express switch
CN110968004A (en) Cable test system and method based on FPGA prototype verification development board
CN103281221B (en) Fire-fighting Internet of things system method of testing
KR101425641B1 (en) Electronic Gaming Machine Testing System
CN110191013A (en) Electronic device, the Mock test method of more capital's interfaces and storage medium
CN112148537A (en) Bus monitoring device and method, storage medium, and electronic device
CN112671814B (en) Cross-platform equipment development method, device and system
TWI641247B (en) Method for processing messages

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180518

Termination date: 20210707

CF01 Termination of patent right due to non-payment of annual fee