CN105068946A - Android device identification method and apparatus - Google Patents

Android device identification method and apparatus Download PDF

Info

Publication number
CN105068946A
CN105068946A CN201510500423.4A CN201510500423A CN105068946A CN 105068946 A CN105068946 A CN 105068946A CN 201510500423 A CN201510500423 A CN 201510500423A CN 105068946 A CN105068946 A CN 105068946A
Authority
CN
China
Prior art keywords
android device
equipment
unit
android
vid
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201510500423.4A
Other languages
Chinese (zh)
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.)
BEIJING DINGKAI INTERCONNECT INFORMATION TECHNOLOGY Co Ltd
Original Assignee
BEIJING DINGKAI INTERCONNECT INFORMATION TECHNOLOGY 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 BEIJING DINGKAI INTERCONNECT INFORMATION TECHNOLOGY Co Ltd filed Critical BEIJING DINGKAI INTERCONNECT INFORMATION TECHNOLOGY Co Ltd
Priority to CN201510500423.4A priority Critical patent/CN105068946A/en
Publication of CN105068946A publication Critical patent/CN105068946A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices
    • G06F13/12Program control for peripheral devices using hardware independent of the central processor, e.g. channel or peripheral processor

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The present invention discloses an Android device identification method and apparatus. In an ADB process, an Android device is taken over by using a hook process, and a VID and a PID of the Android device are modified to specific values. The VID and the PID form an identification code of the Android device. All Android devices are virtualized to have the same VID and PID codes. In this way, different Android devices can be identified by using one ADB driver.

Description

A kind of recognition methods of Android device and device
Technical field
The present invention relates to field of computer technology, particularly a kind of method of outside Android device being operated by computing machine and device.
Background technology
Along with intelligent electronic device is more and more universal, the user group of smart mobile phone, flat board, TV etc. is increasing.Along with the expansion of user group, whole user cannot be made can both to be familiar with how operating Android device and controlling.How to make user more convenient, intelligent Android device is interconnected by terminal devices such as PC (personal computer, PersonalComputer), notebook computers and operates the problem becoming people and compare concern quickly.
At present, Android system one of common operating system becoming intelligent electronic device.Opening due to Android system makes people can develop various interface facility to connect terminal device, but simultaneously, its opening also causes the Android device assistant of PC to get more and more.After installation PC Android device assistant, user can pass through USB (UniversalSerialBus, USB (universal serial bus)) Interface realization to the operation of Android device.That relatively commonly uses now has Qihoo 360 mobile phone assistant, pea pods mobile phone assistant (also claiming pea pods mobile phone spirit), Tengxun mobile phone house keeper etc.By these mobile phones assistant, user can easily download, install, managing mobile phone resource, realizes vast resources one key and installs, the functions such as the convenient management of application program.
But these traditional Android device assistants can have one to install ADB (AndroidDebugBridge) and drive process when the equipment of an insertion different brands different model.
Composition graphs 1, existing general Adb workflow is as follows:
1, Adb is started.
2, now Adbserver receives order, such as Adbdevices, and Adbdevices is sent to dynamic routine storehouse AdbWinApi.
3, after AdbWinApi receives order, then send to corresponding windows to drive message Adbdevices, if do not have corresponding windows to drive, return NULL to Adbserver.
4, windows is driven through usb bus and Adbdevices order is sent to Android device, the result (i.e. device name) after Android device process, and former road returns to Adb service, and on computer screen, show the device name of Android device.Now operate.
Install when driving and can conflict with the automatic update mechanism of the driving of WINDOWS operating system.If the simultaneous words of equipment assistant of You Jijia software company, also can there is conflict in the installation that Android device ADB drives.Tradition Android device assistant can provide a conventional Android device ADB Driver Library on the webserver, and the Android device like this for unexpected winner does not provide support.And also there is following problem in traditional Android device assistant:
1) PC end is when linking with Android device first, consuming time at 30 seconds to 1 minute not etc.
2) compatibility is not high, drives, some Android device can be caused to drive cisco unity malfunction if need to install a large amount of Android device
3) suitability is not high, has newly gone out a Android device, when traditional Android device assistant does not upgrade Driver Library again, Android device cannot be made normally to work if following.
The reason of the problems referred to above is caused to be:
1) above-mentioned Android device assistant has the Driver Library of oneself, when each Android device is inserted, assistant can detect Android device model and be sent to Driver Library server, be downloaded to after Driver Library server mates on subscriber computer and install, this mode, in network under-developed area or the area not having network completely, uses and has limitation.
2) and when not upgrading Driver Library, new Android device can it fails to match in old Driver Library, driving is caused to download.
3) compatibility issue, because Android device manufacturer is various, the ins and outs developed each other are also relatively secret, can monopolize some operating-system resources so drive in operation in Android device, and causing other Android device to drive cannot normally work.
Summary of the invention
The present invention is solved the problem by a kind of brand-new thinking, changing traditional Android device assistant is completely the technology general layout that Android device installs driving on PC, and the present invention does not have Driver Library completely, compatible all Android device, respond Android device access rapidly, after Android device inserts PC, 1-3 just can identify second, operates on it.
The invention provides a kind of recognition methods and device of Android device, comprise, 1) in ADB process, be connected to the described Android device of computer by the adapter of hook process; 2) production firm ID and VID of described Android device, product IDs and PID are revised as a particular value, together with VID with PID, form the identification code of described Android device; 3) this has the different Android device of all insertion computers to be virtual as and has same VID and PID code, uses an ADB to drive like this and can identify different Android device.
The present invention also provides a kind of recognition methods and device of other Android device, comprise: 1) hook unit is set in filter element, when Android device one plugs computer, hook unit starting in this filter element, this equipment is filtered unit adapter, and the VID_PID of equipment is revised as a predetermined value, subsequently this value is sent to Dispatching Unit; Meanwhile, filter element reads the device descriptor of Android device and notifies encapsulation unit, thus realizes docking of Android device driver and interface.2), after Dispatching Unit receives the notice of filter element, Dispatching Unit can check whether the VID_PID of Android device is described predetermined value; If so, then copy the handle of this Android device, send to service unit; If not, then abandon capturing; 3), after service unit receives ADB order, the handle sent by Dispatching Unit, is operated Android device.
Whether further, wherein also comprising the equipment connected is the deterministic process of Android device, if Android device then reads, sends if not, service unit the crawl that message abandons equipment to Dispatching Unit and then notification filter elements.
Further, described in encapsulation unit realizes, be whether wherein the deterministic process of Android device.
Further, wherein saidly determine whether that the mode of Android device is concrete mode and is: check that the main classes of this equipment is 0xFF, judge that subclass is 0x42 subsequently, if these two values all meet standard, just can assert that it is Android device, if any one does not meet, assert it is not Android device.
Further, if when wherein having multiple recognizer to start simultaneously, then Dispatching Unit is responsible for judging which assistant obtains this equipment.
Further, wherein current mouse or cursor current mouse are in which Helper program, then with which equipment connect.
Further, wherein in described identifying, service unit performs step below simultaneously:
1) initialization step is carried out; 2) device step is searched in execution, and enumerates all current Active Interface by Globally Unique Identifier (GUID); 3) judge whether have USB interface in these Active Interface, if not, turn back to step 2) search next equipment, perform step 4 if had); 4) obtain each USB interface information and device name, and judge whether this device name is present in ADB transmission list, if so, then searched before showing this equipment and identified, then returned step 2) search next equipment; Be not present in ADB transmission list if this equipment does not become, show that this equipment is new equipment, then perform step 5); 5) open USB device by USB interface title, and interface name is put into the USB_device_handle structure of ADB, perform step 6 subsequently); 6) again identify, whether judgment device is Android device, first VID and the PID code of extraction device, judges whether this VID code exists in the VID list prestored subsequently, if existed, illustrates that this equipment is Android device, performs step 7 subsequently); If there is no, then illustrate that this USB device is not Android device, return step 2) search next equipment.7) obtain this Android device USB device string number, and be registered in ADB transmission list, return step 2 subsequently) search next USB device.
Invention effect:
The present invention installs driving separately without the need to giving each Android device, can adaptive all known, unknown equipment meeting Android ADB standard, is linked into power up to 100%.
Tradition Android device assistant needs to mate the VID_PID of Android device, and the drive installation of downloading correspondence of then must networking could use.According to the network environment of each user, this mode causes drive installation sometimes fast and sometimes slow, if unstable networks also can cause installing unsuccessfully, user perceptibility reduces.And the present invention is to all Android device in market, and all vast scale is compatible, does not need that Android device is installed and drive, without driving link, user perceptibility can be improved.
Tradition Android device assistant installs to drive under windows complex environment, and this results in some Android device driving can not install, and can not coexist, and the mistake of some the unknowns can be caused to occur.Tediously long activation bit is had under also causing registration table and system directory.We have taken over the management of windows to USB device, avoid windows complex environment, improve the stability that USB device connects.
Accompanying drawing illustrates:
Fig. 1 is the process flow diagram of existing Android device assistant Adb.
Fig. 2 is the process flow diagram of the Adb of Android device of the present invention
Fig. 3 is the process flow diagram that service unit of the present invention performs identification equipment
Embodiment:
First ADB is briefly described below:
The Adbclient of the Adbserver that Adb is held by pc, pc end, and the Adb finger daemon composition of Android device end.Adbclient and the Adbserver module of Pc end generally can be done in same program (such as Adb.exe), if this program starts (as action command Adbdevices) as client, then now whether it can detect its Adbserver process and start, and can start Adbserver if be not activated.Wherein:
AdbClient:Adbserver generally can not terminate after pc end opens, often perform an Adb order (to refer to here except special for the order of server, as Adbshell, Adbinstall etc.) be just equivalent to start an Adbclient, this Adbclient can be connected to Adbserver, then by Adbserver querying command, if need with Android device mutual, then Adbserver can be responsible for alternately, and result returns to Adbclient the most at last.
Adbserver:Adbserver is responsible for and the communication of Android device (by tcp/ip or usb), is responsible for monitoring pc port simultaneously, waits for the connection (default port 5037) of Adbclient.
Adbd:Adbd operates in Android device as finger daemon, and its effect is connected to Adbserver, and provides some to serve for the Adbclient on pc
According to the regulation of USB specification, all USB device Dou You suppliers identification code (VID) and product ID (PID), main frame distinguishes different equipment by different VID and PID, VID and PID is two byte longs, wherein, supplier's identification code (VID) performs forum by supplier to USB and applies for, the VID of each supplier is unique, PID is decided in its sole discretion by supplier, in theory, different products, the different model of like products, the product of the different designs of same model preferably adopts different PID, to distinguish the distinct device of identical producer.
In windows system, even if 2 Android device can use same Adb driver, but if their VID_PID is different, windows operating system still can not identify, therefore, needs to reinstall Adb to the different Android device of VID_PID and drives.
The VID of the G750-T20 mobile phone of such as Huawei is 12D1, PID is 1052, and the VID of the SM-A3000 mobile phone of Samsung is 04E8, PID is 6860, and they use same Adb to drive M.But in reality, when inserting the G750-T20 mobile phone of Huawei, system can be installed Adb and be driven M, and Huawei's mobile phone can normally use, but the SM-A3000 mobile phone now inserting Samsung but can not identify, also need to do installation again Adb and drive M.The consequence caused like this drives exactly and repeats to install, and brings various immeasurable adverse consequences.
Present invention employs a mode cleverly, avoid windows complex environment.Concrete mode is, a virtual USB device on windows, and take over all Android device, VID and PID of all Android device has been unified, so only need to install at windows once to drive, just reach and do not need the object driving the omnipotent driving that just can identify all kinds of Android device is repeatedly installed, unified usb communication agreement at driving layer.
Fig. 2 is the amendment schematic diagram of the Android device driving flow process of Android device assistant of the present invention, wherein:
Service unit DKAdbWinApi, it is by the Adb service in Fig. 1 and dynamic base unit AdbWinApi comprehensively and carried out the amended routine library of part.Service unit DKAdbWinApi is operated Android device by encapsulation unit DKVMUsb, whenever user operation Android device, when such as reading the information of Android device, address list etc., just send order by service unit DKAdbWinApi to encapsulation unit DKVMUsb, encapsulation unit DKVMUsb is to service unit DKAdbWinApi return command result subsequently.Service unit DKAdbWinApi is also responsible for the crawl of notification filter elements DKHcmon relieving to Android device.
Filter element DKHcmon, be used for filtering the USB device of all insertions, its major function only captures Android device, do not capture other USB device, as USB flash disk, USB printer, USB handwriting pad etc.Hook unit is had in it, in the process of the plug and play message (IRP_MJ_PNP) of kernel, hang hook, Android device one plugs computer, in fact just be filtered cells D KHcmon to have taken over, filter element DKHcmon can capture multiple equipment simultaneously, such as 128, certainly can capture more equipment by Extended Capabilities Port.Filter element DKHcmon has a USB device to capture list, and it is revised as 0D4B & 0002 the VID_PID of all USB device, and this value is sent to Dispatching Unit DKUSBArb.In addition, while execution above-mentioned steps, the descriptor of USB device also can be sent to encapsulation unit DKVMUsb by filter element DKHcmon.
Dispatching Unit DKUSBArb is responsible for the connection between filter element DKHcmon and service unit DKAdbWinApi, for transmitting the order of service unit DKAdbWinApi to filter element DKHcmon, when after the VID_PID value receiving filter element DKHcmon transmission, it opens corresponding USB device by VID_PID value, the handle of USB device is copied sending to service unit DKAdbWinApi.
Encapsulation unit DKVMUsb is connected with actual Android device as the driver element of Android device, if find that this USB device is not Android device, it sends this equipment of message informing to service unit DKAdbWinApi is not Android device, service unit DKAdbWinApi and then meeting notification filter elements DKHcmon.Hook Function in filter element DKHcmon is not just put into this USB device and is captured list, direct release is to operating system, operating system oneself is allowed to go operation, if this USB device is Android device, just this equipment is put into and capture list, until before Android device pulls out, this Android device can not be discharged again.
Encapsulation unit DKVMUsb, for Android device being packaged into a general USB device, and the VID_PID of this general USB device has been changed into a value of specifying by us, such as 0D4B_0002, so just can avoid the complex environment of windows; Encapsulation unit DKVMUsb is only to service unit DKAdbWinApi open link.Encapsulation unit DKVMUsb judges that whether this equipment be the method for Android device and be, first check that the main classes (BaseClass) of this USB device is 0xFF (VendorSpecific Vendor-specific specification), judge that subclass (SubClass) is 0x42 subsequently, if these two values all meet standard, just can assert that it is Android device, otherwise this not.
Illustrate that Android device of the present invention drives flow process below in conjunction with accompanying drawing 2
1, Android device one plugs computer, in fact just be filtered cells D KHcmon to have taken over, after adapter, filter element DKHcmon will be revised as a particular value the VID_PID of Android device, such as USB Vid_0D4B & Pid_0002, then give Dispatching Unit DKUSBArb send notice.Meanwhile, device descriptor is notified encapsulation unit DKVMUsb by filter element DKHcmon, thus realizes docking of Android device driver and interface.
2. after Dispatching Unit DKUSBArb receives the notice of filter element DKHcmon, the VID_PID of Android device can be checked, if VID and PID of Android is predetermined value, such as VID is 0D4B, when PID is 0002, then copy the handle of this equipment, send to service unit DKAdbWinApi, if VID_PID is not 0D4B & 0002, then abandon capturing.。
3, after service unit DKAdbWinApi receives ADB order (such as Adbdevices), encapsulation unit DKVMUsb is used to operate Android device by above-mentioned handle.
Further, to the equipment connected, whether Android device judges encapsulation unit DKVMUsb subsequently, if it is Android device is read, if not, then send message to service unit DKAdbWinApi, service unit DKAdbWinApi transmission message abandons the crawl to equipment to Dispatching Unit DKUSBArb and then notification filter elements DKHcmon.
Describedly determine whether Android device further for determining whether the step of Android device, wherein judge that whether described equipment be the step of Android device and be: main classes (BaseClass) the whether 0xFF (VendorSpecific Vendor-specific specification) first checking this USB device, judge that subclass (SubClass) is 0x42 subsequently, if these two values all meet standard, just can assert that it is Android device, otherwise this not.
In further scheme, if encapsulation unit DKVMUsb judges that the equipment connected is not Android device, then abandoned the crawl of this Android device by service unit DKAdbWinApi notification filter elements DKHcmon.
In further scheme, if when having multiple recognizer to start simultaneously, then Dispatching Unit DKUSBArb is responsible for judging which program obtains this USB device.
Further, the determination methods of Dispatching Unit DKUSBArb is, current mouse or cursor current mouse in which recognizer, then with which equipment connect.
See Fig. 3, before the flow process performing above-mentioned Fig. 2, can perform in service unit DKAdbWinApi comprise the equipment of searching, whether identification equipment be USB device, identify whether described USB device is the steps such as Android device.Specifically comprise:
Need some chained lists used in S01: first carry out initialization step, initialization Adb service end, global variable etc., perform step S02 subsequently.
S02: perform and search device step, perform S03 subsequently.
S03: by Globally Unique Identifier (GUID, GloballyUniqueIdentifier, for mark as the object such as registry entry, class and interface identifier, database, system directory) enumerate all current Active Interface, namely there is equipment connection and be in the interface of active state, performing S04 subsequently.
S04: judge whether have USB interface in these Active Interface, if not, turns back to step S02 and searches next equipment, performs step S05 if had.
S05: obtain each USB interface information and device name, performs step S06.
S06: the string number being read this equipment by device name, and judge whether this equipment string number is present in ADB transmission list, if so, then searched before showing this equipment and identified, then returned step S02, search next equipment.If this equipment string number is not present in ADB transmission list, show that this equipment is new equipment, then perform step 7.
S07: open USB device by USB title, obtains the character length of interface name, and the buffer zone that then distribution one is suitable, subsequently by interface name, puts into the USB_device_handle structure of ADB, performs step S08 subsequently.
S08: again identify, whether judgment device is Android device, first VID and the PID code of extraction device, judge whether this VID code exists in the VID list prestored subsequently, if existed, illustrate that this equipment is Android device, perform step S09 subsequently, if there is no, then illustrating that this USB device is not Android device, may be the memory devices such as USB flash disk or other equipment, returns step S02 subsequently and searches next equipment.
S09: obtain this Android device USB device string number, and be registered in Adb transmission list, return step S02 subsequently and search next USB device.
Once USB device is registered in Adb transmission list, user can be dealt in USB device order at control desk input command Adbdevices, service unit DKAdbWinApi, then and read the information of USB device, and return message display in the console.
Below in conjunction with Fig. 2,3, illustrate the concrete identifying of equipment.
Start ADB service, service unit can circulate each step performed in Fig. 3, if sometime, Android device A is connected to a certain interface, then in next circulation, find it, and obtain the information of this interface and Android device A.Judge whether the string number of Android device A is present in ADB transmission list subsequently.If be identified before this Android device A, be namely present in ADB transmission list, need not proceed to identify, now service unit DKAdbWinApi just can send reading order and carrys out fetch equipment.
If this Android device title is not present in ADB transmission list, namely unrecognized mistake before, then judge whether it is Android device, by checking whether its VID is present in the VID list prestored, if, then prove that it is Android device, the number of being gone here and there puts into Adb transmission list subsequently, after this service unit DKAdbWinApi also carrys out fetch equipment by sending reading order, if there is no in the VID list prestored, then prove that this equipment is not Android device, program returns and searches next equipment.
While above-mentioned steps, Android device A mono-plugs computer, can be filtered cells D KHcmon adapter, and its VID_PID is revised as specific value (such as, 0D4B & 0002), and this VID_PID is notified Dispatching Unit DKUSBArb.The descriptor of Android device A can be sent to encapsulation unit DKVMUsb by filter element DKHcmon simultaneously, and then realizes the docking of interface.
The handle of Android device A is sent to service unit DKAdbWinApi by Dispatching Unit DKUSBArb subsequently.
Now, if having input Adbdevices order.Service unit DKAdbWinApi utilizes the handle of equipment to be communicated with Android device A by encapsulation unit DKVMUsb subsequently.
If that connection is non-Android device B, then when accompanying drawing 3 step S08 execution identifies again, by the VID list prestored, can judges that this equipment B is not Android device, stop identifying, and return the lookup process carrying out next equipment.
Meanwhile, filter element DKHcmon intercepts this equipment and revises its VID_PID and after notifying Dispatching Unit DKUSBArb, the handle of equipment B can be sent to service unit DKAdbWinApi by Dispatching Unit DKUSBArb.
Encapsulation unit DKVMUsb can find this USB device main classes (BaseClass) and or subclass (SubClass) be not normal value, then assert that it is not Android device, encapsulation unit DKVMUsb can send IRQ message by service unit DKAdbWinApi to filter element DKHcmon, tell that this equipment of filter element DKHcmon is not Android device, the hook process subsequently in filter element DKHcmon will abandon the crawl to equipment B.The VID_PID of equipment B can be revised as original character string by filter element DKHcmon simultaneously.
To sum up, it is no matter the Android device of what brand styles, the no matter why not same character string of its actual VID and PID, by flow process in the present invention, can be the value of specifying by amendment VID_PID, and can be simply recognized in follow-up identification and be connected, and different Adb drivers is installed when need not access different Android device.
And be no matter 360 or any Android device assistant such as Tengxun or pea pods (mobile phone assistant), after it connects identification module of the present invention, their master routine is without any need for amendment, their Helper program that what program can think execution is, and in reality, identify according to recognition methods of the present invention.Therefore, recognition methods of the present invention and application of installation are widely.
The above is only the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.In addition, although employ some specific terms in this instructions, these terms are only used to convenient explanation, do not form any restriction to the present invention.

Claims (11)

1. a recognition methods for Android device, is characterized in that:
1) in ADB process, the described Android device of computer is connected to by the adapter of hook process;
2) production firm ID and VID of described Android device, product IDs and PID are revised as a particular value, together with VID with PID, form the identification code of described Android device;
3) this has the different Android device of all insertion computers to be virtual as and has same VID and PID code, uses an ADB to drive like this and can identify different Android device.
2. a recognition methods for Android device, its feature is comprising:
1) hook unit is set in filter element, when Android device one plugs computer, the hook unit starting in this filter element, this equipment is filtered unit adapter, and the VID_PID of equipment is revised as a predetermined value, subsequently this value is sent to Dispatching Unit; Meanwhile, filter element reads the device descriptor of Android device and notifies encapsulation unit, thus realizes docking of Android device driver and interface;
2), after Dispatching Unit receives the notice of filter element, Dispatching Unit can check whether the VID_PID of Android device is described predetermined value; If so, then copy the handle of this Android device, send to service unit; If not, then abandon capturing;
3), after service unit receives ADB order, the handle sent by Dispatching Unit, is operated Android device.
3. recognition methods as claimed in claim 2, it is characterized in that, whether be the deterministic process of Android device, if Android device then reads if also comprising the equipment connected, if not, service unit transmission message abandons the crawl to equipment to Dispatching Unit and then notification filter elements.
4. whether recognition methods as claimed in claim 3, is characterized in that, be the deterministic process of Android device described in encapsulation unit realizes.
5. recognition methods as claimed in claim 4, it is characterized in that: described in determine whether that the mode of Android device is concrete mode and is: check that the main classes of this equipment is 0xFF, judge that subclass is 0x42 subsequently, if these two values all meet standard, just can assert that it is Android device, if any one does not meet, assert it is not Android device.
6. the recognition methods as described in any one of claim 1-5, is characterized in that: if when having multiple recognizer to start simultaneously, then Dispatching Unit is responsible for judging which assistant obtains this equipment.
7. recognition methods as claimed in claim 6, is characterized in that, current mouse or cursor current mouse in which Helper program, then with which equipment connect.
8. the recognition methods as described in claim 1-7, is characterized in that: in described identifying, and service unit performs step below simultaneously:
1) initialization step is carried out;
2) device step is searched in execution, and enumerates all current Active Interface by Globally Unique Identifier (GUID);
3) judge whether have USB interface in these Active Interface, if not, turn back to step 2) search next equipment, perform step 4 if had);
4) obtain each USB interface information and device name, and judge whether this device name is present in ADB transmission list, if so, then searched before showing this equipment and identified, then returned step 2) search next equipment; Be not present in ADB transmission list if this equipment does not become, show that this equipment is new equipment, then perform step 5);
5) open USB device by USB interface title, and interface name is put into the USB_device_handle structure of ADB, perform step 6 subsequently);
6) again identify, whether judgment device is Android device, first VID and the PID code of extraction device, judges whether this VID code exists in the VID list prestored subsequently, if existed, illustrates that this equipment is Android device, performs step 7 subsequently); If there is no, then illustrate that this USB device is not Android device, return step 2) search next equipment;
7) obtain this Android device USB device string number, and be registered in ADB transmission list, return step 2 subsequently) search next USB device.
9. a recognition device for Android device, is characterized in that, comprising:
1) filter element, wherein arranges hook unit, when Android device one plugs computer, and the hook unit starting in this filter element, this equipment is filtered unit adapter, and the VID_PID of equipment is revised as a predetermined value, subsequently this value is sent to Dispatching Unit; Meanwhile, filter element reads the device descriptor of Android device and notifies encapsulation unit, thus realizes docking of Android device driver and interface;
2) Dispatching Unit, after it receives the notice of filter element, Dispatching Unit can check whether the VID_PID of Android device is described predetermined; If so, then copy the handle of this Android device, send to service unit; If not, then abandon capturing;
3) service unit, after it receives ADB order, the handle sent by Dispatching Unit, is operated Android device.
10. recognition device as claimed in claim 10, it is characterized in that, whether be the deterministic process of Android device, if Android device then reads if also comprising the equipment connected, if not, service unit transmission message abandons the crawl to equipment to Dispatching Unit and then notification filter elements.
Whether 11. recognition devices as claimed in claim 10, is characterized in that, be the deterministic process of Android device described in encapsulation unit realizes.
CN201510500423.4A 2015-08-14 2015-08-14 Android device identification method and apparatus Pending CN105068946A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510500423.4A CN105068946A (en) 2015-08-14 2015-08-14 Android device identification method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510500423.4A CN105068946A (en) 2015-08-14 2015-08-14 Android device identification method and apparatus

Publications (1)

Publication Number Publication Date
CN105068946A true CN105068946A (en) 2015-11-18

Family

ID=54498323

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510500423.4A Pending CN105068946A (en) 2015-08-14 2015-08-14 Android device identification method and apparatus

Country Status (1)

Country Link
CN (1) CN105068946A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105975272A (en) * 2016-05-05 2016-09-28 北京元心科技有限公司 Method and system for generating unique device number of device
CN106354603A (en) * 2016-08-31 2017-01-25 福建联迪商用设备有限公司 Method and system for solving occupation problem of ADB port
CN106371841A (en) * 2016-08-31 2017-02-01 福建联迪商用设备有限公司 Management method of ADB (Android) devices and system thereof
CN109344096A (en) * 2018-09-07 2019-02-15 彩讯科技股份有限公司 A kind of method, apparatus, equipment and storage medium connecting external equipment
CN109711143A (en) * 2018-12-11 2019-05-03 北京云测信息技术有限公司 A method of Android device is identified based on adb
CN110647741A (en) * 2018-06-26 2020-01-03 西安电子科技大学 Method for extracting characteristic information of Android equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102243667A (en) * 2011-06-15 2011-11-16 中国科学院紫金山天文台 Method for acquiring data of charge coupled device (CCD) camera by multi-channel universal serial buses (USB)
CN102427483A (en) * 2011-11-15 2012-04-25 浪潮电子信息产业股份有限公司 Method for binding network card name with equipment under Linux system
CN103902480A (en) * 2013-05-03 2014-07-02 哈尔滨安天科技股份有限公司 Android phone driving method and system
CN104468260A (en) * 2014-11-13 2015-03-25 百度在线网络技术(北京)有限公司 Recognition method, device and system for mobile terminal device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102243667A (en) * 2011-06-15 2011-11-16 中国科学院紫金山天文台 Method for acquiring data of charge coupled device (CCD) camera by multi-channel universal serial buses (USB)
CN102427483A (en) * 2011-11-15 2012-04-25 浪潮电子信息产业股份有限公司 Method for binding network card name with equipment under Linux system
CN103902480A (en) * 2013-05-03 2014-07-02 哈尔滨安天科技股份有限公司 Android phone driving method and system
CN104468260A (en) * 2014-11-13 2015-03-25 百度在线网络技术(北京)有限公司 Recognition method, device and system for mobile terminal device

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105975272A (en) * 2016-05-05 2016-09-28 北京元心科技有限公司 Method and system for generating unique device number of device
CN106354603A (en) * 2016-08-31 2017-01-25 福建联迪商用设备有限公司 Method and system for solving occupation problem of ADB port
CN106371841A (en) * 2016-08-31 2017-02-01 福建联迪商用设备有限公司 Management method of ADB (Android) devices and system thereof
WO2018040929A1 (en) * 2016-08-31 2018-03-08 福建联迪商用设备有限公司 Method for managing adb device, and system therefor
CN106354603B (en) * 2016-08-31 2018-11-13 福建联迪商用设备有限公司 Solve the occupied method in the ports ADB and its system
CN110647741A (en) * 2018-06-26 2020-01-03 西安电子科技大学 Method for extracting characteristic information of Android equipment
CN110647741B (en) * 2018-06-26 2021-04-06 西安电子科技大学 Method for extracting characteristic information of Android equipment
CN109344096A (en) * 2018-09-07 2019-02-15 彩讯科技股份有限公司 A kind of method, apparatus, equipment and storage medium connecting external equipment
CN109711143A (en) * 2018-12-11 2019-05-03 北京云测信息技术有限公司 A method of Android device is identified based on adb

Similar Documents

Publication Publication Date Title
CN105068946A (en) Android device identification method and apparatus
US8838812B2 (en) Network security enhancement methods, apparatuses, system, media, signals and computer programs
EP3005084B1 (en) Driver installation for targeted and not-connected devices
US7788349B2 (en) Information processing system and method
US8230121B2 (en) Method and apparatus for identifying a device handle in a computer system
USRE49226E1 (en) UEFI and operating system driver methods for updating MAC address in LAN-based NIC
US20050015702A1 (en) System and method for testing, simulating, and controlling computer software and hardware
CN107678949B (en) Automatic testing method for realizing different communication modes of embedded equipment
CN101957807A (en) Method for USB device to recognize version type of Windows operating system
WO2018040746A1 (en) Driver installation method, device, and electronic apparatus
CN105511936A (en) Test system, method and device
Gay Mastering the raspberry PI
CN102567268A (en) Detection method for USB to virtual serial port/MODEM
CN102073524B (en) A kind of method of wireless communication terminal and self-starting thereof
CN109033816B (en) Domestic office peripheral drive management method and system on kylin operating system platform
CN103677812A (en) Hardware equipment state adaptive method and device
US9965292B2 (en) Method of bluetooth pairing with UEFI firmware and computer system thereof
CN113626276B (en) Method, system, terminal and storage medium for identifying type of server HBA card
CN109740342B (en) Method, system, computer device and storage medium for acquiring shell execution permission
US9465597B2 (en) System for operating a device as a storage device and a modem device
CN110851334A (en) Flow statistical method, electronic device, system and medium
CN101853142B (en) Identification method of USB device with virtual drive
RU2643481C2 (en) Method of identification of operating system type and usb device
CN105786659A (en) Remote debugging method and server
CN104516743A (en) Upgrading method and system of embedded device firmware based on ActiveX

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Tang Zhaomiao

Inventor after: Jiang Jun

Inventor after: Pang Chenliang

Inventor before: Tang Zhaomiao

Inventor before: Jiang Jun

Inventor before: Pang Chenliang

WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20151118