LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 04-27-2012, 01:01 PM   #1
PeterUK
Member
 
Registered: May 2009
Posts: 281

Rep: Reputation: 16
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
 
Old 04-27-2012, 01:45 PM   #2
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
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.

Last edited by eSelix; 04-27-2012 at 01:53 PM.
 
Old 04-27-2012, 04:14 PM   #3
PeterUK
Member
 
Registered: May 2009
Posts: 281

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by eSelix View Post
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! :-(
 
Old 04-27-2012, 04:19 PM   #4
PeterUK
Member
 
Registered: May 2009
Posts: 281

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by eSelix View Post
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
 
Old 04-27-2012, 04:56 PM   #5
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
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?

Last edited by eSelix; 04-27-2012 at 04:59 PM.
 
Old 04-27-2012, 06:12 PM   #6
PeterUK
Member
 
Registered: May 2009
Posts: 281

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by eSelix View Post
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?
 
Old 04-28-2012, 09:15 AM   #7
PeterUK
Member
 
Registered: May 2009
Posts: 281

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by PeterUK View Post
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 ????????
 
Old 04-28-2012, 03:16 PM   #8
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
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

Last edited by eSelix; 04-28-2012 at 03:25 PM.
 
Old 04-30-2012, 02:25 AM   #9
PeterUK
Member
 
Registered: May 2009
Posts: 281

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by eSelix View Post
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Help Following This ADB Tutorial. macattack Linux - Mobile 2 03-20-2012 05:14 PM
Device unable to connect to adb; LG LU2300 (Optimus Q) Android tensionwind Linux - Mobile 3 11-26-2011 06:42 AM
LXer: Setting Up An Android App Build Environment With Eclipse, Android SDK, PhoneGap (Ubuntu 10.10) LXer Syndicated Linux News 0 01-27-2011 11:30 AM
[SOLVED] Trying to set up a terminal on Android to connect to Ubuntu Server. Flame3230 Linux - Mobile 7 10-21-2010 10:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 07:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration