Android Studio Device Offline While Plugged In - android

I have tried EVERYTHING I could find on this but still no solution.
I have a Samsung s6 edge Plus 32 GB. I am trying to deploy an app on Android Studio but it always shows the device as offline. What I have tried
Unplugging and plugging back
Restarting device
Enabling debugging on device
Shuffled and tried different transfer protocols
Installing and Uninstalling Samsung drivers
Checking 'Enable ADB integration' under Tools -- Android
Checking android studio & driver updates
Any help will be greatly appreciated

This happens sometime, even when USB Debugging is on. Try this:
Go to Settings->Developer Options
Search for Revoke USB Debugging Devices
Revoke all existing devices
Disable USB Debugging and enable it
Now connect your phone to system with USB cable
Wait, and a dialog will appear on your phone, for permission to allow for USB Debugging. Click on checkbox and press Allow.
Now the device should appear online in Android Studio.
If problem still persists, then problem is with your phone drivers installed on system.

This happens to me regularly (I use multiple devices) and one of these two things always fixes it:
Make sure your device has "only charge" selected in the dropdown menu entry that appears when you connect your phone. Instead select "transfer files".
Disable and enable usb debugging.

Change your device cable or change your connection USB port on PC. I think this problem is hardware problem. Try other hardware problem possibilities.

Related

Android development device not found

I am getting started with Android development. I have an older Samsung Galaxy S2. But Android Studio doesn't recognize the device. I've tried going to the USB utilities but I can't seem to find them. Is my device too old?
You will have to enable the "USB debugging" option in your phone:you will get this after enable the "developer mode" on your phone(aka "developer options" on some devices).
Check this guide to enable this mode.
In addition - if you want to test your apps on a real device you will need to have a data USB cable(if you can upload stuff from your phone to your computer than you have the correct type of cable )
In some devices after enabling developer mode and connecting a cable you should scroll from the top side of the screen (Like in the photo) and click on USB for file transfer, and select Transfer files.
In addition to enable the Developer mode, if yet doesn't work, take a look at this page https://developer.android.com/studio/run/oem-usb, maybe with this driver you will have your problem solved: http://www.samsung.com/us/support/downloads
You can also check at your adb to make sure your device is connected:
cd cd c:\Users\Linda\AppData\Local\Android\sdk\platform-tools\
run: adb devices
It must shows your device's ID.
Hope it helps.
I was not using the correct cable. I assumed since the phone was charging I was using the correct usb cable to connect to my pc. Found a different cable, I believe the same cable that came with the phone. Now my device is found and working.

Android Studio 2.1.1: "no usb devices or running emulators detected"

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

Unreliable debugging with Android Studio and Samsung S5

I have problems with unreliable debugging with my S5 device on one USB port. I had no similar problem with my Nexus. I can work around the problem by switching USB port, but I really want to know what is going on. One day both USB ports starts to behave this way; and then I will have no clue if I don't fix it now.
Here is what I do to produce the problem.
I Connect phone to USB
This is what the ADB log says at that point
PropertyFetcher: AdbCommandRejectedException getting properties for
device c9c2d39f: device offline PropertyFetcher:
AdbCommandRejectedException getting properties for device c9c2d39f:
device unauthorized. Please check the confirmation dialog on your
device. DeviceMonitor: ExecutionException getting info for device
c9c2d39f
Please not that the phone actually connects -and that I can see the logcat etc on my device after I connect. I have tried to revoke debugging rights from the developer menu, and re-authorized the computer.
Start my app, that I want to debug
Press the "Attach debugger to process" icon (to the right of the regular "debug" icon)
At this point, the "Choose process" dialog appears with no running processes. The phone also disconnects the debugging session, and do not show up when running
Adb devices
At this point a restart of adb has no effect. The only way to get debugging back is to reconnect the phone to the USB port.
As I said, this only happens on one of my USB ports, it works on another. Does anyone have an Idea of what is going on here?
I had a similar issue on an older computer when the computer's motherboard was on its way out. Just as a precaution, you should back-up all of your work and try to determine if this is hardware or software related. From my experience, when USB ports start acting weird, it is usually hardware related.
When mine started to act up, it would connect and acknowledge a connected device, but the computer would throw all sorts of errors regarding reading the device files and even allowing the connection to remain. I tried re-installing software, resets, firmware re-installs, etc. I could not figure out what was going on, so I had my friend check it out (he has around 30+ years experience in computer engineering) and he determined it was my computer's motherboard that was on its way out. He said the only thing that would correct it was to replace the motherboard or get a new computer.
My S5 active showed 'offline' to ADB despite enabling/disabling debugging, updating the driver, and restarting the phone and computer. Finally - I move the USB plug from a HUB, and plugged it in directly from the phone to the PC - and it finally worked.
I had a similar issue too.
Try these steps:
Unplug the usb cable. Reboot your computer and samsung s5
In S5' Developer options, click "Revoke USB debugging authorizations" and press OK
In Android Studio, check "Tools | Android | Enable ADB intergration", if already checked, uncheck it, and then check it again.
Plug your samsung s5, and follow the dialogues instructions to allow this computer ...
Run your app
These steps should fix the problem.

Could not recognize my android device on mac

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.

Why won't Eclipse/adb detect my Samsung Galaxy Tab device on my Mac?

I've connected my Samsung Galaxy Tab device to my Mac. Yes, I've turned on debugging. When I go to run my application to test on the device the device is not listed on the Android Device Chooser menu. Running the ./adb devices shows no results.
NOTE: Posting this question for others to find. When looking for the solution earlier all I was able to locate were answers to broken links to device driver downloads for Windows.
Make sure you uncheck
Settings > Applications > Unknown Sources (Allow installation of non-Market applications)
Turn on USB Debugging inside Settings > Applications > Developers Settings
If you're trying to connect to a Mac, I had this issue with a Samsung Galaxy Tab 10.1 running Android 4.3. To enable developer options, open the Settings app, tap on "About device" under the "General" tab and then tap on the "Build number" repeatedly (it's grayed out but you can tap on it anyway). A small pop-up will appear showing the amount of additional taps you need to do to turn on these options.
Once enabled, just turn on USB Debugging and it'll show up in Eclipse just fine.
I had this problem on my Mac and after 30 minutes tried switching USB ports and it finally started working on the second port.
I fixed it by reboot the device (Samsung Galaxy Tab2 7.0)
Update your driver for samsung. It can be found here: http://developer.samsung.com/android/tools-sdks/Samsung-Andorid-USB-Driver-for-Windows
Connecting your phone after development mode is on, and USB debugging is on.
At connecting to the PC the phone asks to trust this location. Finally.
This fixed my problem while all other tips were incomplete.
It does not answer your question of how to get ADB to see the device - I could not get that working. But what I did to install an APK I needed to test was to put it in Dropbox on my computer, then install it from there on the device.
Connect your device via USB hub instead of directly connecting to one of the usb ports on MAC. It worked that way for me. Please give a try.
There's also a pop-up that comes up at times requesting the currently connected computer to have access to your device(not to be confused with the Linux not supported pop-up; it lies ; ] ). I continued to receive Target:Unknown in Eclipse until I managed to catch it and accept. This is on a Samsung Note 8", which I believe is registered as a Tab 10.1 in my Arch Linux udev rules.
It may also happen that USB debugging is not checked on your device. Please go to developper options in your device and check it is enabled.
By the way, for devices with android Jelly Beam (4.2) and later versions, you will find out that this option is hidden. To activate it, click 7 times on the compilation number, and the option will be activated.
Tried everything, nothing helped. Including
USB debugging enabled
MTP/PTP
ADB restarted
Device/PC restarted
Tried Samsung's USB driver
By tricking/modifying driver installer, installed Google OEM Usb drivers for Galaxy Tab.
All software up-to-date
The only thing that helped is installing Kies3 + setting PTP on device, instantly authorization pops out in device. Everything OK now.
Kies3 download here: http://www.samsung.com/uk/support/usefulsoftware/KIES/
Enable USB Debugging mode solve the problem!
For those who don't know how to enable it (it's very hidden on Android 4.3 onward), see this.
In my case, this solved the problem:
unchecked the Settings->Security->Unknown Sources,
clicked on the upper left corner and changed USB mode from MTP to PTP,
unplugged/plugged the device, and
clicked OK on the USB debugging prompt.
Had this problem last year, never solved it. Again, after googling high and low, I could not find a cure for the USB debugging flakiness. Now for the good news:
1) Root your device. 2) Install adbWireless widget from Play (I am in no way associated with the author).
You are now good to go. After starting adbWireless and following its directions, you can now debug through adb wirelessly to your device, in my case, the original 7" Galaxy Tab.

Categories

Resources