You are not logged in.

#1 2008-11-23 16:20:41

synthead
Member
Registered: 2006-05-09
Posts: 1,337

[solved] My udev rule for my Android phone doesn't work, not sure why

I have the HTC G1 Android phone and I'm trying to get a udev rule working for it.  This is my rule ...

/etc/udev/rules.d/50-android.rules

SUBSYSTEM=="usb_device", SYSFS{idVendor}=="0bb4", MODE="0666", NAME=="android"

... but when I connect my phone, /dev/android doesn't appear.  0bb4 is correct ...

/sys/class/usb_device/usbdev5.2/device/idVendor

0bb4

... so what's going on?

Last edited by synthead (2008-11-28 15:19:09)

Offline

#2 2008-11-23 17:05:24

archlinuxsagi
Member
Registered: 2008-09-12
Posts: 259

Re: [solved] My udev rule for my Android phone doesn't work, not sure why

Wow. A Gphone. Maybe there is some sort of advance networking setting or mass storage setting in your phone. BTW, can i know what r u trying to achieve by connecting your phone to linux box?
You can also try modprobe rndis_host

Offline

#3 2008-11-23 22:48:38

synthead
Member
Registered: 2006-05-09
Posts: 1,337

Re: [solved] My udev rule for my Android phone doesn't work, not sure why

There is, but I can already use it that way.  I'm learning how to code in java so I can develop applications for it.  There's a feature in the SDK where you can install and run your code on your Android device fairly seamlessly.  You literally hit "Run" and a few moments later, your phone's going to town.  But for this to work, permissions need to be set (0666).  But my udev rule does nothing and I dont understand why.

This is where I got this information: http://code.google.com/android/intro/de … cehardware

Offline

#4 2008-11-24 17:47:20

fatchance
Member
Registered: 2008-11-24
Posts: 2

Re: [solved] My udev rule for my Android phone doesn't work, not sure why

Enable USB Debugging on the G1. Get rid of the UDEV rule and run adb as root. This worked for me.

Offline

#5 2008-11-25 12:09:29

synthead
Member
Registered: 2006-05-09
Posts: 1,337

Re: [solved] My udev rule for my Android phone doesn't work, not sure why

I have USB debugging enabled, and don't want to run Eclipse as root.

Offline

#6 2008-11-28 15:18:51

synthead
Member
Registered: 2006-05-09
Posts: 1,337

Re: [solved] My udev rule for my Android phone doesn't work, not sure why

fatchance wrote:

Enable USB Debugging on the G1. Get rid of the UDEV rule and run adb as root. This worked for me.

AH-HA!  I was pesomistic, sorry.  I ran adb as root, it saw my phone, and as a regular user, Eclipse runs my program.  Thank you!

Offline

#7 2008-11-28 15:45:23

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [solved] My udev rule for my Android phone doesn't work, not sure why

"NAME==" is wrong. Use *one* equals sign, to set the name. Even better, use SYMLINK+="blah" instead of assigning the NAME, to let udev assign the default name.

Offline

#8 2009-06-04 15:13:18

naguz
Member
Registered: 2008-11-05
Posts: 98

Re: [solved] My udev rule for my Android phone doesn't work, not sure why

A big bump, but I need help:

I can't connet to my new G1.
in  /etc/udev/rules.d/50-android.rules I have tried with both
SUBSYSTEM=="usb_devices", SYSFS{idVendor}=="0bb4", MODE="0666"
and
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
but nothing works.
[root@vind tools]# adb devices
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached

[root@vind tools]#

I have run udevadm control --reload-rules in between changing rules. I just can't understand why this happens. I need to connect to the phone with adb to skip registration.

Offline

#9 2009-06-04 20:24:25

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [solved] My udev rule for my Android phone doesn't work, not sure why

Not your thread, open your own please. Link to this one if relevant.

Oh! And this one has been dead for half a year! Deserves a lock tongue.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

Board footer

Powered by FluxBB