I am new to android development and I have been having problems with disconnecting my smartphone from my ubuntu development platform running Eclipse. When I initially plug my phone in with the usb, the system sees it and all is well. However, if I disconnect it from the system and then plug it back in, the system does not recognize it. I have been rebooting the system everytime it does this. Is there a way to "safely" unplug the phone without having to reboot? Should I close Eclipse? Do I need to "unmount" the phone or is there a way to "restart" the android.rules in the rules.d folder?
Any help would be appreciated.
I had the same issue, and simply turning Usb Debugging off, then back on solved the situation -every time-.
After a while, when I set the default connectivity to Charge only, the problem went away.
These are just workarounds based on my experience, but might help you.
Related
So the title pretty much says it all and it's a pretty weird problem. Every time I connect my cyanogenmod via USB to my computer it reboots and wants a firmware update. As far as I can tell, this started happening while I was developing an app. I was using android-studio to run it on my phone when gnome started having problems mounting it.
It shouldn't have been mounting it to begin with because the phone was only connected for usb-debugging. However, because gnome was having problems, it kept trying to mount the phone and I was getting mount notifications every couple of seconds. Because this was so annoying, I disabled auto-mount in the dconf-editor in gnome. The notifications stopped, but at that point, android-studio was also not able to install the app on the phone anymore. Then at some point, the phone "crashed" and restarted, asking me for a firmware update.
I can restart the phone into normal mode by disconnecting the USB cord and holding the power button. Then everything works fine, but still every time I connect the phone to USB, it reboots, wanting a firmware update. I've tried doing adb devices while the phone is in the firmware screen, but adb doesn't find my phone, so I can't even debug like that.
Is there a way to debug or fix this? Or is there a way cancel the firmware update from the firmware screen, so that it won't interpret a usb-connection as a signal to do a firmware update? BTW, the phone is an LG G2, in case that makes a difference.
So I've researched this a little further and found the answer here. This seems to have been a side effect of not having enough space left on the device. It would be cooler if they had said something to that effect, but at least the problem is solved
I'm testing on a Nexus 5, with Android Studio, on a Mac. I used to be able to just plug my phone into my laptop, but lately when I go to run my app, it doesn't detect my phone.
In order to fix this, I have to go into the phone's Developer Options -> Select USB configuration -> toggle between all the modes until one of them works. Before it would just be MTP, but for some reason it seems to be pretty random which one actually does the trick now.
USB debugging is on. I haven't revoked any debugging authorizations... I know this isn't a huge problem, because I can just mess around with it to make it work, but it's super annoying since it does this every time my laptop goes to sleep, close Android studio, or unplug my phone.
I had the same problem, I simply changed the USB cable and then everything was working fine. Hope this helps...
I'm encountering a very strange problem while developing on android. My project is a bit unorthodox, so please bear with me.
I'm developing a game that uses an external controller that's connected to the phone using an OTG cable. All works OK, until the phone's temperature crosses a certain threshold, In which case the operating system shuts down the communication with the OTG and I'm unable to restart it in any way other then disconnecting the OTG cable, and reconnecting it, which is a process I would really like to avoid.
So my question is does anyone know what part of the operating system is the one performing this action of shutting down the USB input when the device gets overheated, and where can I control\reboot it?
Would very much appreciate your help, as I don't even know where to start looking, just please avoid answers like "just unplug and plug back the otg", or "just make sure your device doesn't overheat"
Much obliged
It's probably a hardware issue. If it's actually implemented in the OS itself, then you should probably look in the kernel code. It's not the standard behavior in all android devices, so you should try using another device.
Programming on my Android device in Intellij was working fine for a while, then all of a sudden my Android device started not being recognized-- "USB Not Recognized". I have tried re-installing my drivers, restarting my phone, restarting my computer, and setting up a new project but nothing seems to work. My phone is still recognized about half the time, but I randomly get the USB Not Recognized error.
Same. I get this error very often.
This is how I usually fix it:
Use another cable.
Turn Android debugging off and on again.
Reboot the phone.
Use another USB-port.
Use another USB-port with another cable.
Dunno why. Any pro's who can answer this? :)
I just solved my issue with a really weird fix. It turns out that with a lot of wear, the tongue (which is the little prong that is in the middle of where the USB cord goes on the phone) that the connector goes around can get bent. I figured this out because pushing the front end of my connector down on the tongue made the connection work and pushing the connector up made the connection stop. I read somewhere that if you take a knife or a toothpick and push the tongue up gently, the tongue will bend slightly and return to a position where it can form a proper connection, and oddly enough I tried it and it worked. Weird. Hopefully this helps someone. Just don't push too hard up on the tongue and only do this if you're sure you don't have a driver issue.
This works on ubuntu: sudo adb start-server
Settings -> Storage. Click settings dots ‘USB Computer connection’.
Check the ‘Media Device’ (MTP) check box. If already checked, try checking/unchecking it.
This worked for me
I just tried with the USB and it is working now perfectly.
Use your usb pin to push it up by connecting it to the mobile.
connect the cable with your mobile then slightly move it towards UP.
But be carefull while doing that as it may bent it completely.
I trying to make a android App, that uses an usb device that need the tablet to be in HOST mode, so it can get power from the tablet. For some odd reason, this only happens every other time I restart the tablet and only if I have the power jack inserted.
So The solution I'm trying to make, is to find out after a reboot if the tablet is in USB Host mode and if not, then reboot automatically.
The tablets are rooted, so superadmin access is no problem and my reboot code is working fine, just can't seem to find anything that says how I can detect Host mode, can anyone share this knowledge with me?
Thanks in advance
Peter
releaseInterface() and close() closes the connection and stuff. I think then you should be able to getDeviceList() or soemthing.
I can't be too sure, since I used slickdev library to connect to my serial device, but this answer is based on data of this page:
http://developer.android.com/guide/topics/connectivity/usb/host.html