LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (http://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Ubuntu connect to Android with adb, cannot see it! Please help! (http://www.linuxquestions.org/questions/ubuntu-63/ubuntu-connect-to-android-with-adb-cannot-see-it-please-help-942129/)

PeterUK 04-27-2012 01:01 PM

Ubuntu connect to Android with adb, cannot see it! Please help!
 
Hi!

I am trying to connect Android 2.1 update 1, Kernel 2.6.29-perf in order to test some applications but I cannot see the device:

What I have done:

I connected the device (phone) to the USB ann on debug mode on:

I've changed Application -> Development -> USB debugging option (Give pup notice USB debugging connected)

Tesrminal: lsusb
I get:
Code:

Bus 002 Device 003: ID 12d1:1031 Huawei Technologies Co., Ltd.
Then after some reading I create:

Code:

/etc/udev/rules.d/51-android.rules
With the following:

Code:

SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666", GROUP="adb"
As you have noticed I added a group adb, I've read on a post someone said it works, but It hasn't for me! (obviously I added on the user)

Then:

Code:

chmod a+r /etc/udev/rules.d/51-android.rules
In theory I should be able to see it on adb, but I tried:

Code:

sudo ..../android-sdks/platform-tools/adb' devices
It does no list the device!

Tried to:

Code:

kill-server
and
Code:

start-server
What may I be missing?

Thanks

eSelix 04-27-2012 01:45 PM

It seems that your phone has not been detected. Please reconnect your device in debugging mode then copy and paste output of
Code:

dmesg | tail

export ADB_TRACE=all
sudo ./android-sdks/platform-tools/adb devices

As you run it with sudo, udev rules are irrelevant for now.

PeterUK 04-27-2012 04:14 PM

Quote:

Originally Posted by eSelix (Post 4664737)
It seems that your phone has not been detected. Please reconnect your device in debugging mode then copy and paste output of
Code:

dmesg | tail

export ADB_TRACE=all
sudo ./android-sdks/platform-tools/adb devices

As you run it with sudo, udev rules are irrelevant for now.

Hi!

I did, dmesg | tail

Code:

usb 2-3: new high speed USB device using ehci_hcd and address 7
 usb 2-3: configuration #1 chosen from 1 choice
 scsi9 : SCSI emulation for USB Mass Storage devices
 usb-storage: device found at 7
 usb-storage: waiting for device to settle before scanning
 usb-storage: device scan complete
 scsi 9:0:0:0: CD-ROM            Android  Adapter          ffff PQ: 0 ANSI: 2
 sr1: scsi3-mmc drive: 0x/0x caddy
 sr 9:0:0:0: Attached scsi CD-ROM sr1
 sr 9:0:0:0: Attached scsi generic sg2 type 5

Then did:
export ADB_TRACE=all

No reply ( but not error)

and then:

Code:

sudo '....../android-sdks/platform-tools/adb' devices
And nothing!

It said:

Code:

List of devices attached
Nothing underneath! :-(

PeterUK 04-27-2012 04:19 PM

Quote:

Originally Posted by eSelix (Post 4664737)
It seems that your phone has not been detected. Please reconnect your device in debugging mode then copy and paste output of
Code:

dmesg | tail

export ADB_TRACE=all
sudo ./android-sdks/platform-tools/adb devices

As you run it with sudo, udev rules are irrelevant for now.

I looked at dmesg and I was surprise it said USB mass storage! So I disable it and did dmesg again and get this!

Code:

scsi 9:0:0:0: rejecting I/O to dead device
 usb 2-3: new high speed USB device using ehci_hcd and address 8
 usb 2-3: configuration #1 chosen from 1 choice
 scsi10 : SCSI emulation for USB Mass Storage devices
 usb-storage: device found at 8
 usb-storage: waiting for device to settle before scanning
 usb-storage: device scan complete
 scsi 10:0:0:0: Direct-Access    Android  Adapter          ffff PQ: 0 ANSI: 2
 sd 10:0:0:0: Attached scsi generic sg2 type 0
 sd 10:0:0:0: [sdb] Attached SCSI removable disk


eSelix 04-27-2012 04:56 PM

Sorry, this "export ADB_TRACE=all" should be entered in root shell, just before ./adb command execution, for example after "sudo -i". About USB mass storage, I think it is wrong. When I connect my Android device I do not get mass storage, unless I switch it on on a telephone. And I can't connect with adb after this.

What about "sudo ./adb devices" after disabling mass storage?

PeterUK 04-27-2012 06:12 PM

Quote:

Originally Posted by eSelix (Post 4664908)
Sorry, this "export ADB_TRACE=all" should be entered in root shell, just before ./adb command execution, for example after "sudo -i". About USB mass storage, I think it is wrong. When I connect my Android device I do not get mass storage, unless I switch it on on a telephone. And I can't connect with adb after this.

What about "sudo ./adb devices" after disabling mass storage?

I did:

sudo -i export ADB_TRACE=all

and it still not working!

Just one thing there is not a memory card on the phone, would that make any different?

You said when turn the phone? What do you mean by it? What state was it before and how did you get there?

PeterUK 04-28-2012 09:15 AM

Quote:

Originally Posted by PeterUK (Post 4664949)
I did:

sudo -i export ADB_TRACE=all

and it still not working!

Just one thing there is not a memory card on the phone, would that make any different?

You said when turn the phone? What do you mean by it? What state was it before and how did you get there?

I am trying in another machine with a different kernel and download again the SDK and I get this:

Code:

List of devices attached
????????????        device

Should it be like ????????

eSelix 04-28-2012 03:16 PM

Writing: "after sudo -i" I mean in next line, so:
Code:

sudo -i
export ADB_TRACE=all
./android-sdks/platform-tools/adb devices

Memory card is not needed.

Quote:

You said when turn the phone? What do you mean by it? What state was it before and how did you get there?
No, sorry for my bad english, by "switching on" I mean enabling proper option. Anyway if you get response after "./adb devices" then it is correct.

If you get "???????????? device" then thats mean your phone has been recognized, but I suspect that you have no permissions to access it. Are you doing it as root? If not as root then everything is ok. But to access your device on user account, you need proper udev rule, check by "lsusb" your "idVendor", it probably changed after switching to non mass storage mode.

You should see something like this:
Code:

List of devices attached
HT0CBRX11571    device


PeterUK 04-30-2012 02:25 AM

Quote:

Originally Posted by eSelix (Post 4665541)
Writing: "after sudo -i" I mean in next line, so:
Code:

sudo -i
export ADB_TRACE=all
./android-sdks/platform-tools/adb devices

Memory card is not needed.



No, sorry for my bad english, by "switching on" I mean enabling proper option. Anyway if you get response after "./adb devices" then it is correct.

If you get "???????????? device" then thats mean your phone has been recognized, but I suspect that you have no permissions to access it. Are you doing it as root? If not as root then everything is ok. But to access your device on user account, you need proper udev rule, check by "lsusb" your "idVendor", it probably changed after switching to non mass storage mode.

You should see something like this:
Code:

List of devices attached
HT0CBRX11571    device


Thanks for your input here! I thought give an update what I have done so far. In Linux 2 PC manage to get in recognize as ??????? device I am going to play a bit with udev to see if it changed but I did create the rules for that PC, I also manage to download my first application by adb command line but Eclipse still not be able to download it to the phone.


All times are GMT -5. The time now is 08:54 PM.