I am trying to enable USB Debugging on Android so that I don't need to use the emulator.
I did what all the posts all around the web say to do: I went to settings -> applications -> Developer -> USB debugging
It still does not turn on the notification sign that USB Debugging is enabled, and Eclipse does not recognize it, and uses the regular emulator.
Does anyone have any idea what is wrong?
You haven't specified what device you are using or what operating system you are using, so that could be helpful.
A few things to keep in mind:
1 Don't mount as USB storage.
2 You also need to make sure to install the drivers for your phone so that the Android Debug Bridge (ADB) can properly communicate. After these are installed, try the command "adb devices" and you should see an item in your list of devices.
Update based on your comment: You can download Kies from Samsung, which include the drivers (as well as other things): http://www.samsung.com/us/kies/
Or you can find unofficial driver-only packages, such as: http://forum.xda-developers.com/showthread.php?t=961956
I think you'll need the OEM USB dirvers.
Read this:
OEM USB Drivers
My experience with windows has been that you might need to un-install the USB drivers under device manager. Then disconnect the device (restart might be required). After plugging the device back in make sure you use the manufactures drivers if available
you have installed your device driver rite?then right click on your app name->run as->run configurations->target->select manual->apply.after that click on debug button then it will ask you to select the device.
If everything else is tested, try with another USB cable.
On Android 4.2 and higher, the Developer options screen is hidden by default. To make it visible, go to Settings > About phone and tap Build number seven times. Return to the previous screen to find Developer options at the bottom.
Fruthermore on some devices you will be asked to accept an RSA key, which allows debugging through your computer. This ensures that other adb commands cannot be executed unless you're able to unlock your device.
Detailed information can be found here:
http://developer.android.com/tools/help/adb.html It is the overview about adb commands (which is used to send data to your device) and it starts with the steps how to bring your phone to debug-mode.
I wish to add to Danation's answer with the following.
If you have installed KIES, and you've tried following instructions a couple of times (for the android SDK package) without success, here's what worked for me:
As a precaution, disconnect the device, and press 'Revoke USB Debugging authorizations'.
Now, go to kies, and reinstall the device driver as seen on the image below.
Connect the device.
For me, it was a routine, it usually works when installing kies, but I was stuck on this today for a little while, and I hope i can help others with my solution as well..
Related
Suddenly my Android Studio stopped detecting all my devices, none of them is working. It happen from one execution to another. I've changed a few lines of code (1 min maybe?), hit run (instant run) and then I missed all my devices.
I'm using a Mac and as devices: Nexus 5x, Galaxy s6 and Oneplus One. What can be happening? I've checked previous questions here and tried all this:
Run configurations: no matter if I chose usb device or show the window, it does not work.
Tools > Android > Enable ADB integration: didn't help
Command line adb devices does not detect any either.
I've revoked and granted again USB authorizations. Still not working.
I've tried other apps I have, none work.
Restarted phones
Restarted android studio
Restarted computer
(Note: if I start an emulator it works, but I'd prefer to use physical device since I have to scan real barcodes)
Thanks a lot in advance.
On Lollipop 5.1
Go to About Phone
Click 7 times on Build Number. Now Developer options are enabled
Go back and Click Developer options
Enable USB debugging under Debugging.
Well, I've fixed. The problem in case any faces the same was a Stetho (http://facebook.github.io/stetho/) tab in chrome, the one you open by typing: chrome://inspect/#devices not sure about the reason because it's been open for 2 days now, but it was the cause, once I closed it, it worked.
Found this unaccepted answer here: macbook adb cannot open interface That for sure should be accepted.
EDIT: I've been able to replicate the problem. It happens when you have the devices tab open and try to run a second app that has stetho configured.
It happens if your device drivers not installed Please do this.
In Case of PC
Right click my computer select manage select device manager from left panel if your phone drivers not installed there will be yellow alert on driver right click on it select update driver software then select search automatically for update driver software.
Other
Please install the missing drivers of your phone.
I had the same problem . What I've done to solve it going to Setting >> Additional Setting >> Developer Option
Now select:
Developer option on
USB debugging on
Install via USB on
USB setting security on
Verify apps over USB
OK, what finally worked for me was to go into Settings\Developer options\Select USB Configuration and change it to PTP or MIDI....either one of those worked for me and all of the sudden my phone showed up and I was able to see and run my test app on my android phone.
This woorked for me
Go To Settings
Developer Options
Enable USB Debugging
Enable Verify Apps over USB
Select USB Configuration: Choose MIDI
I hope it also works for you
I tried to play Android Studio 2.0 with my mobile without success, what I did are:
In my mobile, Apps/gear icon/Settings/SYSTEM/{} Developer options/ Android debugging/, enable the Android Debug Bridge(adb) interface (set tick).
After plug in my mobile to my PC with a USB cable, I found A0001 in my Computer folder. Within A0001, I can see the files in my mobile.
In my PC, run Android Studio/bin/studio.exe, "Select Deployment Target" window shows with message "No USB devices or running emulators detected"
I have tried two different USB drivers but got no lucky.
Perhaps I should tell Android Studio where is my USB driver? But, how?
Can you help?
I had the same problem too and I managed to resolve it this way.
First, enable debugger mode in your android device.
Go to Device Manager from Start Menu and try to find ADB Interface with an error symbol on it. This generally happens because windows sometimes fail to load all the mobile device drives.
Next, Go to http://adbdriver.com/downloads/ and download the driver installer, unzip and run it.
Now go to Android Studio and you should find that everything is working fine.
Chill....
same here... but I hope you can avoid this problem the same way I Did.
There is an "universal ADB Driver for all Android Devices".
Yep... sounds like magic.
Just follow this link.
https://devs-lab.com/usb-adb-drivers-for-all-android-devices.html
Fun fact there is no "Step 5" in that article so I'll give you.
you have to enable "USB Depuration" from "Developer Options" connect your cellphone to computer as a "MTP storage" , after windows detected your cellphone as a "Portable Device" Execute ADBDriverInstaller.exe (that downloaded from devs-lab)
check the device list and your cellphone will say "Driver incorrectly", select your cellphone and press install.
Step 6: Once the process is completed, you’ll see something like the image that appears there (in the link).
I hope that somebody else work this
Go to Run > Edit Configurations...
Under Deployment Target Options select Show Device Chooser
Dialog from the drop-down-list
See picture for reference
After struggling with this problem for a while, I found that there are certain cables that can only charge your phone, and even though they seem to be working, they do not allow your phone to be used as a "Media Device" and therefore Android Studio does not detect it.
Go to
Tools | Android | Enable ADB Integration
Make sure it's enabled. When I upgraded to 2.X it was for some reason disabled for me and it took me hours to find it.
I just cannot beleive why it is so difficult! let me try again and please check my steps again:
I installed Android Studio 2.0, then run Computer/OS(C:)/....../Android Studio/bin/studio.exe.
The Android Studio window appeared in my working area Computer/OS2(J:)/Users/MyAccount/Desktop/.
I connected my mobile with my computer, Cpmputer/A0001/ appeared, from it, I can see the files in my mobile.
I clicked the run icon in the Android Studio window, a "Select Deployment Target" window apeared with message "No USB devices or running emulators detected".
(I got two USB ports and tried both but got the same result.)
Finally found the solution : )
1. Install device’s required driver. (for me it was motorola device
manager)
2. Download Google Usb Driver from SDK Manager
3. Open your phone's setting->developer options and turn on USB debugging.
4. connect your device to computer
5. Go to Device Manager from Start Menu and try to find if there is ADB Interface with an error symbol on it.
5.1. If yes, then right click on the ADB interface->Update driver
software->Browse my computer for driver software-> Let me pick from
a list of device drivers on my computer->Select Motorola ADB interface
5.2. Now one confirmation will pop up in your mobile, accept it
5.3. Now you should see no error mark beside the ADB interface in your
device manager
There are 3 steps to set up your phone for debugging:
1) Change your phone to developer's mode by going to Settings, About Phone, Software Info, Android Version - tap at least 7 times on the Build Number text. You will get a message saying you are now a Developer.
2) Enable USB Debugging in Settings - Developer Options. Make sure you are not connected to your USB port to see the USB Debugging option enabled, otherwise it will be disabled.
After you plug in your USB, swipe at the top of your screen, you will see USB Debugging on.
3) Make sure USB connection is set to Photo Transfer (or MTP - Transfer photos and videos). After you plug in your USB, swipe at the top of your screen, and you will see Tap to change USB options on the menu. Tap it, and select Photo Transfer option.
Perhaps your mobile manufacturer does not provide the proper driver.
Go to Device MAnager and look for: Android Composite ADB Interface. If it's there, the driver is properly installed. If not... You and I are on the same "wagon"...
I tell you: Acer? Never again.
USB debugging somehow got turned off under developer options on my Samsung. Turned it back on and it worked, but only by clicking on "debug app" instead of on "run app".
With me, when connecting the mobile to the pc, three options appeared on my mobile.
Charge this phone
Transfer Files
Transfer Images
I thought I should select "Transfer Files", but it dd not work
But it only when works I choose "Charge this phone"
Few ways to resolve this problem.
Case 1: Install PdaNet+ in your system. (worked for me).
Case 2: Enable the USB debugging option in your mobile. Setting > developer > Check "USB Debugging".
Case 3: Change from MTP to PTP.(sometimes vise versa works).
Question is Your development sdk no mobile version android sdk Platform.
For example, my android phone system is 6.0, i need download sdk Platform 6.0.
First, try to revoke the usb sessions in the developer options, then try downloading an oem usb driver
If then doesn’t help you can try opening the device manager on windows, right click on your phone, select uninstall. This worked for me if I had the same issue.
I couldn't find my android phone or any USB device I connect to my windows laptop on the hidden icons. Well, my mouse and phone could charge but I can't seem to see my phone in the File Explorer option.
I prefer running Apps using my phone rather than emulator in Android Studio and yet I couldn't see my phone when I connect using the USB.
This helped me solve all my problems after several hours of searching for solution.
Download Universal ADB Drivers - One size fits all Windows Drivers for Android Debug Bridge
Please use this link: https://adb.clockworkmod.com/
I hope this works for you like magic!
I can see all the devices I connect using the USB cable and my mouse receiver.
I am trying to connect my android device on mac to test application I developed.
First I installed USB driver, then I activated in my phone the developer option by tapping on Build Number and then tick USB debugging option.
Once I did all those steps when I connect my android mobile, my Mac still not recognize my device.
Any idea to solve it?
Maybe it's your USB cable, try another one.
There are two types of USB cables:
for supplying power only
for supplying power and data
I after few research and testing of existing solutions, I found mine, my issue was released while I have installed Android file Transfer for Mac
I experienced the same problem with a Moto X and my Macbook Pro. I tried many of the suggestions (installed Android File Transfer, tried different usb ports on my computer, Settings => Storage => USB computer connection => toggled between MTP and PTP, etc.). None of these other recommendations helped.
It finally worked when I tried a different micro-usb cable.
Bizarre. You definitely want to first enable Developer Options first by going to Settings => About Phone => tapping Build number 7 times to display Developer Options. From there, you want to enable USB debugging.
I found this solution to be helpful to resolve this problem
Connect your Android to your Mac via USB.
Unlock your Android's screen. ...
Swipe down to open the Android Notification Panel.
Tap the USB option in the Notification Panel.
Tap "File transfer" or "MTP."
Click the Go menu and select "Applications."
Double-click "Android File Transfer."
https://discussions.apple.com/thread/250023078
I had this problem. The only solution was to reboot my computer. Then it started working again.
Just to add my experience here. I had a similar problem with my mac book pro and my Google Pixel 1 device. For me when running adb devices locally, I was no longer showing my device on the list. I would see any emulators I had running, but not my physical device.
My solution and steps:
Go to the "Settings App"
Go to "Developer Options"
Revoke USB debugging Authorizations
Toggle Developer Options off / on
My device then prompted me to allow debugging from my computer and everything continued to work as expected. adb devices resulted in showing my connected device.
Hopefully, this will help someone else if the above does not.
Make sure to have debugging by usb enable on your device.
It is an option inside "Developer options"
I've recently (2018) started to have this issue, and have found the only way to get my device connected is to use a USB hub. I have not been able to track down a root cause but will edit this answer if I can find a solution rather than a workaround.
I connected my Android deceive with my mac:
1) If you use Android studio, you may update to latest version of 1.0.2 or 1.1 preview, because lower version have some problem with ADB connection.
2) You may restart your IDE once again.
3) You may go to settings -- storage -- three docs on the right up corner -- USB computer connection -- enable MTP
I have an HTC U11 and a MacBook Pro (2017). It used to work most of the time, but I experienced issues with it once or twice. Then a restart of the Mac solved the problem.
Recently I was not able to USB debug. adb devices gave nothing, even though my phone said I'm USB debugging (even asked if I wanted to).
After trying many things the solution was to connect my phone and run HTC Sync Manager (I also had to update it). Then it magically started to woek.
I hope it helps somebody.
check your android sdk tools, install your sdk-plateform-tools package.then it is ok
For me what fixed the problem is
i clicked on the notification "USB for file transfer" in the
notification panel on the phone
Clicked on "Transferring images"
Than I clicked on "Transferring files / Android Auto" and it was fixed.
I know this question has been asked numerous times, but none of the threads have had an answer to solve my problem. It seems no matter what i try Eclipse just wont detect my phone, I have set it to debug mode in the settings, i've installed "Kies 3" on my laptop and it says i have the latest drivers already installed on my phone when i try to update it.
I've installed the google USB driver package from the sdk manager and have downloaded and installed the samsung driver from the samsung website. Windows recognizes the device and in the device manager under android phone it appears as "SAMSUNG android ADB Inerface".
Im running windows 7 and have even tried deleting all the mounted dive drivers from regedit as i seen suggested in another thread but still no joy! Really starting to get frustrated with this at this stage i've been trying for two days now to figure this out!
This is such a pain! I need to be able to debug on my phone too as i'm using features that the emulator can't handle (i.e. audio recording). I'm all out of ideas here so any help would really be appreciated!
Thanks
The method I followed to install my GT-I9300 drivers was this:
Download samsung drivers from this link:
http://developer.samsung.com/android/tools-sdks/Samsung-Andorid-USB-Driver-for-Windows
Then just connect your phone and make sure you have a stable Internet connection: It will download required drivers automatically.
Also, make sure you have enabled Android developer options in your phone settings. Enable USB debugging in developer options.
I usually get it to work, when I switch the USB mode in my smartphone (e.g. MTP to PTP). This way, windows starts downloading more drivers.
1) Try disconnecting device from PC, revoke USB Debug authorization from settings menu, and then re-authorize the computer you are working on once you connect it again.
2) Check to see if you see the phone in DDMS perspective (left hand side) - if so, try clicking on it and it should work.
3) try removing all drivers (Google, Samsung etc.) + scan "leftover" registery entries using a reg cleaning program. Then install ONLY Kies Light version and try again.
4) It once worked for me - try changing the USB cable (preferably, to an original one)
Let us know if something worked!
1) enable USB debugging in your phone's settings.
2) ensure that you have the proper drivers installed.
3) open adb in command prompt and run "adb connect"
I just upgraded my phone to 4.2.2, but now i cannot use it in eclipse anymore.
I tried rebooting the device, reset my debug-settings but I cannot get it to work anymore.
I saw it is already a registered issue. There are some new security enhancements, so there should be a dialog (see here at bottom) but this dialog doesn't appear. I don't have several accounts on the phone, which is pointed out in the issue..
Anyone any suggestions?
EDIT: Look at accepted answer below, this should cover all cases. In my case, there were some packages missing, which weren't shown in the Android SDK Manager. I just found the Packages -> Reload in the Android SDK Manager... And I thought this happens automatically
You need three things in order to make sure this update goes smoothly:
Make sure your device is actually running 4.2.2 and the problem is not something else
Your SDK is updated to the latest tools. The adb binary in all but the latest version does not support the 4.2.2 security enhancements.
You are on the main account of your device in case of multiple user accounts.
Connect your Device to your computer and execute adb devices (make sure USB debugging is enabled). You should see something like this:
3tiu52839ry082j3 offline
Right about now, there should be a dialog on your device that looks something like:
Check the Always allow from this computer box if you want and click OK.
That's about it.
Some other things to check:
Make sure your USB cable isn't broken. Sometimes, the smaller cables break inside the main one, and your device may charge but have no data connection. Try with a different cable, or try accessing files on the device over USB (this will go fine if your cable is fine)
Make sure you're using the newest version of adb. Even after I updated my SDK tools, I couldn't get my device authorized when using adb. I eventually figured out that the Nvidia install of the NDK and SDK tools had updated my PATH variable to use the adb from that install, which wasn't the latest update. By using the adb in my newly updated install, I was able to get it all working.
For me it was solved by changing Nexus 7 tablet to "Camera(PTP)" mode.
Check out this blog post on how to do it.
After USB connection of Nexus 7 and confirming digest on Nexus 7, also connecting through TCP/IP with ADB worked.
Wierdly, unchecking and rechecking the "Allow USB Debugging" option popped me the window and selecting "ok" solved my problem.
If none of the solutions worked for you then Reset ADB.
Go to Devices ---Click the right most down arrow----Select Reset ADB from the list.
I had tried everything suggested here and suggested in every log/blog that I could find in google, but still no go. The USB cable is known to be good. ADB is version 1.0.31 (as shown with , USB Debugging is enabled in the Nexus 7 tablet, the SDK was updated to the very latest tools as available on 1-mar-2013 for 4.2.2/API 17. I had tried both Media and Camera modes for USB, rebooted windows, rebooted device over and over again, re-installed latest google USB driver, etc. etc. but ADB Devices still showed nothing.
I hard reset the Nexus 7 tablet thinking that maybe the screen to allow usb debugging had appeared but got hit with cancel. But that didn't work either.
What finally worked was:
going into windows control panel | Device Manager,
selecting NEXUS under Portable devices,
then in the Driver tab clicking on update and manually selecting the Google USB driver (the check feature said it was up to date). Previously, the date shown was in 2006, afterwards a date in 2012 (but more on this in a moment).
That didn't fix anything though.
So then I switched USB from MEDIA device to Camera device - THEN it wanted to install driver software, so I let it do that. Afterwards, I noticed that the driver for the Nexus was back with the 2006 version, BUT then ADB DEVICES FINALLY SHOWED OFFLINE!!!! HALLELUJAH AND the Nexus was displaying the Dialog to allow USB debugging, and it now all works.
What I am not sure of is what step actually solved the problem. I don't think it was necessary to hard reset the Tablet, but the fiddling with the device driver wasn't a very convincing solution either - I don't think the driver was corrupt - but maybe it had to be changed to get the right driver associated with the tablet when connected as a Camera Device. In any event, it is necessary to connect the tablet as a Camera device for ADB to work...
Restarting device or enabling USB debugging did not solve my problem.
However I changed USB PC Connection to "Camera(PTP)" mode and adb devices showed the device id of the phone.
After reading a lot post talking about this particular problem, I actually solved it by resetting user permissions on files (that were owned by root): ${HOME}/.android/adbkey and ${HOME}/.android/adbkey.pub
Go to Device Manager and uninstall your device and remove from USB
HAve you CMD opend and make sure you are at least in ADB Help.
Connect device to USB and continue with steps provided by Raghav Sood - few answers ahead of me.
Worked for me just fine
I tried with this custom build and it works for me. Now I can see my logcat in Eclipse again.
https://github.com/khaledev/ADT/releases
Download the zip file then in Eclipse menu Help > Install New Software... > Add > Archive... Just pick the downloaded zip and do the rest of the install process.