I just installed the Android SDK on my Mac. When I connect my Nexus 4 phone (running 4.3) via USB, it shows up using the monitor tool, but after a minute, it disappears. Once it's gone, adb devices fails to show it as well.
I have turned on developer mode and since it shows up for a minute, I assume all that is working correctly.
The device is not going to sleep and the screen is not dimming. I can't figure out why it's disconnecting.
Any ideas? Is it something on the Mac side that's killing it? Nothing is showing up on the Mac's console logs when it disconnects.
Related
I am trying to create a React-Native app and I need to connect my device to troubleshoot some issues that only occur on the physical device and not the simulator. For some reason I have never been able to connect my Pixel 2 XL to my PC. I am running Windows 10 and I have tried all of the following.
Enabling developer mode and USB Debugging on my device.
Uplugging and replugging my device 20+ times in a row.
Changing the USB port I am using.
Changing the USB connectivity settings in Developer Options > Default USB Configuration. (Options are: File Transfer, USB tethering, MIDI, PTP, No data transfer) I've tried them all.
Restarting my device while it's plugged in
Downloading the Google USB Driver (in Android Studio).
Restarting my PC when the device is plugged in.
Updating my PC, and updating my device.
Checking Device Manager and trying to update the driver. (So the device used to show up with the yellow warning triangle next to it and trying to update the driver never worked. But now, the device doesn't even show up in Device Manager anymore)
Factory Reset my phone.
Downloaded Media Feature Pack for N and KN versions of Windows 10 (Suggested by the google tech support)(I called them)
I feel like I've tried everything previously addressed in every Stack Overflow question on this issue.
Finally solved the issue. The data cable was the problem. If you have tried all the steps above, and nothing is working, buy a new cable. This one works great and seems very durable for my Pixel 2 X: https://www.amazon.com/gp/product/B01N4OKUB8/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1
I had this issue too - my Google Pixel 2 XL is about 9 months old. Was developing an app, so using USB debugging to debug the app as I built it. One day it mysteriously stopped working, though no issues with charging. I tried everything, including using all the different USB ports on my laptop, with no luck.
I eventually gave up and started using the emulator on Android Studio, and since I didn't need data transfer for anything else, I didn't send my phone for repair or anything.
A few weeks later it just started working again, all by itself...
I don't think I did anything to fix it - the moral of the story is, if you don't need it urgently, there's a chance it might just decide to work again!
Please bear with me, I know there are a lot of threads about the same problem but I've tried everything suggested in them to fix it and nothing has worked so far.
I used to use an S7 (Android 7) on my private Win 7 PC and set up a Win 10 workstation a couple of weeks ago that I've been using since. Since then, every time I connected the phone to the PC, it displayed a message on the phone about giving permission to use the MTP connection (Which it only did once on my Win 7 PC) and then debugging was working just fine.
Yesterday the phone didn't show that message and Eclipse also didn't detect it (it didn't show up in the "Devices" tab), I had to restart the PC to get it to work again (restarting ADB,.. didn't work). Today even restarting the PC didn't help.
What I've tried so far:
Restart the S7
Restart the PC
Kill and restart ADB (through Eclipse and command line - said "daemon not running; starting now at tcp:xxxx", then "daemon started successfully" every time)
Disable and re-enable Developer Mode
Disable and re-enable USB-Debugging
Change connection mode to PTP and back to MTP
Set to "always prompt to pick device" instead of "automatic" in Eclipse (Run - Run Configurations - Target) - it's now back on "automatic"
Different USB port
Different USB cable
I installed the Google USB driver through the SDK Manager when I started using Win 10 but Eclipse stopped detecting the S7 after restarting the PC, so I uninstalled it again and have been using the driver Win 10 found since then (and, like I said, everything has been working fine until yesterday)
Install Kies (it told me to connect a phone, even though the S7 was connected)
I found out what the problem is: It's Windows 10 downloading updates in the background!
Why I think it's the updates:
Yesterday, when the PC had stopped detecting the phone, I restarted it, which took longer than usual because it had to install a couple of updates.
Today, after writing the first post and installing Kies, I did another restart and it installed updates again - afterwards it worked fine again.
I just came back from my lunch break (I disconnected the phone before I left) and the "MTP permission" message didn't pop up again and Eclipse also didn't find the S7 again, so I restarted the PC: This time it didn't say "updating" but again it did take longer than a normal restart and it displayed a spinning circle, which it usually does when it's still reconfiguring stuff after installing updates.
So I've got a project with a mobile and a wear part. Actually, it's the default Basic Activity and Basic Wear Activity project, targeting API 21 on the phone and the latest 7.1.1 for watches. My watch (OG LG Urbane on AW2.0) is plugged in with ADB debugging enabled.
The watch shows up in the list of ADB devices, but when I try to run the 'wear' project on it, I get the following error:
device '506KPQJ0130548' not found com.android.ddmlib.AdbCommandRejectedException: device '506KPQJ0130548' not found at com.android.ddmlib.AdbHelper.setDevice(AdbHelper.java:862) at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:451) at com.android.ddmlib.SplitApkInstaller.uploadApk(SplitApkInstaller.java:152) at com.android.ddmlib.SplitApkInstaller.install(SplitApkInstaller.java:78) at com.android.ddmlib.Device.installPackages(Device.java:904) at com.android.tools.idea.run.tasks.SplitApkDeployTask$SplitApkInstaller.installApp(SplitApkDeployTask.java:117) at com.android.tools.idea.run.RetryingInstaller.install(RetryingInstaller.java:86) at com.android.tools.idea.run.tasks.SplitApkDeployTask.perform(SplitApkDeployTask.java:86) at com.android.tools.idea.run.LaunchTaskRunner.run(LaunchTaskRunner.java:120) at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:635) at com.intellij.openapi.progress.impl.Core... (a minute ago)
The watch then disappears from ADB for a few seconds, like something crashes.
Okay, what it turns out is that there is some incompatibility with USB 3.0 in the cable, charger or watch. When I use another port, there's no problem.
That's really annoying though, all my computer's USB 2 ports are on the back so my watch has to sit in a very awkward location where I can't really test it without going under the desk. You wouldn't think that would be an issue with a modern device, but probably LG's fault.
I'm on a MacBook running macOS Sierra and I'm having trouble connecting Android Studio to the phone. The phone is a Samsung Galaxy A3 (2016) running the latest update - Android 6.0.1.
I've tried listing the devices using the command adb devices, but the list is empty.
When I connect the device I can hear a tone and the phone is charging. I do not get a notification when connecting the device, hence trying to tap on the notification and somehow forcing an MTP connection is impossible.
I've already activated the Developer Options and the USB configuration mode is set to MTP (Media Transfer Protocol). When trying to cycle through the available USB modes, if the phone is connected to the computer, it always reverts back to MTP automatically.
Trying to turn off and back on the USB debugging, or the Developer options didn't work. Also restarted both the phone and the computer but nothing changed.
Does anyone have a clue of what is going on?
From my research, the only thing that seems to have worked for other people is to tap the notification that is supposed to appear when I connect the phone to the computer.
Any help would be greatly appreciated. Thanks!
I presume that the cable is broken or just plainly wrong. Changing the cable should help.
I've a Samsung Galaxy S2 device which I had been using for Android development through adb for almost two month. A few days ago it just stoppt detecting the usb connection with my Thinkpad T420. Here are the odd facts:
problem appears only on this single laptop but across operating systems (multi-boot): windows 7, fedora 15, ubuntu 11.04; they all worked fine before
the device in question charges but does not show the "usb connected" notification
there are no udev events at all (checked with shell command 'udevadm monitor')
an other Samsung Galaxy S2 and other usb devices are working fine with the same cable on the same usb-port
the device in question works as expected with other computers (OSX and Ubuntu), eg. shows the 'usb connected' notification and can be mounted or used with adb
Are there other options then to try a full factory reset?
By pure luck I plugged the cable into the device while the Android OS was switching to offline mode (selected from the menu which appears when long-pressing the power button). That did the trick!
After some experiments I can verify using the transitions between offline and online mode to plug the cable into the PC is a workaround -- not a fix to the problem.