android studio "USB device not found" - android

I'd like to start by saying that I am using android studio(1.0.1) with an Android (v4.1.2) phone.
Android studio is not recognizing any device connected.
I have already set run configuration to usb device,
I think my problem is with Google usb driver,
how to check if it is working?
Thank you

If none of the above help, try doing adb kill-server and adb start-server, then do adb devices and see if device is detected.

Can you check if your Operational System recognize/mount the device? See if you can access the folders inside the device. If you won't you may install the compatible driver.
Hope it helps.

Which phone do you got?
ask yourself the following quistions first:
1. Did you install all the phone drivers?
2. Are you in developer mode with usb debugging on?

Related

Android adb devices does not detect my phone

I have Android Studio on Windows 8.1 and I want to run my android app on my Samsung Galaxy S7 phone.
Here are the details:
USB debugging in my phone is ON
adb version is 1.0.36
Under Device Manger -> Portable Devices -> My Phone, the status is 'The device is working properly'
I also installed Google USB driver in SDK Tools
My desktop can detect my phone since I can read and write files using Windows Explorer
I tried the following but still, adb devices still does not recognize my phone.
Tried USB Configuration MTP
Tried USB Configuration PTP
Tried using different USB cables
Tried restarting Android Studio before and after I plug my device to my desktop
Did I miss any configuration? Any help is appreciated!
Thanks!
I too had the same problem.
I tried the following and it worked.
Make sure Developer options and USB debugging is enabled on your device
Then on your Windows system.
Open device manager and locate your device's ADB Interface Driver
Right click and choose properties
Check in the general tab if your device is working properly
If it is not enabled then go to Driver tab and select enable
You may have to try enabling your device a few times(7-8)
If this works then you may see the below message on the General tab
This device is working properly.
You need to restart your computer before the changes you made to this device will take effect.
And that's how I made it work.
install drivers for your device and enable developer mode for your device
While the simple answer here is enable debug mode and install drivers, I think the answer should mention that if nothing works , do install google drivers. I stumbled on a video explaining the same, so adding the link here.
https://www.youtube.com/watch?v=asbkkV-IIZc
It helped fix my issue with oneplus device. Also, I could get the google usb drivers from android studio > sdk manager > sdk tools section.
Hoping to save someone else's time.
If you entered command adb devices in cmd and don't see your device ID, you can to open Windows Task Manager and close adb.exe task. Then you need to open again cmd and enter adb start-server and check devices again.
If you don't see your device ID after all then maybe problem in phone or drivers.
I found the answer here
I just need to install Samsung USB driver and it worked fine. I guess the Google USB driver did not work for me.
Also, I didn't know that I need to install a USB driver even if I can already read/ write files to my phone when I connect it to my desktop.
In Device Manager, I was looking at the wrong device (Portable Devices). I should have been looking at Other devices and there I can see that the Samsung phone has no drivers installed.
Thanks!
I had the same problem. Just try another USB port on your computer.
rebooting of the android device worked for me. Also, try to use the port USB 2.0
I was also facing the same issue on my MAC-OS. Restarting the MAC fixed the issue.
I also installed Android File Transfer to check if this was only a debugging issue or if it was an issue with the connected devices. Even AFT wasn't working so it was definitely not a debugging issue.
I also got this message on launching Studio after restarting the MAC.
sometimes windows firewall prohibit the adb.exe in platform-tolls folder
first check your phone and be sure about "usb debugging" is "on"
check that Default USB configuration is on "transferring files"
if you checked 1,2 but the problem is not solved you should reinstall platform-tools from "SDK manager" then "SDK tools" uncheck "Android SDK platform-tools" click apply then reinstall it by check "Android SDK platform-tools"

Android Studio - ADB Error - "...device unauthorized. Please check the confirmation dialog on your device."

So I started getting errors in my ADB logs which, I think, are causing my device to now display any logcat output for my app. I am getting all the logcat output except the one from the app itself.
PropertyFetcher: AdbCommandRejectedException getting properties for device 04799057970ed1fc: device offline
PropertyFetcher: AdbCommandRejectedException getting properties for device 03799467970ed5fg: device unauthorized. Please check the confirmation dialog on your device.
you have missed the Fingerprint Certificate Authorization dialog in your phone when you connected it, try to change the USB mode to Media, or another different than the one you have in and then reconnect your device, or go to Developer Options -> Revoke USB Debugging and reconnect, watch for the dialog and click on accept, that should solve your problems.
If that doesn't work, set your ANDROID_SDK_HOME again, and then:
Unplug device
Run:
adb kill-server
adb start-server
Plug in device
I experienced the same issue.
To ensure that your Android Device is expecting the correct fingerprint from the system (e.g. after switching Android SDK installations -> different adb server running!), do the following (actually, this did the magic for me):
unplug your Android Device
revoke USB debugging authorizations in Android Developer Options
plug your Device. You can accept the fingerprint once more.
1) Go to Phone Setting > Developer options > Revoke USB debugging.
2) Turn off USB debugging and Restart Again.
It will work definitely, in my case it worked.
Please check this.
https://code.google.com/p/android/issues/detail?id=82850
I faced the same issue. Could notice that the "adb integration" was disabled. Please enable it at your IDE (Tools | Android)
This happened to me because I enabled usb debug previously on another pc. So to mke it work on a second pc I had to disable usb debugging and re-enable it while connected to the second pc and it worked.
The solution to this was just to change the USB cable, having enabled
ADB Integration via
Tools >
Android >
Enable ADB Integration.
Below are the commands for Ubuntu user to authorise devices once developer option is ON.
sudo ~/Android/Sdk/platform-tools/adb kill-server
sudo ~/Android/Sdk/platform-tools/adb start-server
On Device:
Developer option activated
USB debugging checked
Connect your device now and you must only accept request, on your phone.
In my case, it was literally a bad USB cable. Apparently it was right on the edge - adb logcat would work, but about half the time I would get this error when trying to push an app to the device.
Changed to a different cable, and everything was fine. The old cable was also very slow at charging, so I should have suspected it sooner...
Remove the Debug permissions on the Device, with the cell phone connected, then put them back, and ask if you want to allow the PC to have debug, accept and ready permissions: D
I had the same problem when debugging over wlan. I could launch the application from Android Studio but couldn't get any messages in logcat.
I fixed it by connecting the device to my pc via USB cable, launched the application once and everything was working. Then I disconnected the USB cable and tried debugging again via wlan and everything was working again.
I've got the same message too.
In my case, I have changed my dev environment to another notebook pc and my device is samsung galaxy note 2014 edition.
My OS is windows 7
My galaxy note condition listed as following
developer option activated
USB debugging checked
The error message was "device unauthorized. Please check the..."
In general, the location of the default android setting was C:/Users/Your_login_name/.android then I copied and pasted all files in the '.android' folder to my new pc's setting folder.
After that the problem was gone.
I think the problem was adbkey file mismatched.
Also, I didn't have any menu name such as revoke adb authorization.
Seems strange the intricate cable&restart solution steps ... The first time I've plugged the Android device to my Ubuntu (15.10) I've got Connect as: multimedia or camera options and in my Android Studio the device status was unauthorized. It wasn't until I choose between one of the options that I got in the Android device the PC authorization option. When you give the proper permissions in Android then the device status changed to online in Android Studio. Cheers
This might help -
Just Download and install the Android SDK version(same as your mobile's android version), then run.
In my case the problem was about permissions. I use Ubuntu 19.04
When running Android Studio in root user it would prompt my phone about permission requirements. But with normal user it won't do this.
So the problem was about adb not having enough permission.
I made my user owner of Android folder on home directory.
sudo chown -R orkhan ~/Android
Download platform-tools-latest-linux.zip.
Run:
unzip platfo*.zip
cd plat*
./adb devices / ./adb usb / etc
I get this error very often for some reason when doing "ionic cordova run android" and running on an emulator. What works for me is to end the "adb.exe" process and re-run. Sometimes that also doesn't work and what I do is exit the emulator and in android studio do a "Cold Boot" on the emulator.
in Linux i had to delete the content of .android folder which holds the adbkey and ofcourse enable USB Debugging.
I had the same issue despite:
developer options enabled
USB debugging enabled
Solved by simply unplugging and then replugging the USB.

How do I run an Android app on my device?

RTFM is the most natural reply but I have tried that and it did not work.
This is what I have done so far:
1. Install all the necessary USB drivers from the vendor's site. The USB device is properly installed.
2. Add android:debuggable="true" to my manifest
3. Tried adb devices in command prompt and it shows the device as connected
4. Enabled USB debugging via Developer Settings
Still, my phone is not detected in Eclipse
What is going wrong ?
I am using Windows 7 32 bit and trying to connect a Samsung Galaxy S3 (GT-I9300) with the latest firmware :)
I have same issue with my Galaxy S3 (GT-I9300). I solved this issue after "Factory Data Reset". Now when i connect my phone with USB ,Eclipse shows my device perfectly.
Hope its helpful to you...
My friend had similar problem, solution was restarting adb server. Try running:
adb kill-server
adb start-server
from command line.
You could try Run-> Run Configurations-> Target in eclipse and change it to always prompt to pick device. This worked for me in the past.
I think this is due to the driver problem. Just install the drivers properly and try reconnecting it.
this is a driver for S5830 similarly you should install drivers for your device
Download Samsung Kies mini And Than Try To Connect Your Device.
Install the software Moborobo
and then
Try Run-> Run Configurations-> Target in eclipse and change it to always prompt to pick device.

why is my device not shown when I want to deploy the application?

I want to deploy my android application on samsung, my device is not shown in Android device chooser even Samsung kies is installed.I tries all my possibilities but it doesn't work 4 me. Can anybody help me Your help would be appreciated !!
Check If you have enable USB Debugging and Allow Mock Locations ON in your Device
Make sure In settings -> developers options-> enable USB Debugging
And in terminal, go to platform-tools where you installed android, then give command
1. adb kill-server then
2. adb start-server then
3. adb devices: it should display your device.

Android SDK DDMS in Eclipse not recognizing my Android Phone

I just purchased a ZTE Cricket X500 running 2.3.4 for the purpose of testing my Android apps on. When I start the DDMS in the Eclipse Android SDK the device is not listed. The phone is in debug mode, Unknown Sources is enabled, and as far as I can tell the neccesary USB drivers have been installed. Furthermore I have a "Android Dev Phone 1" and the DDMS is able to recognizing that. My computer is running Windows 7. Any theories as to what might be going on?
try these commands:
adb kill-server
adb start-server
for some reason, this works for if the device isn't listed
I think it is because of your drivers, So install drivers for your device in your computer, then try to use it in dubug mode. so for that you have to put your device in debug-gable mode.
Hope this will help you.
Have you looked here and done everything required?
As the link says, if you are on a Windows machine or Linux machine, you need to tell your system to recognize the vendor ID for your phone. Hopefully this helps.

Categories

Resources