I can't get Ubuntu 9.10 to recognize the Nexus One as a debug device. I tried following the instructions found here but they are not working: http://alan.lamielle.net/2010/01/22/nexus-one-usb-in-ubuntu-9-10
Anyone know of a link or know how to get the Nexus One to debug correctly in Ubuntu 9.10?
the id is "18d1" not "0bb4" for Nexus One.
SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"
You might try SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666" instead of the line listed on that page. That is the rule that I use, and Ubuntu 9.10 amd64 recognizes it correctly.
You may also need to play around with the actual number in the front of the filename (shown as 51-android.rules in the linked-to page). Mine is 50-android.rules. The number controls the order in which the rules are applied, AFAIK.
Also, be sure reload udev (as shown on that page) and restart the adb daemon (via adb kill-server, then adb start-server).
You went through this?
Add android:debuggable="true" in your manifest.
On the device, go to the home screen, press MENU, select Applications > Development, then enable USB debugging.
After this, follow CommonsWare explanation. You might need to unplug/plug for it to work.
Wow, I feel like an idiot. Somewhere down the line I turned off my debug settings, so no matter what I did with the udev rules, it wouldn't show up. Now that I turned it on, it's working. Thanks to all who tried to help. :/
Related
This question already has answers here:
set up device for development (???????????? no permissions)
(30 answers)
Closed 5 years ago.
I have a problem connecting HTC Wildfire A3333 in debugging mode with my Fedora Linux 17. Adb says:
./adb devices
List of devices attached
???????????? no permissions
my udev rules (first rule for Samsung which works just fine and second for HTC which is not):
SUBSYSTEM=="usb",SYSFS{idVendor}=="04e8",SYMLINK+="android_adb",MODE="0666",GROUP="plugdev"
SUBSYSTEM=="usb",SYSFS{idVendor}=="0bb4",SYMLINK+="android_adb",MODE="0666",GROUP="plugdev"
For Samsung devices everything's okay:
./adb devices
List of devices attached
00198a9422618e device
I have been trying all of the answers given in a simmilar thread wthout any luck: Using HTC wildfire for android development
I just had this problem myself under Debian Wheezy.
I restarted the adb daemon with sudo:
sudo ./adb kill-server
sudo ./adb start-server
sudo ./adb devices
Everything is working :)
The cause of that problem has to do with system permissions (thanks # IsaacCisneros for this suggestion). Somehow HTC Wildfire (and maybe the others) need something more from the system than Samsung devices. Simple solution is to run Eclipse as a root, but this is not very comfortable with non-sudo Linux systems like Fedora.
I've found another way of achieving the same goal, which seems to be more user friendly and is lesser security hole then running entire IDE with super user privileges. Mind this is still only a workaround of the problem. System root usage should be minimalized only to administrative tasks, and “adb” was designed to work with normal user account without SUID. Despite of the fact that the proper setting of SUID is quite secure, every single permission increase is a potential system security hole.
1.Setting ownership of the adb binary (owner – root, owner group - user_group):
chown root:user_group adb
2.Setting permissions with SUID:
chmod 4550 adb
This should result something similar to this (ls -llh):
-r-sr-x---. 1 root user_name 1.2M Jan 8 11:42 adb
After that you will be able to run adb as a root, event though you'll be using your normal user account. You can run Eclipse as a normal user and your HTC should be discovered properly.
./adb devices
List of devices attached
HT0BPPY15230 device
I have a similar problem:
$ adb devices
List of devices attached
4df15d6e02a55f15 device
???????????? no permissions
Investigation
If I run lsusb, I can see which devices I have connected, and where:
$ lsusb
...
Bus 002 Device 050: ID 04e8:6860 Samsung Electronics Co., Ltd GT-I9100 Phone ...
Bus 002 Device 049: ID 18d1:4e42 Google Inc.
This is showing my Samsung Galaxy S3 and my Nexus 7 (2012) connected.
Checking the permissions on those:
$ ls -l /dev/bus/usb/002/{049,050}
crw-rw-r-- 1 root root 189, 176 Oct 10 10:09 /dev/bus/usb/002/049
crw-rw-r--+ 1 root plugdev 189, 177 Oct 10 10:12 /dev/bus/usb/002/050
Wait. What? Where did that "plugdev" group come from?
$ cd /lib/udev/rules.d/
$ grep -R "6860.*plugdev" .
./40-libgphoto2-2.rules:ATTRS{idVendor}=="0bb4", ATTRS{idProduct}=="6860", \
ENV{ID_GPHOTO2}="1", ENV{GPHOTO2_DRIVER}="proprietary", \
ENV{ID_MEDIA_PLAYER}="1", MODE="0664", GROUP="plugdev"
./40-libgphoto2-2.rules:ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="6860", \
ENV{ID_GPHOTO2}="1", ENV{GPHOTO2_DRIVER}="proprietary", \
ENV{ID_MEDIA_PLAYER}="1", MODE="0664", GROUP="plugdev"
(I've wrapped those lines)
Note the GROUP="plugdev" lines. Also note that this doesn't work for the other device ID:
$ grep -Ri "4e42.*plugdev" .
(nothing is returned)
Fixing it
OK. So what's the fix?
Add a rule
Create a file /etc/udev/rules.d/99-adb.rules containing the following line:
ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="4e42", ENV{ID_GPHOTO2}="1",
ENV{GPHOTO2_DRIVER}="proprietary", ENV{ID_MEDIA_PLAYER}="1",
MODE="0664", GROUP="plugdev"
This should be a single line, I've wrapped it here for readability
Restart udev
$ sudo udevadm control --reload-rules
$ sudo service udev restart
That's it
Unplug/replug your device.
Try it
$ adb devices
List of devices attached
4df15d6e02a55f15 device
015d2109ce67fa0c device
You udev rule seems wrong. I used this and it worked:
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"
(ATTR instead of SYSFS)
Changing the USB Mode from phone did the trick for me. (I set it to File Transfer)
under ubuntu 12.04, eclipse juno. I face the same issue. This what I found on Yi Yu Blog
The solution is same as same as Leon
sudo -s
adb kill-server
adb start-server
adb devices
Stephan's answer works (using sudo adb kill-server), but it is temporary. It must be re-issued after every reboot.
For a permanent solution, the udev config must be modified:
Witrant's answer is the right idea (copied from the official Android documentation). But it's just a template. If that doesn't work for your device, you need to fill in the correct device ID for your device(s).
lsusb
Bus 001 Device 002: ID 05c6:9025 Qualcomm, Inc.
Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
...
Find your android device in the list.
Then use the first half of the ID (4 digits) for the idVendor (the last half is the idProduct, but it is not necessary to get adb working).
sudo vi /etc/udev/rules.d/51-android.rules and add one rule for each unique idVendor:
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666", GROUP="plugdev"
It's that simple. You don't need all those other fields given in some of the answers. Save the file.
Then reboot. The change is permanent. (Roger shows a way to restart udev, if you don't want to reboot).
...the OP’s own answer is wrong in so far, that there are no “special system permissions”. – The “no permission” problem boils down to ... no permissions.
Unfortunately it is not easy to debug, because adb makes it a secret which device it tries to access! On Linux, it tries to open the “USB serial converter” device of the phone, which is e.g. /dev/bus/usb/001/115 (your bus number and device address will vary). This is sometimes linked and used from /dev/android_adb.
lsusb will help to find bus number and device address. Beware that the device address will change for sure if you re-plug, as might the bus number if the port gets confused about which speed to use (e.g. one physical port ends up on one logical bus or another).
An lsusb-line looks similar to this:
Bus 001 Device 115: ID 4321:fedc bla bla bla
lsusb -v might help you to find the device if the “bla bla bla” is not hint enough (sometimes it does neither contain the manufacturer, nor the model of the phone).
Once you know the device, check with your own eyes that ls -a /dev/bus/usb/001/115 is really accessible for the user in question! Then check that it works with chmod and fix your udev setup.
PS1: /dev/android_adb can only point to one device, so make sure it does what you want.
PS2: Unrelated to this question, but less well known: adb has a fixed list of vendor ids it goes through. This list can be extended from ~/.android/adb_usb.ini, which should contain 0x4321 (if we follow my example lsusb line from above). – Not needed here, as you don’t even get a “no permissions” if the vendor id is not known.
I'll prepend this postscript here at the top so it won't get lost in my earlier explanation.
I can reliably produce and resolve the no-permissions problem by simply changing the USB connection type from Camera (PTP) to Media device (MTP). The camera mode allows debugging; the media mode causes the no-permissions response in ADB.
The reasoning seems pretty evident after reflecting on that for a moment. Unsecured content on the device would be made accessible by the debugger in media server mode.
===========
The device is unpermissioned until you accept the RSA encryption warning on the debugged device. At some point after connecting, the device will ask to accept the debugging connection. It's a minimal security protocol that ensures you can access the device beyond the initial swipe lock. Developer mode needs to be enabled, I believe.
The "no permissions" flag is actually a good first indicator that adb recognizes the device as a valid debugging target. Notice that it doesn't list your other USB devices.
Details at the following and related pages.
http://developer.android.com/tools/device.html
Same problem with Pipo S1S after upgrading to 4.2.2 stock rom Jun 4.
$ adb devices
List of devices attached
???????????? no permissions
All of the above suggestions, while valid to get your usb device recognised, do not solve the problem for me. (Android Debug Bridge version 1.0.31 running on Mint 15.)
Updating android sdk tools etc resets ~/.android/adb_usb.ini.
To recognise Pipo VendorID 0x2207 do these steps
Add to line /etc/udev/rules.d/51-android.rules
SUBSYSTEM=="usb", ATTR{idVendor}=="0x2207", MODE="0666", GROUP="plugdev"
Add line to ~/.android/adb_usb.ini:
0x2207
Then remove the adbkey files
rm -f ~/.android/adbkey ~/.android/adbkey.pub
and reconnect your device to rebuild the key files with a correct adb connection.
Some devices will ask to re-authorize.
sudo adb kill-server
sudo adb start-server
adb devices
Had the same issue. It was a problem with udev rules. Tried a few of the rules mentioned above but didnot fix the issue. Found a set of rules here, https://github.com/M0Rf30/android-udev-rules. Followed the guide there and, voila, fixed.
I encountered the same problem today.
I followed the official instructions, but I didn't noticed that I SHOULD
run command "chmod a+r /etc/udev/rules.d/51-android.rules"
After I set this file to world readable and re-plug my usb cable,the status became unauthorized. Then just grant the permission and everything goes fine.
I agree with Robert Siemer and Michaël Witrant. If it's not working, try to debug with strace
strace adb devices
In my case it helps to kill all instances and remove socket file /tmp/ADB_PORT (the default is /tmp/5037).
Another possible source of this issue is USB tethering. If you have used USB tethering, turn it off, then unplug the device from USB, plug it back in, then do
adb kill-server
adb devices
That did the trick in my case (Ubuntu 12.04, Nexus S, SDK in home dir, never needed root to get it running). Depending on your device, you may need to run adb devices as root, though.
Try "android update adb" command. It helps me with samsung galaxy gear.
The output of ls -al /usr/bin/adb should show that it is owned by user root and group root. You can use Linux ACL (Access Control Lists) to give your local user permissions for adb as follows:
setfacl -m "u:userName:rwx" /usr/bin/adb
This is preferable to setting the SUID bit on /usr/bin/adb and also limits the users who can use adb to userName and root.
The answer is weaved amongst the various posts here, I'll so my best, but it looks like a really simple and obvious reason.
1) is that there usually is a "user" variable in the udev rule some thing like USER="your_user" probably right after the GROUP="plugdev"
2) You need to use the correct SYSFS{idVendor}==”####″ and SYSFS{idProduct}=="####" values for your device/s. If you have devices from more than one manufacture, say like one from Samsung and one from HTC, then you need to have an entry(rule) for each vendor, not an entry for each device but for each different vendor you will use, so you need an entry for HTC and Samsung. It looks like you have your entry for Samsung now you need another. Remember the USER="your_user". Use 'lsusb' like Robert Seimer suggests to find the idVendor and idProduct, they are usually some numbers and letters in this format X#X#:#X#X I think the first one is the idVendor and the second idProduct but your going to need to do this for each brand of phone/tablet you have.
3) I havent figured out how 51-adb.rules and 99-adb.rules are different or why.
4) maybe try adding "plugdev" group to your user with "usermod -a -G plugdev your_user", Try that at your own risk, though I don't thinks it anyriskier than launching a gui as root but I believe if necessary you should at least use "gksudo eclipse" instead.
I hope that helped clearify some things, the udev rules syntax is a bit of a mystery to me aswell, but from what I hear it can be different for different systems so try some things out, one ate a time, and note what change works.
Close running adb, could be closing running android-studio.
list devices,
/usr/local/android-studio/sdk/platform-tools/adb devices
On THL W100 running the device as root (as described above) worked only together with tethering enabled (I used AirDroid for that).
I had the same situation where three devices connected to one same host but only one had 'no permissions' others were online.
Adding SUID or SGID on adb was another issue for me. Devices seen offline every time adb restarts - until you acknowledge on the devices every time.
I solved this 'no permissions' issue by adding 'o+w' permission for a device file.
chmod o+w /dev/bus/usb/00n/xxx
My Android eclipse did not recognizing my 7 inch android tablet. its installing and showing usb icon on window but when i tried to run my application the device is not showing on eclipse.
You probably have to update your adb_usb.ini to include the USB ID of your device and/or install a driver if you're on Windows.
I had to this when I started developing for Kindle Fire.
Here's a page of instructions for Archos: http://www.archos.com/support/support_tech/updates_adb.html?country=us&lang=en You can probably find a similar page for your manufacturer.
After that, you need to stop adb and restart it and then you should be able to see your device.
Check out this THIS LINK.
I think you are facing problems in setting up your system for development, so take a look at step 3 on above link.
a. Log in as root and create this file: /etc/udev/rules.d/51-android.rules.
Use this format to add each vendor to the file:
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"
b.Now execute:
chmod a+r /etc/udev/rules.d/51-android.rules
And if you are on ubuntu, THIS LINK will help you.
Good luck!
So I switched from Win to Ubuntu 11.10 for my Android development. In the same way as ADB drivers for Win7 was a problem, something weird is happening in Ubuntu as well. I try to run a (runnable) application, but my connected Desire S is somehow not recognized. See the what happens here:
I have tried doing this but it doesn't help. Do I have to install something to make this work? Really annoying that this issue arises in Ubuntu as well, I thought it was not supposed to?
This is because you have not given permissions in Ubuntu to access the Phone
http://developer.android.com/guide/developing/device.html
It seems you have a driver problem.
You might want to check the link below in order to add the line for HTC devices in the android.rules file.
Setting Up ADB/USB Drivers for Android Devices in Linux (Ubuntu)
you have to add an udev rules in linux, for your mobile. For instance,
cat /etc/udev/rules.d/51-android.rules
SUBSYSTEM=="usb", SYSFS{idVendor}=="0502", MODE="0666"
where you can retrive the idVender with lsusb
Run lsusb after connecting your device then look at the vendorid and product id. Add it to your udev file.
Should be similar to https://github.com/mrothe/desire-udev/blob/master/99-desire.rules
I know this is an old question, but I hope my answer helps someone if they have the same problem and find this answer via search engines like me.
For my HTC Wildfire S A510E, I needed to add
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bb4", ATTRS{idProduct}=="0cb0", MODE="0666", GROUP="my-user-group"
into /etc/udev/rules.d/51-android.rules in my Ubuntu 14.04.1.
You can find the full list here http://doc.ubuntu-fr.org/android (in French)
So I've thrown the book at this problem and think I've isolated the cause.
I've downloaded and installed JDK 32 and 64 bit.
I've installed the Android SDK as needed.
I've modified android_winusb.inf inside of the google-usb-driver to include the Kindle Fire device IDs.
I tried downloading the kindle fire windows 7 driver from amazon (as described in the answer here), and using that.
I tried modifying that driver to include the fire device ID in the x86 section.
I've killed and restarted adb diligently, and restarted my comp several times to see if that would magically fix it. nothing.
The only thing I'm unsure about is the modification of adb_usb.ini. Unfortunately, my .android folder doesn't exist in my %USERPROFILE%, but instead exists in another location on my computer. That folder doesn't have adb_usb.ini either. So I copied the contents of .android to my %USERPROFILE%, and created adb_usb.ini in each, and added 0x1949 to that empty file.
This did not work. adb devices still turns up zilch.
I think adb is having trouble finding my adb_usb.ini, but really, I have no idea. And if that is the case, I don't know how to fix that. Help?
Just adding 0x1949 to the adb_usb.ini was enough for me.
Make sure that you have added the right product/vendor id in adb_usb.ini file.
I had the same exact problem only after adding 0x1949 I could see the device listed.
Either amazon is changing the id's or people are giving wrong id's in random forums. The first one is definitely not required.
After adding the product id's my adb_usb.ini looks like this and I don't think your .android location matters
0x0e79
0x006
0x1949
This was driving me crazy also. Did recommendations from other links and posts and did not work. After running adb command without options, I saw an option for usb. I executed the following:
adb kill-server
adb usb
you should see some output after this, I didn't save the results
adb devices
Now showed my device
Type out your adb_usb.ini
cd /users/username
type adb_usb.ini
Make sure it shows 0x1949... mine had a special character instead of the x. Edit the file and change it manually to an x.
your device driver is not working go to the following link and update
http://www.jayceooi.com/2011/12/13/how-to-install-kindle-fire-adb-usb-driver/
Also double check that Windows isn't being sneaky and actually saving your adb_usb.ini as adb_usb.ini.txt when you create the file from scratch!
In my case, Windows was using the default driver. I uninstalled the windows driver.
Installed the driver at \android-sdk\extras\amazon\kindle_fire_usb_driver. Ran the following:
adb kill-server
adb usb
You should see some output after this, I didn't save the results:
adb devices
Device finally showed up. Kindle then showed up in device manager. Was not showing up there before.
In the %android_sdk%\extras\amazon\kindle_fire_usb_driver folder you can find KindleDrivers.exe file. Just run it and Kindle drivers for Windows (Win7 in my case) will be installed.
That sounds like you've done all the right things. For me the adb_usb.ini file did the trick and it's in c:/users/dirk/.android/adb_usb.ini. Oddly, I also added the product id of 0x006 on another line, thought I don't think that matters (the 0x1949 is the vendor id).
Make sure the adb_usb.ini is in the same folder as your avd folder. You can try creating a new AVD and look around to see under which user the new one was created.
Hope this helps.
So I had the exact same problem as you and I also had a problem with it looking for java.exe in my c drive instead of my d. I fixed this issue the same way I fixed that. Use the "mklink" command line tool to create a symbolic link in the C drive to your .android folder on your other drive. My exact command was:
mklink /D .android D:\.android
I was in my C:\Users\<User Name>\ folder
After that I ran adb kill-server and adb devices again and it showed up!
Hope that helps.
Adding this worked for me
0x1949
0x006
The main issue here is simple: for some reason when you install the drivers, the version of adv_usb.ini in the user/.android does not contain the vendor ID
I've check and the file was plain.
All that I had to do was to copy the ini file from the driver folder into username/.android and do a adb kill-server, followed by adb usb and the device was recognized.
In general, running "android update adb" from the /Tools folder should be enough to update the correct adb_usb.ini file. The location of this file is relevant as adb will only look for one of them. I had a CRC error in sdkuilib.jar, and it would not copy. This caused "android update adb" to fail, so my adb_usb.ini file did not get updated.
Also, when I went to update by hand, I was logged on as joe user, but I elevated to admin user to perform the update. I modified the joe user copy of adb_usb.ini (c:\users\JoeUser.android\adb_usb.ini), but the adb program looked instead at the admin copy of adb_usb.ini (c:\users\Admin.android\adb_usb.ini). So, adb did not see the 0x1949 that I added by hand.
Once I replaced my copy of sdkuilib.jar (by redownloading, installing in a separated folder, and copying over the bad file), I was able to run "android update adb" and 0x01949 showed up in my admin adb_usb.ini. [To find this, I changed echo off to echo on at the top of both the android.bat and find_java.bat files.]
After that, I did an adb kill-server and adb usb. But I still got the "error: device not found" message. Only then did I notice that my Kindle Fire had timed out. I turned it back on, unlocked it, and at that point, the kill-server "adb usb" sequence produced "restarting in USB mode".
Once that output was produced, the adb devices showed my Kindle Fire.
I had this exact issue for the longest time - Michael's answer lead me to the answer that fixed this for me.
If you don't currently have a C:\Users\[Username]\.android folder, add one manually. Copy adb_usb.ini into this folder. Windows may give you some trouble if you try to create this folder in Windows Explorer (beginning the folder with a period, probably). I had to open cmd and type move android .android to accomplish this.
After doing this, adb devices immediately showed the device.
For future readers' reference:
Don't forget to turn on USB debugging on the device. (At least in my case, on OUYA, this is disabled by default.)
If you are using Windows and you have the Android SDK installed (if ANDROID_SDK_HOME environment variable is set) then adb will use %ANDROID_SDK_HOME%\.android\adb_usb.ini instead of %USERPROFILE%\.android\adb_usb.ini
Also this post has a command to populate your adb_usb.ini with Vendor IDs of all currently connected adb devices.
In my case, I had to install Kindle Fire drivers.
If you can't find it in your local disk, you can download from official Amazon page:
https://developer.amazon.com/public/resources/development-tools/ide-tools/tech-docs/05-setting-up-your-kindle-fire-tablet-for-testing
Direct link:
https://s3.amazonaws.com/android-sdk-manager/redist/kindle_fire_usb_driver.zip
I would like to know whether is it possible to use my HTC wildfire (some links would be nice) for android development instead of the emulator.
I have tried to find the information by Google, but so far no useful results.
If I get more information, I'll update here.
[When I used wildfire with eclipse, I got this.]
Thank you very much.
From your screenshot, it looks like you do not have the permissions set properly to access the USB device.
Either try to run the adb service as root:
$ sudo adb kill-server; sudo adb start-server
OR, the more permanent solution is to set up udev rules for USB device permissions. See the instructions in step 3 of the android Developing on a Device page.
Log in as root and create this file: /etc/udev/rules.d/51-android.rules. The udev system checks this file for special cases when devices are detected.
Edit the file to read:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
This sets permission bits on the dev node to world read and writeable for the special case where the USB vendor ID is equal to 0bb4.
Now execute:
chmod a+r /etc/udev/rules.d/51-android.rules
... gives world read permission to these android rules which is needed to let the udev daemon process this new rule.
Sure, all you need is to install the USB driver and follow the directions from here.
The USB driver is included in the HTC Sync software, which you can get here.
Go to htc website
http://www.htc.com/europe/SupportViewNews.aspx?dl_id=982&news_id=769
and download the driver
and just connect the htc phone to the pc and run the application from eclipse.
No configuration needed. It directly runs on the phone instead of emulator.
Cheers!
The only other thing I can think of is how you've set your phone to connect via usb-to-computer... And that might just solve my own similar problems... I'm using "HTC Sync" as my connection style, when I haven't even tried the others.
Lets find out, shall we?
Nope. Connection type didn't matter at all. "Charge Only", "disk drive", "usb tethering", it didn't change my behavior at all (I can launch apps, but logcat shows nothing from my app, and my breakpoints are ignored).
Sounds like it's time for a new question.
If device still not detected (???), after updating /etc/udev/rules.d/51-android.rules as suggested earlier, also unplug and re-plug the usb cable into the device.