Android Phone stopped notifiying about usb connection with PC - android

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.

Related

Unable to connect ADB to Android Marshmallow (6.0.1)

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.

Android Studio - Device Offline

I am having a small issue with Android Studio. Whenever I put my phone into either of the front two USB ports, it shows my device as "Offline". If I use any of the back USB ports, it recognises the device perfectly fine.
I can charge and browse my phone fine from the front two USB ports. I have tried resetting ADB, and installing/updating Samsung USB drivers. I have tried enabling and disabling USB debugging - but no luck.
It really can't be an issue with the phone or with Android Studio, as in the back USB ports it works fine - surely it has to be an issue with the front USB port?
Anybody have any ideas on how I could solve this? (Other than just using the back ones!)
I have the same problem. I have 4 USB 3.0 ports on the computer and 2 USB 2.0 on the keyboard. Nexus 5 can be plugged and recognized on all of them while Samsung Galaxy S4 is not recognized on one of the keyboard ports and one of the PC ports. In my case it is the device I guess. You can try with another device to see.
You can try this:
Go to tools/enable adb integration and uncheck it.
now check it and run again. Next time, android studio will restart adb and it may find your device.

Connecting Nexus 9 in adb

I have a problem connecting nexus 9 as a ADB device. Whenever I plug in Nexus 9, Windows 7 automatically detects it and installs it as a portable device. I uninstalled it but every time I plug it again it makes it portable device. I tried to update the driver and show the location of the driver I downloaded, it keeps on saying that it has the latest MTP driver.
I have the Nexus 9 in developer mode, PTP mode and also the debugging is on.
What should I do? How do I connect it for development?
Thanks
Did you turn on USB debugging on device (Settings->Developer Options->USB Debugging)? If not, machine won't recognize device as ADB.
I have found the Nexus 9 to be fussy regarding USB cables. I have various cables which work fine with adb and my Nexus 5 but they don't work with my Nexus 9 in MTP or PTP mode.
The only USB cable I can get to work is the one which came with my Nexus 9.
Its actually a Motorola cable with a hologram sticker on it. Although this may not be what ships standard with the device since I bought it without original packing.
Install MoboRobo or moboginie on your pc if you are using widnows.It'll definitely work.

Moto G USB Debugging Issues with Windows 7 64bit

I tried to search if there are any suggestions but couldn't find enough hence this question to help me out.
I've installed Motorola USB Driver and enabled USB Debugging mode as well with MTP enabled.
The device shows as available in Eclipse for less than a minute and after that it gets back to offline mode. I tried to do ADB command like Kill-server and start-server but there is NO effect.
And it comes back to online after so many ON/OFFs and disable/enable the USB debugging/ disconnecting and reconnecting the USB cable or so again and after all these efforts, the device again stays in debug mode for the same <<1 min.
I also tried it with PTP mode as well but no use. Is this a known issue with MotoG or Am I doing something wrong?
My settings are like this under USB Debugging:
Stay awake - On
USB debugging - On
Allow mock locations - On
Appreciate if somebody can guide me which will enable me to work with my MotoG and Android Programming...
As suggested by Michael, I've tried with a different USB cable and it looks stable as of now. Let me observe the behavior for a day before I conclude that it's working.
Unfortunately, While purchasing Moto G, it doesn't come out with a USB Cable as part of the accessories and hence we have to depend on market available cables.
As of now, I'm trying with a USB Cable which has come along with Sony Xperia.
Updating the answer:
After 24 hours of continuous usage - my MotoG runs like a charm in USG Debugging mode. Hence, accepting it as an answer in Windows 7 64 bit.
I'll switch to Linux soon...as per other suggestion.

adb does not see devices connected to Apple Thunderbolt Cinema Display

If I plug my android devices directly into the usb port of my Macbook Pro, "adb devices" lists them properly.
However, if I instead plug them into the USB ports on my display (which is connected to my macbook via thunderbolt), "adb devices" reports no devices attached.
Is there a way to get adb to see devices that are connected to my display?
There should be no difference. I've tested a variety of devices and they are recognized if they are connected to the display's USB ports.
Check your cables.
The problem appears to be intermittent and may be related to if the laptop goes to sleep. Unplugging the display from the macbook, waiting for the macbook to sleep or refresh display, then plugging it back in seems to fix the problem.

Categories

Resources