Search code examples
androidubuntu-11.04udev

Udev rules for running android app from ubuntu 11.04


I'm trying to be able to run my mobile app on my android phone, and I can't get the udev rules to work no matter what I do. I'm using ubuntu 11.04 64 bit

Since the rules on the official android site are old, I had to go to the internet. I used the rules presented here:

Get android debugging to work on Ubuntu 11.04 Natty

I went to the site linked:

http://forum.xda-developers.com/showthread.php?p=11823740

I'm sure that jdk is working fine since

  java -version

results in

OpenJDK Runtime Environment (IcedTea6 1.10.6) (6b22-1.10.6-0ubuntu1)
OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)

I added adb to my PATH so if I type in adb I get a bunch of commands.

I downloaded the android SDK and NDK.

So, I tried to edit my udev rules for my android phone. If I type in lsusb then I see:

Bus 002 Device 004: ID 04e8:689e Samsung Electronics Co., Ltd 

I edit the udev rules using sudo vim etc/udev/rules.d/99-android.rules and I write this:

SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8:689e", SYMLINK+="android_adb", MODE="0666" GROUP="plugdev"
TEST=="/var/run/ConsoleKit/database", \
RUN+="udev-acl --action=$env{action} --device=$env{DEVNAME}"

I then entered the command sudo chmod a+rx /etc/udev/rules.d/99-android.rules then I typed in sudo restart udev and then I typed in adb kill-server and then I typed in nohup adb start-server.

And finally, adb devices, but my phone is still not recognized.

Any help would be greatly appreciated since I'm completely stumped.

Oh, and I also opened and closed my terminal window.


Solution

  • So, I restarted my computer and it worked. >.<

    I guess it's always something simple.