Install Android Composite ADB Interface driver for Windows 7 and Ubuntu Linux

来源:互联网 发布:中国移动手机oa软件 编辑:程序博客网 时间:2024/05/16 04:50
Windows 7 adb 驱动安装方法:

[Tutorial] Adb Driver Android 1.0 Install

I thought i'd do this for all those (like me) who had issues installing the Adb driver on their system, causing them to have issues using the UnrEVOked progam to root their phones. These steps worked for me, if they are not strictly correct ill edit this post when someone corrects me, but, like I said, they worked for me after 2 weeks of trying!

Once you have booted into your HBOOT screen your system will try to install the Android 1.0 driver [Image 1] . This is the Adb Driver. If, like me, you have followed all the instructions elsewhere, downloading the SDK and installing that driver does not always work.

Right click on the Android 1.0 and go to Properties then Details

In the Drop Down list select Hardware Ids [Image 2]

you will see something along the lines of:
Quote:
USB\VID_0bb4&Pid_0c94&Rev_0100
USB\VID_0bb4&Pid_0c94
Download the file attached below adb_driver_htc.zip

Unzip and open the file called android_winusb.inf 

You are looking for any lines that say
Quote:
; HTC Desire
The file is split into sections for various drivers.

The sections you need are: 

Quote:
[Google.NTx86]
; HTC Dream
%SingleAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C01
%CompositeAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C02&MI_01
%SingleBootLoaderInterface% = USB_Install, USB\VID_0BB4&PID_0FFF
; HTC Magic
%CompositeAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C03&MI_01
; HTC Desire
%CompositeAdbInterface% = USB_Install, USB\VID_0bb4&Pid_0c94

;
;Moto Sholes
%SingleAdbInterface% = USB_Install, USB\VID_22B8&PID_41DB
%CompositeAdbInterface% = USB_Install, USB\VID_22B8&PID_41DB&MI_01
;
;Google NexusOne
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_0D02
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_0D02&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_4E11
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4E12&MI_01
and

Quote:
[Google.NTamd64]
; HTC Dream
%SingleAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C01
%CompositeAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C02&MI_01
%SingleBootLoaderInterface% = USB_Install, USB\VID_0BB4&PID_0FFF
; HTC Magic
%CompositeAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C03&MI_01
; HTC Desire
%CompositeAdbInterface% = USB_Install, USB\VID_0bb4&Pid_0c94

;
;Moto Sholes
%SingleAdbInterface% = USB_Install, USB\VID_22B8&PID_41DB
%CompositeAdbInterface% = USB_Install, USB\VID_22B8&PID_41DB&MI_01
;
;Google NexusOne
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_0D02
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_0D02&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_4E11
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_4E12&MI_01
Change the lines 

; HTC Desire
%CompositeAdbInterface% = USB_Install, USB\VID_0bb4&Pid_0c94

so that the USB\VID_0bb4&Pid_0c94 part of the line matches the Hardware Ids part that we saw in [ Image 2 ]


Now.. I put this at the end of the file just for completeness. I'm not 100% sure if it is needed or not. 

Quote:
; HTC Desire
%SingleAdbInterface% = USB_Install, USB\VID_0bb4&Pid_0c94&Rev_0100
%CompositeAdbInterface% = USB_Install, USB\VID_0bb4&Pid_0c94
%SingleBootLoaderInterface% = USB_Install, USB\VID_0BB4&Pid_0c94
Once you have done this you can now install the working driver.

Right Click again on the Android 1.0 Driver and click Update Driver...
Browse to the directory that you unzipped the drivers too, which also contains your edited .inf file. Device manager should now recognize your driver file and install it.

The Android 1.0 should now change to be Android Composite ADB Interface

If you see this...then it worked!  [ Image 4 ]


The Attached zip file is my Edited file that works for me. so please change to suit your Hardware Ids.

Any questions let me know. I'll help where I can
ATTACHED THUMBNAILS
Click image for larger versionName:1.JPGViews:21873Size:40.7 KBID:368340   Click image for larger versionName:2.JPGViews:22226Size:26.3 KBID:368341   Click image for larger versionName:3.JPGViews:14923Size:31.0 KBID:368342   Click image for larger versionName:4.JPGViews:15518Size:41.0 KBID:368343  
ATTACHED FILESFile Type: zipadb_driver_htc.zip - [Click for QR Code] (6.09 MB, 125584 views)

http://forum.xda-developers.com/showthread.php?t=737728


各手机厂商adb驱动下载地址:

http://developer.android.com/tools/extras/oem-usb.html


Ubuntu Linux adb 驱动安装方法:


Setting up a Device for Development


With an Android-powered device, you can develop and debug your Android applications just as you would on the emulator. Before you can start, there are just a few things to do:

  1. Declare your application as "debuggable" in your Android Manifest.

    When using Eclipse, you can skip this step, because running your app directly from the Eclipse IDE automatically enables debugging.

    In the AndroidManifest.xml file, add android:debuggable="true" to the <application> element.

    Note: If you manually enable debugging in the manifest file, be sure to disable it before you build for release (your published application should usually not be debuggable).

  2. Enable USB debugging on your device.
    • On most devices running Android 3.2 or older, you can find the option under Settings > Applications > Development.
    • On Android 4.0 and newer, it's in Settings > Developer options.

      Note: On Android 4.2 and newer, Developer options is hidden by default. To make it available, go to Settings > About phone and tap Build number seven times. Return to the previous screen to find Developer options.

  3. Set up your system to detect your device.
    • If you're developing on Windows, you need to install a USB driver for adb. For an installation guide and links to OEM drivers, see the OEM USB Drivers document.
    • If you're developing on Mac OS X, it just works. Skip this step.
    • If you're developing on Ubuntu Linux, you need to add a udev rules file that contains a USB configuration for each type of device you want to use for development. In the rules file, each device manufacturer is identified by a unique vendor ID, as specified by the ATTR{idVendor} property. For a list of vendor IDs, see USB Vendor IDs, below. To set up device detection on Ubuntu Linux:
      1. Log in as root and create this file: /etc/udev/rules.d/51-android.rules.

        Use this format to add each vendor to the file:
        SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev" 

        In this example, the vendor ID is for HTC. The MODE assignment specifies read/write permissions, and GROUPdefines which Unix group owns the device node.

        Note: The rule syntax may vary slightly depending on your environment. Consult the udev documentation for your system as needed. For an overview of rule syntax, see this guide to writing udev rules.

      2. Now execute:
        chmod a+r /etc/udev/rules.d/51-android.rules

Note: When you connect a device running Android 4.2.2 or higher to your computer, the system shows a dialog asking whether to accept an RSA key that allows debugging through this computer. This security mechanism protects user devices because it ensures that USB debugging and other adb commands cannot be executed unless you're able to unlock the device and acknowledge the dialog. This requires that you have adb version 1.0.31 (available with SDK Platform-tools r16.0.1 and higher) in order to debug on a device running Android 4.2.2 or higher.

When plugged in over USB, you can verify that your device is connected by executing adb devices from your SDKplatform-tools/ directory. If connected, you'll see the device name listed as a "device."

If using Eclipse, run or debug your application as usual. You will be presented with a Device Chooser dialog that lists the available emulator(s) and connected device(s). Select the device upon which you want to install and run the application.

If using the Android Debug Bridge (adb), you can issue commands with the -d flag to target your connected device.

USB Vendor IDs

This table provides a reference to the vendor IDs needed in order to add USB device support on Linux. The USB Vendor ID is the value given to the ATTR{idVendor} property in the rules file, as described above.

CompanyUSB Vendor IDAcer0502ASUS0b05Dell413cFoxconn0489Fujitsu04c5Fujitsu Toshiba04c5Garmin-Asus091eGoogle18d1Haier201EHisense109bHTC0bb4Huawei12d1K-Touch24e3KT Tech2116Kyocera0482Lenovo17efLG1004Motorola22b8MTK0e8dNEC0409Nook2080Nvidia0955OTGV2257Pantech10a9Pegatron1d4dPhilips0471PMC-Sierra04daQualcomm05c6SK Telesys1f53Samsung04e8Sharp04ddSony054cSony Ericsson0fceTeleepoch2340Toshiba0930ZTE19d2

http://developer.android.com/tools/device.html#VendorIds