Pages

Friday, May 31, 2013

Debugging through your Android Phone

NOTE: I'm using Ubuntu 10.04 as my development PC

OK Let's start!

First, make sure your phone's "USB Debugging" is enabled.
To enable "USB Debugging":  go to Settings->Developer Options



If you don't have this, go to Settings->Applications->Development, and a list will be displayed, then find USB Debugging, and enable it.
After enabling it, connect your phone to your PC.

When your phone is already connected to your PC:
  1. Press Ctrl+Alt+t to run the Terminal.
  2. Type lsusb to list the connected devices. Then find your phone and copy its ID.
  3. In my case, I will only note/copy 24e3
  4. Then type su to be a root user. You'll know that you are a root because $ sign will be replaced by a # sign. In my case, it's: rickimaru@RickiMaru:~$ to rickimaru@RickiMaru:~#
  5.  After this, type cat > /etc/udev/rules.d/51-android.rules
  6. Then type: SUBSYSTEM=="usb", ATTR{idVendor}=="<id>", MODE="0600", GROUP=="plugdev"
  7. In my case, <id> = 24e3. So, this sould look like: ATTR{idVendor}=="24e3"
  8. Then press Enter
  9. After that, type: chmod a+r /etc/udev/rules.d/51-android.rules
Then you're done!

No comments:

Post a Comment