views:

171

answers:

4

Hi,

I am developing my first Android App. I have an application already running on emulator (Eclipse + Android dev. tools) on Ubuntu 10.04 LTS - the Lucid Lynx - released in April 2010. I have already tryied the steps provided on Android Developers Portal on this link, but whenever I try to list my already connected device using ./adb devices I get the following:

mmaia@mmaia-desktop:~/tools/android-sdk-linux_86/tools$ ./adb devices
List of devices attached 
????????????    no permissions

I have checked and when I run the virtual emulator the same command returns:

List of devices attached 
????????????    no permissions
emulator-5554   device

Also when I ask eclipse to run the emulator it finds the device(galaxy 5), see image below, but can't find serial, probably because of some permission, than I am only able to choose the virtual emulator.

alt text

How do I configure permission to use Galaxy 5 as a device while developing for Android under Ubuntu 10.04?

[]s

+1  A: 

I have never done this before, but at a guess it could be your phone. Have you enabled the options for development?

You can do it by hitting the menu key when you are on the home screen, go to settings, then applications, and then development. If this isn't it, I will try to get mine working at reply again.

TehGoose
hi, yes I have already enabled the options for development. At least what is instructed by the link I provide in my question.
Marcos Maia
Have you enabled debugging in your AndroidManifest.xml file? It's in the applications tab of the file.
TehGoose
yes, also did that. :) still not working :)
Marcos Maia
Hmmm. I have just gotten mine working (HTC Desire), but the Samsung Galaxy in work was showing up earlier. My last suggestion might be a stupid one, but double check that you have the right code in your "/etc/udev/rules.d/51-android.rules" file. SUBSYSTEM=="usb", SYSFS{idVendor}=="04e8", MODE="0666"instead of SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
TehGoose
Just checked and it looks fine. I have tryied different combinations using usb,usb_device but still get the same "no permissions"
Marcos Maia
I will double check this with the Samsung Galaxy I have in work. I'll be there in 10 hours. Hopefully you will have the solution by then.Good luck!
TehGoose
Hi, have just restarted Ubuntu e now looks like permission problem is gone, but still not working :(
Marcos Maia
+1  A: 

After restarting Ubuntu I have retried and now the error is a bit different. When I run adb devices I get:

mmaia@mmaia-desktop:~/tools/android-sdk-linux_86/tools$ ./adb devices
List of devices attached 
????????????    device

It looks like there is an id missing?? Than when I try from eclipse It gives the error:

[2010-10-07 21:32:56 - AnototudoAndroid] ------------------------------
[2010-10-07 21:32:56 - AnototudoAndroid] Android Launch!
[2010-10-07 21:32:56 - AnototudoAndroid] adb is running normally.
[2010-10-07 21:32:56 - AnototudoAndroid] Performing br.com.anototudo.MenuPrincipalActivity activity launch
[2010-10-07 21:32:56 - AnototudoAndroid] Automatic Target Mode: Unable to detect device compatibility. Please select a target device.
[2010-10-07 21:33:02 - AnototudoAndroid] WARNING: Unknown device API version!
[2010-10-07 21:33:02 - AnototudoAndroid] Uploading AnototudoAndroid.apk onto device '????????????'
[2010-10-07 21:33:02 - AnototudoAndroid] Failed to upload AnototudoAndroid.apk on device '????????????'
[2010-10-07 21:33:02 - AnototudoAndroid] java.io.IOException: device (????????????) request rejected: device not found
[2010-10-07 21:33:02 - AnototudoAndroid] Launch canceled!

[]s

Marcos Maia
+3  A: 

Just a few ideas:

Make sure you not only created the udev rules, but also did

chmod a+r /etc/udev/rules.d/51-android.rules

Use dmesg shortly after plugging in the phone to verify that it's enumerating nicely as a usb device.

See if you can get the adb shell up

Can you do a mass storage mount? That's not a development function but would at least be a test that the usb is working.

Chris Stratton
Hi, it worked, thanks. In fact I got some sleep, than with fresh mind I just reviewed and.. It worked :) Thanks for helping.
Marcos Maia
A: 

It's really easy, go the tools directory in the android sdk folder. From the terminal type ./adb kill-server. This is will stop the adb server and now run it with sudo support. Just type sudo ./adb start-server. It should detect it as a device now.

Gooner