Sunday, December 19, 2010

Setting up Ubuntu 10.10 for Android device debugging

I'm flabbergasted that Skype does not work on the Samsung Vibrant phone. The phone is running Android 2.1 Update 1 (whatever that is). Skype works on a number of other Android 2.1 phones, but not the Vibrant.

So then I got to thinking, maybe I can attach an Android debugger to Skype and get more info that I can send to Skype support?

Okay, sounds like a fun project with the little time I can squeeze in between work and family duties.

Kudos to this link that pretty much had all the steps to setup my Linux laptop to be able to debug my Android phone: http://coffeecokeandcode.blogspot.com/2009/12/android-debug-bridge-on-ubuntu-910.html

 So here are the steps I took:

  1. Make sure that the Android SDK is installed
  2. Make sure that the OS does recognize the phone when it's tethered to the laptop. To do this:
    1.  From a terminal, run the command "lsusb" and note the list of USB devices
    2. Connect the phone using the USB cable for the phone, and run "lsusb" again. This time you should see one more entry for the phone, in the list of USB devices
  3. Install the rule for the device, as follows:
    1. Create the file /etc/udev/rules.d/51.android.rules:
      1. sudo gedit /etc/udev/rules.d/51.android.rules
    2. Add this entry into the file: SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
    3. Replace idVendor with the correct vendor id as per: http://developer.android.com/guide/developin/g/device.html#VendorIds
    4. Save the file
    5. Set the correct file permissions: 
      1. sudo chmod a+r /etc/udev/rules.d/51.android.rules
    6. Restart the udev service
      1. sudo udev service reload
  4. Finally, make sure that the adb service is running as super-user:
    1. cd to wherever you've installed the Android sdk
    2. cd to the tools directory
    3. Kill the service if it is already running:
      1. sudo adb kill-server
    4. Start the adb server as super-user
      1. sudo adb start-server
  5. Now, if everything has been setup correctly, run "adb devices" and you should see your Android device listed

No comments:

Post a Comment