Jump to content

ADB, Windows 7 and the Pulse [Tutorial]


Recommended Posts

Posted (edited)

Hi,

Trying to get ADB up and running. I've reinstalled the drivers a silly amount of times and I still can't connect. My device is listed in fastboot but not ADB. I'm using Windows 7 64bit by the way. How do I solve this? I am in recovery mode and USB debug mode is on too =/

EDIT.............................

That was my original post. I wanted ABD to get a backup back on my Pulse. I'm completely new to the Android OS and even Linux so I have no idea, but I do now know how to get ADB working with the Pulse thanks to Paul's expert advice. Thanks very much =] I still don't know what to do with it though (ADB I mean) haha.

1)Download the Android SDK and install it. It's quite easy to do but just make sure you get the "Usb Driver package, revision 1" package installed.

2)Go to C:\Users\%USERPROFILE%\.android\adb_usb.ini

Open the ini file and edit it so it now looks like this:

# ANDROID 3RD PARTY USB VENDOR ID LIST -- DO NOT EDIT.

# USE 'android update adb' TO GENERATE.

# 1 USB VENDOR ID PER LINE.

0x12D1

Save and close the file.

3)Now Start -> Run -> cmd

Navigate to the tools folder in your Android SDK folder

(for example: cd C:\_X\Pulse\android-sdk_r3-windows\android-sdk-windows\tools)

Type adb remount

Done =]

Edited by xangma
Posted

In fact, i've grabbed the drivers from the PC Suite folder, nothing and i've also modded an inf to use the drivers from the SDK ... and no luck there either.

Posted

I also can't connect to my pulse using adb. This is on linux, it never shows up in the adb devices list and I've tried a million combinations of the instructions.

It shows up in lsusb fine. I can't tell if the udev rule is being matched though (not really sure what effect it has - presumably changes a permission somewhere?).

Very frustrating!

I have run lsusb in both normal usb mode, and debuggin usb mode and the output is indeed different so I think that is working. There is an extra interface:

> Interface Descriptor:

> bLength 9

> bDescriptorType 4

> bInterfaceNumber 3

> bAlternateSetting 0

> bNumEndpoints 2

> bInterfaceClass 255 Vendor Specific Class

> bInterfaceSubClass 66

> bInterfaceProtocol 1

> iInterface 0

> Endpoint Descriptor:

> bLength 7

> bDescriptorType 5

> bEndpointAddress 0x85 EP 5 IN

> bmAttributes 2

> Transfer Type Bulk

> Synch Type None

> Usage Type Data

> wMaxPacketSize 0x0200 1x 512 bytes

> bInterval 0

> Endpoint Descriptor:

> bLength 7

> bDescriptorType 5

> bEndpointAddress 0x04 EP 4 OUT

> bmAttributes 2

> Transfer Type Bulk

> Synch Type None

> Usage Type Data

> wMaxPacketSize 0x0200 1x 512 bytes

> bInterval 0

Here's the syslog output when I plug it in:

Oct 25 23:58:30 sage kernel: [22649.216024] usb 1-6: new high speed USB device using ehci_hcd and address 10

Oct 25 23:58:30 sage kernel: [22649.359148] usb 1-6: configuration #1 chosen from 1 choice

Oct 25 23:58:30 sage kernel: [22649.360757] scsi8 : SCSI emulation for USB Mass Storage devices

Oct 25 23:58:30 sage kernel: [22649.361024] usb-storage: device found at 10

Oct 25 23:58:30 sage kernel: [22649.361026] usb-storage: waiting for device to settle before scanning

Oct 25 23:58:35 sage kernel: [22654.361431] usb-storage: device scan complete

Oct 25 23:58:35 sage kernel: [22654.363421] scsi 8:0:0:0: Direct-Access T-Mobile 3G Phone ffff PQ: 0 ANSI: 2

Oct 25 23:58:35 sage kernel: [22654.382274] sd 8:0:0:0: [sdc] Attached SCSI removable disk

Oct 25 23:58:35 sage kernel: [22654.382556] sd 8:0:0:0: Attached scsi generic sg3 type 0

Hmmm if I up the logging level we can see that the rule appears to work:

Oct 26 00:00:31 sage udevd-event[15047]: MODE 0664 /lib/udev/rules.d/50-udev-default.rules:53

Oct 26 00:00:31 sage udevd-event[15047]: NAME 'bus/usb/001/012' /lib/udev/rules.d/50-udev-default.rules:53

Oct 26 00:00:31 sage udevd[846]: seq 1804 queued, 'add' 'usb'

Oct 26 00:00:31 sage udevd-event[15047]: MODE 0666 /etc/udev/rules.d/55-android.rules:1

Oct 26 00:00:31 sage udevd[846]: seq 1805 queued, 'add' 'usb_endpoint'

Oct 26 00:00:31 sage udevd[846]: seq 1806 queued, 'add' 'usb_endpoint'

Oct 26 00:00:31 sage udevd-event[15047]: RUN 'socket:@/org/freedesktop/hal/udev_event' /lib/udev/rules.d/90-hal.rules:2

Oct 26 00:00:31 sage udevd[846]: seq 1807 queued, 'add' 'usb_endpoint'

Oct 26 00:00:31 sage udevd[846]: seq 1808 queued, 'add' 'usb'

Oct 26 00:00:31 sage udevd[846]: seq 1809 queued, 'add' 'usb_endpoint'

Oct 26 00:00:31 sage udevd[846]: seq 1810 queued, 'add' 'usb_endpoint'

Oct 26 00:00:31 sage udevd-event[15047]: create db link (bus/usb/001/012 char/189:11)

Oct 26 00:00:31 sage udevd[846]: seq 1811 queued, 'add' 'usb'

Oct 26 00:00:31 sage udevd-event[15047]: creating device node '/dev/bus/usb/001/012', devnum=189:11, mode=0666, uid=0, gid=0

Oct 26 00:00:31 sage udevd-event[15047]: mknod(/dev/bus/usb/001/012, 020666, (189,11))

Oct 26 00:00:31 sage udevd-event[15047]: chmod(/dev/bus/usb/001/012, 020666)

Oct 26 00:00:31 sage udevd-event[15047]: chown(/dev/bus/usb/001/012, 0, 0)

Oct 26 00:00:31 sage udevd-event[15047]: '/dev/char/189:11' with target '/dev/bus/usb/001/012' has the highest priority 0, create it

Oct 26 00:00:31 sage udevd-event[15047]: creating symlink '/dev/char/189:11' to '../bus/usb/001/012'

Oct 26 00:00:31 sage udevd-event[15047]: passed 321 bytes to monitor 0x7f7dbf530390

Oct 26 00:00:31 sage udevd-event[15047]: passed -1 bytes to monitor 0x7f7dbf52a670

Oct 26 00:00:31 sage udevd-event[15047]: seq 1803 exit with 0

And indeed:

t@sage:~$ ls -l /dev/bus/usb/001/012

crw-rw-rw- 1 root root 189, 11 2009-10-26 00:00 /dev/bus/usb/001/012

So I am at a loss. adb gives no helpful debugging info. It strikes me that perhaps adb doesn't search for Huawei's idVendor. In the docs google say to use a different id (presumably HTCs) so perhaps they just haven't updated it yet.

Posted (edited)

Aha!

// Google's USB Vendor ID

#define VENDOR_ID_GOOGLE		0x18d1

// HTC's USB Vendor ID

#define VENDOR_ID_HTC		   0x0bb4


// products for VENDOR_ID_GOOGLE

#define PRODUCT_ID_SOONER	   0xd00d  // Sooner bootloader

#define PRODUCT_ID_SOONER_COMP  0xdeed  // Sooner composite device


// products for VENDOR_ID_HTC

#define PRODUCT_ID_DREAM		0x0c01  // Dream bootloader

#define PRODUCT_ID_DREAM_COMP   0x0c02  // Dream composite device
So it seems that adb only connects to HTC devices. Here is the offending code:
int is_adb_interface(int vid, int pid, int usb_class, int usb_subclass, int usb_

protocol)

{

	if (vid == VENDOR_ID_GOOGLE) {

			/* might support adb */

	} else if (vid == VENDOR_ID_HTC) {

			/* might support adb */

	} else {

			/* not supported */

		return 0;

	}

Thanks for mentioning that in your extensive documentation google.

Edited by Timmmm
Posted

Wow, so much better than what I could have done =P I wouldn't know where to start ... I just wanted it so I could reflash my old backup but I found another way of doing it. Sooooo ... when's development gonna start then? =]

Posted (edited)

Ok, so surely we can grab all the USB id's for the pulse, and chuck them in this code and reassemble adb.exe and use it right? How would one go about doing this? I know it's gonnabe int he next SDK anyway, but still.

EDIT: I think i've found out how to do it. Lets see ...

Edited by xangma
Posted

You need to put the USB ID in adb_usb.ini in your android folder then adb kill-server and adb start-server. This is ~/.android/adb_usb.ini in Linux and on OSX, not sure of the correct Windows location.

P

Posted
You need to put the USB ID in adb_usb.ini in your android folder then adb kill-server and adb start-server. This is ~/.android/adb_usb.ini in Linux and on OSX, not sure of the correct Windows location.

P

Is this in the SDK? On the device?

Posted
In Windows it's %USERPROFILE%"\.android\ apparently...

P

Ok thanks very much. Now I can use ADB. I don't know what to use it for though haha. Oh, post edited at the top explaining it to others. I was gonna do a batch file for it, but it's really not hard.

Posted

Ok got it to work, thanks again Paul!

If there is no adb_usb.ini file present, create it yourself and fill it with the hexadecimal value known as vendor id.

(to find the vendor id look in the drivers probably android_usb.inf for VID and take the part after underscore and before ampersand)

In the case of the T-Mobile Pulse the vendor id would probably be 12D1 and to make it hex just add 0x in front. => 0x12D1

Just put this in your adb_usb.ini and nothing else. Now restart the server and whatch your device show up :D

Source

Posted

Horray, new SDK! It now works, but remember to use the idVendor 12d1 instead of 0bb4 on linux.

For some reason the device is listed as '???????' but hey, can't complain too much!

Posted

Ok turns out I spoke too soon. The '?????????' is the serial number (well, the failed attempt to get a serial number) which is needed if you use adb through eclipse rather than on the command line.

  • 2 months later...
Posted

I can't get this to work still.

adb remount shows no devices.

it probably has something to do with the fact that I can't seem to get a driver for one bit of the phone, I'm assuming this is the ADB bit.

Tried searching online, tried directing it to the android SDK folder I DL'd, etc etc.

Anyone tell me what driver their's is using so I can either find it, or you can send me it via email so I can use it?

Posted
I can't get this to work still.

adb remount shows no devices.

it probably has something to do with the fact that I can't seem to get a driver for one bit of the phone, I'm assuming this is the ADB bit.

Tried searching online, tried directing it to the android SDK folder I DL'd, etc etc.

Anyone tell me what driver their's is using so I can either find it, or you can send me it via email so I can use it?

In your 'device manager', does it just show 'T-Mobile 3G Device'? If it does, simply use the CD that came with your phone, install the software, and the drivers wanted are in the 'drivers' folder.

Posted (edited)
In your 'device manager', does it just show 'T-Mobile 3G Device'? If it does, simply use the CD that came with your phone, install the software, and the drivers wanted are in the 'drivers' folder.

I tried that.

Will try again, but I've tried that already :/

EDIT:

working now.

*sigh* typical.

Edited by mehall
Posted

Don't worry, I only found out earlier today when I searched this forum for T-Mobile 3g device; was very annoying, this thread is unnecessary now as a guide since the right vendorids are in the newer drivers from google (or the disk drivers).

Posted

I currently dualboot Crunchbang Linux (That's an Ubuntu derivative) but being the gamer I am, I spend a lot of time in Windows.

Nothing wrong with Ubuntu, linux distro's are great (see: android :)) but they're not the be all and end all

Posted
I whisper: Ubuntu.

Agreed, but I enjoy playing games as well, and no matter wine's merits, I still have problems playing most games in Ubuntu.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.