Archive for February, 2011

“adb devices” shows “??????? no permissions”

Posted in Android with tags , , , , , , , on February 24, 2011 by UnixmanLinuxboy

Environment: Ubuntu 10.04
adb 1.0.26

Problem:
$adb devices
??????????? no permissions

This is because the udev is unable to determine the permissions for this USB device.
The udev is the program that the OS uses to dynamically control the devices. As soon as a device is plugged into, udev detects it and creates device files on-the-fly.

The android debug bridge (adb) is a the daemon program that allows you to talk to device. It uses network sockets.

The “no permissions” error is because the daemon is unable to determine the right permissions to access the device as the user that it is running as. Unless the phone device appears in the udev infrastructure with correct permissions to be accessed as the user you are logged in as, it won’t work.

The solution:

1. Plug your android phone to your system.
2. Verify that you can see your phone by using “lsusb”
e.g
===================================
$ lsusb
lsusb
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 003: ID 0461:4d22 Primax Electronics, Ltd
Bus 006 Device 002: ID 413c:2106 Dell Computer Corp.
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 010: ID XXXX:YYYY Samsung Electronics Co., Ltd
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

The line
Bus 002 Device 010: ID XXXX:YYYY Samsung Electronics Co., Ltd
is our phone, rest of the lines can be ignored…

3. The ID XXXX is the Vendor ID of my phone and YYYY is its Device ID. 002 is the BUS number and 010 is the Device number.
Note: These numbers may be different for your phone. So do not panic.

4. Now, type the following command in terminal
$ udevadm info –attribute-walk –name=/dev/bus/usb/002/010

Note: This will provide a lot of output as this command walks up the usb bus. If you have not connected any other device after you connected your phone, it is likely that the first entry would be of your device.
Typical output will be like thilooking at device ‘/devices/pci0000:00/0000:00:1d.7/usb2/2-5’:
KERNEL==”2-5″
SUBSYSTEM==”usb”
DRIVER==”usb”
|
|
|
|
|
|
|
|
ATTR{manufacturer}==”<Your_Phone’s_Manufacturer”
ATTR{product}==”Your_Phone’s_Product_Name”
ATTR{serial}==”Serial_Number”

The serial number here will appear when this all works.

5. Now, lets set udev rules.
Go to /etc/udev/rules.d/ directory and create a new file with name 99-android.rules

Note: In order to perform this activity, you need to be root or use sudo.

6. edit the file you created in step 5 with the following content:

SUBSYSTEM==”usb”, SYSFS{idVendor}==”XXXX”, OWNER=”yourUserName” GROUP=”yourGroupName”, MODE=”666″

7: Save and close it.

8: Reconnect the device and check the permissions…

$ ls -l /dev/bus/usb/bus-number/device-number

Enjoy

Feel free to comment if you find anything that is not working. I will try to help you

Decode – Me, you and pain

Posted in Dark Emotions on February 22, 2011 by UnixmanLinuxboy

This is the lyrics of  the song “Me, you and pain” by the Greek band “Decode”

====================================================

My heart is beating with a faulty pulse

Maybe because love is serving its cause

Is it still that old game we used to play in the rain

Or just a substitute of me, you and pain.

Glowing constantly tonight

Provoking me to see the stars more bright

My opened eyes are fascinated

In this night of rain

Where it’s only me, you and pain.

And it is love and hate in my heart

that’s always crying out for you

And it is love and hate in your tears

that shatter all my faith in you.

Our flesh is lying exorcised

Our hearts of stone have been overprized

I watch you fading silently away

Leaving my hopes in vain

Where there’s only me, you and pain.

And it is love and hate in my heart

that’s always crying out for you

And it is love and hate in your tears

that shatter all my faith in you.
…all my faith in you.

Watch it here: http://www.youtube.com/watch?v=WGQY2tMo0K4