3

I have been developing Android for a while now, but just got a MacBook Pro from work (don't stone me, it wasn't by choice). I got my Android eclipse project up an running and now want to run the application on my actual device an HTC Desire HD.

Well I wasn't expecting it to really work, but I haven't found anyway to get the MacBook Pro to recognize the Desire HD so I can connect the adb. I can't install HTC Sync because they don't have a Mac version.

Any ideas would be greatly greatly appreciated (I already know I can mount the phone and copy and paste the apk, but that won't allow my to use logcat which is kind of essential for developing).

Machavity
  • 30,841
  • 27
  • 92
  • 100
MikeIsrael
  • 2,871
  • 2
  • 22
  • 34

3 Answers3

4

First: Make sure you have Debugging enabled: Settings > Applications > Development > USB Debugging

Next: Ensure you have the device setup: You'll have to setup a udev rule...

http://developer.android.com/guide/developing/device.html#setting-up

Create/Edit /etc/udev/rules.d/10-htc-desire-hd.rules and add the following line:

SUBSYSTEMS==”usb”, ATTRS{idVendor}==”0bb4″, ATTRS{idProduct}==”0ca2″, MODE=”0666″

Then, fix permissions:

chmod a+r /etc/udev/rules.d/10-htc-desire-hd.rules

Then, I'd say restart and try again (or just restart udev) not sure how on OSX.

I also referenced this Linux article: http://linux-adm.de/2010/12/howto-taking-screenshots-from-android-cell-phone-on-ubuntu/ to find the vendorid etc.

Hope that helps.

TryTryAgain
  • 7,632
  • 11
  • 46
  • 82
  • have you tried this on a Mac by any chance? I am just a little worried because this directory doesn't exist at all on the computer I am using and don't want to do anything to mess it up. I know how strict Apple is about messing around under their hood :( – MikeIsrael Dec 25 '11 at 16:40
  • I did, but was never successful with an HTC Wildfire. Instead I setup a bunch of darwinports stuff to get Linux under OSX. Easier method may be to install VirtualBox in OSX and use a Virtual Ubuntu/Linux. – TryTryAgain Dec 25 '11 at 16:57
  • grrrr, another annoying aspect of developing using Apple. thanks for the help – MikeIsrael Dec 25 '11 at 17:22
  • Yeah, this answer is wrong when developing on Macs. The other answer is more correct. It should just work, and if it it doesn't try turn on off debugging and remove/reinsert the USB cable again. – Joakim Engstrom Apr 02 '13 at 11:02
  • 1
    Activating USB debugging did the trick for me. Always forget that one. – Mark May 02 '13 at 10:36
3

So on a mac, it's supposed to "just work" (as mentioned in the Android device documentation).

However, once in a while I've seen it not recognize a device. I've used these instructions before with some success, but the newer adb seems to want to manage the adb_usb.ini itself and says DO NOT EDIT in that file so I'm not sure these directions are going to be accurate any longer.

I would still suggest checking the System Information application to make sure your device shows up in the USB device list. If it doesn't show up in the system list then your computer isn't seeing in on the USB bus at all and there's no way adb is going to find it. Also make sure your phone is saying it's USB Debugging mode.

I don't have the HTC Desire, but I have an HTC Incredible (the first one) and it seems to be recognized quicker when it's in "Charge Only" or "Disk drive" mode.

Community
  • 1
  • 1
dustmachine
  • 10,622
  • 5
  • 26
  • 28
0

See the answer in: adb on OSX Lion, but can't connect to galaxy 10.1 tab, but works fine in linux

I replaced the ~/.android/adb_usb.ini and restarted, and it worked.

Community
  • 1
  • 1
Dan Smart
  • 1,042
  • 1
  • 10
  • 14