[Q] OTG Charge + USB Host Plug and Unplug Timur Alternative - Nexus 7 (2013) Q&A

Hello all,
I have a nexus 7 2013 and I am looking for a kernel that supports otg plus charge. Now, I know elemental x (by flar2) and a few others have this but the ones I have found do not support hot swap, or unplug and replug without rebooting. I am pretty sure Timurs kernel supports this but he wants $36 to buy it and I would rather not spend the money without trying it out first. Specifically, I have a fixed in-car installation and a febon100 UVC video grabber to display a backup camera. When the car shuts off, the febon will be disconnected from the usb side of the nexus, and the only way to reconnect it is to reboot the tablet with power connected. Anyone have any ideas? Thanks for the help.

Ok so I figured part of it out. After the device looses and regains power, these two commands simulate the usb disconnect and reconnect and seems to work (only tried it a couple times)...
Code:
echo "2-0:1.0" > /sys/bus/usb/drivers/hub/unbind
echo "2-0:1.0" > /sys/bus/usb/drivers/hub/bind
However, I have another issue. I am using the elementalx kernel on android 4.4.4 (currently on Carbon rom but have tried stock and other roms as well with same outcome). When the tablet reboots with the otg cable connected, it does not charge when it first starts up. To charge it, I have to physically unplug and replug the cord in the nexus. Any ideas?

bigc9731 said:
Ok so I figured part of it out. After the device looses and regains power, these two commands simulate the usb disconnect and reconnect and seems to work (only tried it a couple times)...
Code:
echo "2-0:1.0" > /sys/bus/usb/drivers/hub/unbind
echo "2-0:1.0" > /sys/bus/usb/drivers/hub/bind
However, I have another issue. I am using the elementalx kernel on android 4.4.4 (currently on Carbon rom but have tried stock and other roms as well with same outcome). When the tablet reboots with the otg cable connected, it does not charge when it first starts up. To charge it, I have to physically unplug and replug the cord in the nexus. Any ideas?
Click to expand...
Click to collapse
you find a fix for this? i will try that command you posted but i need it to run at startup automatically if it works.

quicksilvr2006 said:
you find a fix for this? i will try that command you posted but i need it to run at startup automatically if it works.
Click to expand...
Click to collapse
Just use tasker to run the commands at startup...

Does this set of command still work with lollipop? I just tried a few times and it seems to have made no difference.
Thanks in advance!

Yeah im in the same boat. Soooooo many problems with this ****ty tablet. Knew i should have installed an iPad. They said this is the 'best' of android. It's ****ing terrible. People who are thinking of installing an android into your car? A word of advise. Dont do it.
-guy who has worked on nexus 7 2012, AND 2013 car install for more than a year.

jimmng said:
Yeah im in the same boat. Soooooo many problems with this ****ty tablet. Knew i should have installed an iPad. They said this is the 'best' of android. It's ****ing terrible. People who are thinking of installing an android into your car? A word of advise. Dont do it.
-guy who has worked on nexus 7 2012, AND 2013 car install for more than a year.
Click to expand...
Click to collapse
Do you feel better now?
Sent from my LG-D850 using XDA Free mobile app

It's been almost a year any way to accomplish charging without having to physically unplug the OTG and plug it back in. Im have timurs kernel but I want to use elemental so I can use marshmallow. Timur accomplished it somehow. Someone has to know how.

Qi Wireless Charging
samt3 said:
It's been almost a year any way to accomplish charging without having to physically unplug the OTG and plug it back in.
Click to expand...
Click to collapse
It is actually trivially easy to accomplish - on any kernel - it is called Qi Wireless Charging.

Android 6.0.1 kernel Quanta-V7-Flo with 'USB Host Mode Charging'
samt3 said:
It's been almost a year any way to accomplish charging without having to physically unplug the OTG and plug it back in. Im have timurs kernel but I want to use elemental so I can use marshmallow. Timur accomplished it somehow. Someone has to know how.
Click to expand...
Click to collapse
Test results for Android 6.0.1 Stock + Kernel 'Quanta-V7-Flo' with active 'USB Host Mode Charging' and inactive 'fast charging' (N7 is only is use when its connected to the USB Power):
Ampere values checked with one of the cheap 'USB Charger Doctor Voltage Current Meter Mobile Battery Tester':
0.45 A for N7 only
0.61 A for N7 + USB Ethernet adapter
I don't use the N7 in a car setup but this should be important for such setups:
-If the USB Y cable is connected before powering on the N7, the USB device was usable in Android after startup without need for reconnecting the USB cable
-If the USB was unplugged and reconnected the device, it was usable in Android
-Important: If the N7 goes to sleep, it can't recover the USB charging and USB devices after waking. You should set the display timeout to always on, which is right for a car setup or am I'm wrong?
I'm happy! :good:

I tried quanta. It does work except for on initial boot. Have to unplug and plug it back in to charge. Then it works fine turning the key on and off for power. However it doesn't mount the OTG devices again without unplugging it and plugging it back in.
Edit: I also have another problem was at work and didn't have time to add it. But my Nexus thinks it's still charging after disconnecting it from power supply through the OTG cable. When I turn the key off it quits charging for about 1 second then switch's back to saying it's charging again and continues to say it's charging even after cycling the key on and off. Only way to fix it is to disconnect the OTG straight from the tablet and plug it back in or boot it into recovery then back to system. Has done this thru multiple roms and kernels. Only kernel it doesn't do it on is Quanta. The thing is it didn't use to do it at all no matter what rom or kernel I was using. I even went as far as to change the charging port board cause I had another one in a old junk Nexus I have and still didn't fix it.

samt3 said:
I tried quanta. It does work except for on initial boot. Have to unplug and plug it back in to charge. Then it works fine turning the key on and off for power. However it doesn't mount the OTG devices again without unplugging it and plugging it back in.
Edit: I also have another problem was at work and didn't have time to add it. But my Nexus thinks it's still charging after disconnecting it from power supply through the OTG cable. When I turn the key off it quits charging for about 1 second then switch's back to saying it's charging again and continues to say it's charging even after cycling the key on and off. Only way to fix it is to disconnect the OTG straight from the tablet and plug it back in or boot it into recovery then back to system. Has done this thru multiple roms and kernels. Only kernel it doesn't do it on is Quanta. The thing is it didn't use to do it at all no matter what rom or kernel I was using. I even went as far as to change the charging port board cause I had another one in a old junk Nexus I have and still didn't fix it.
Click to expand...
Click to collapse
Did you try the glitch kernel?

0xcafebabe said:
Did you try the glitch kernel?
Click to expand...
Click to collapse
I've used it before but not on my current setup.

Assuming one of these kernels provides OTG + Fast Charging, what are the options for the Power-Down + Deep Sleep, then Power-Up + Wake?

Related

[SOLVED]Computer see's device for a few seconds, then disconnects.

Interesting problem I have had on and off. When I plug my phone into my desktop, it will connect normally, then a few seconds later it acts like I unplugged it. It's not the rom as it does it in recovery as well(both with usb-ms activated and without). I have HTC Sync installed. Rebooting either the computer and/or phone doesn't fix it, it just goes away after awhile and starts working again. I've experienced the problem FAR less when connecting it to my laptop, it will typically work there and not on my desktop when the problem crops up.
it's like this problem but it's not constantly http://forum.xda-developers.com/showthread.php?t=711616
-Edit- the device also doesn't show it's charging even when it 'disconnects'
I have the same problem. just keeps discontenting over and over it sees it for a few seconds then disconnects reconnects then off again.
sasigns said:
I have the same problem. just keeps discontenting over and over it sees it for a few seconds then disconnects reconnects then off again.
Click to expand...
Click to collapse
Mine doesn't reconnect, it 'disconnects' and stays that way(as if i unplugged it) until i actually do unplug it and reconnect it.
-edit- 1,000th post, YAY
I was having the same problem on my MacBook until I realized the MacBook must be plugged into power. Once plugged in everything was good. I wonder if the Evo demands more power through USB then other devices.
Yeah, sounds like a power issue to me. If you're using a USB port on a hub or on a keyboard, try one on the PC itself. Also, it could be a slow USB port or a bad cable if you are continuing to have issues. Try another computer if you can, and if you still have the problem try a different cable. Still have the issue, reflash (if you're running a custom rom) or contact Sprint for service.
Same issue here, but on a desktop PC (Dell Studio XPS) using the front-mounted USB port (not a hub). Keeps disconnecting/reconnecting, but often takes 10-15 minutes between cycles. Using stock ROM (for now, at least). Will try other ports & another PC and will report back.
Already tried different ports, only motherboard ports
Rom doesn't matter as the problem exists in both android and recovery
Don't have a different cable, however the same cable will work fine on my laptop then not work on my desktop
mrono said:
Already tried different ports, only motherboard ports
Rom doesn't matter as the problem exists in both android and recovery
Don't have a different cable, however the same cable will work fine on my laptop then not work on my desktop
Click to expand...
Click to collapse
If it works on a laptop, but not the desktop, then it appears to be an issue with your desktop. Any other USB devices doing it?
I would check your motherboards manufacturer and make sure you've got the right USB drivers, a bios update might be in order as well.
But before all that, I've got an idea. First and foremost, try this:
Go to device manage (either from control panel, right-clicking my computer and going to properties, or searching for devmgmt.msc in the start menu search.)
Navigate down to Universal Serial Bus controllers, double click on USB Root Hub (you probably have 1 for every USB Port, so you may have to do them all.)
Click on the Power Management tab, and uncheck the "Allow the computer to turn off this device to save power." check box and see if that solves your problem.
i had this issue on my hero. it was corrected for me after i did a wipe of data and cache. i restored from titanium afterwards. YMMV
good luck
one thing you might try is disabling sense and using the android launcher. then reset the phone. once it boots up try and connect it to your pc. This was how I got mine to connect. when I was using the sense launcher it somehow blocked that options screen and the default I selected wouldn't stick. once I got the connection to my pc working this way I was able to re-enable sense and it's worked perfectly ever since.
I do not take credit for this fix, someone else on here told me to try this n it worked perfectly.
tarheelsmj12001 said:
one thing you might try is disabling sense and using the android launcher. then reset the phone. once it boots up try and connect it to your pc. This was how I got mine to connect. when I was using the sense launcher it somehow blocked that options screen and the default I selected wouldn't stick. once I got the connection to my pc working this way I was able to re-enable sense and it's worked perfectly ever since.
I do not take credit for this fix, someone else on here told me to try this n it worked perfectly.
Click to expand...
Click to collapse
it was nothing with the rom, since it was doing the same thing in recovery.
it turned out to be the short little usb extender cable that was going a foot and ahalf from behind my pc to the side so i could plug it in easier.
Sirchuk said:
...Navigate down to Universal Serial Bus controllers, double click on USB Root Hub (you probably have 1 for every USB Port, so you may have to do them all.)
Click on the Power Management tab, and uncheck the "Allow the computer to turn off this device to save power." check box and see if that solves your problem.
Click to expand...
Click to collapse
I can confirm this works on my HTC Desire - had been racking up my brains for the past couple of days now with no solution! Thanks a lot. This is on PC with Win7 Ultimate.

[Q] Telus Samsung Galaxy SII X

Hello everyone,
i have the Telus Samsung Galaxy SII X
i have rooted the phone
added the custom ROM (team kang)
changed the kernel.
i am going to bring the phone for repair, issues when charging the phone.
I would like to know how can i restore my phone the way it was ?
thank you
Pretty sure thetes a tut for this.
Anyways, flash stock rom
Odin recovery
Sent from my SGH-T989 using xda premium
If you don't mind me asking, what issue are you having?
the phone won't charge when i plug the usb cable
i have give it a lot of try until it finally detects and starts charging.
from a wall or usb to computer
yerem.k said:
the phone won't charge when i plug the usb cable
i have give it a lot of try until it finally detects and starts charging.
from a wall or usb to computer
Click to expand...
Click to collapse
Youve tried two different power sources, what about a different USB cable? Had that issue before where the cable was bad and only noticed when other USB devices werent connecting through it..or intermittently.
yes i tried different usb cables, different power outlets and different computer's.
also i noticed that when its actually charging on the PC, i don't get the small usb icon on the notification to copy files from pc .. i need to power off/on the phone.
ever happened to anyone ?
yerem.k said:
yes i tried different usb cables, different power outlets and different computer's.
also i noticed that when its actually charging on the PC, i don't get the small usb icon on the notification to copy files from pc .. i need to power off/on the phone.
ever happened to anyone ?
Click to expand...
Click to collapse
Ive never read that here, i have a Telus one also and it shows up right away. The odd time ive noticed that ill hear the usb unplug/replug sound from my pc and the phone will show the USB Connected on the status bar as though it somehow reset its connection. But never had an issue where it stays disconnected.
I also only got that issue with certain roms, i dont remember which though. I ran painlessly on Juggernaut for a while and right now im on Touchless and its also perfect.
I am running on Juggernaut, i recently did a clean install (wipe data .. everything) i was having few issues, i though maybe that would fix the issue.
the phone at times thinks that i have plugged the charger in to charge
and u see the battery icon changing. weird...
Have you tried charging with the phone powered down?

Encrypting the tablet with AC unplugged?

I need to encrypt my Kindle Fire running on AOKP otter in order to access corporate e-mail, and in order to do so, it requires the charger to be plugged in. The problem is that this particular ROM cannot correctly report that the power cable is plugged in, so I cannot proceed as it gives me a message "plug in charger and try again". Other than that, it is not really a problem for me. My question would be how to "trick" (albeit temporarily) the ROM into thinking that the charger is plugged in (even though in reality it IS plugged in) just to be able to proceed with encryption? Any system files that store the state of AC adapter that I can override?
Your help would be greatly appreciated.
E107946 said:
I need to encrypt my Kindle Fire running on AOKP otter in order to access corporate e-mail, and in order to do so, it requires the charger to be plugged in. The problem is that this particular ROM cannot correctly report that the power cable is plugged in, so I cannot proceed as it gives me a message "plug in charger and try again". Other than that, it is not really a problem for me. My question would be how to "trick" (albeit temporarily) the ROM into thinking that the charger is plugged in (even though in reality it IS plugged in) just to be able to proceed with encryption? Any system files that store the state of AC adapter that I can override?
Your help would be greatly appreciated.
Click to expand...
Click to collapse
I came here with the same question. I'm not familiar with how the layers of work are split between the various people who contribute to ROMs, so can anyone at least advise where to bring this up as a feature request? These days I'm running the builds from twa_priv's thread, but maybe this work would need to happen at a more central place in the codebase.
Thanks for any pointers
That's kernel level development and it needs to be done from the source. Hashcode's 3.0 kernel thread has info on how to get started.
http://forum.xda-developers.com/showthread.php?p=24665559
You might want to try using a different charger. I discovered that if I use a 1 amp charger the led light on the power button works perfectly. That might be enough to get your process to work. I am using a generic 1 amp USB wall plug with a standard USB cable without any problems. The 3.0 kernel doesn't seem to like that stock 1.8 amp charger.
Sent from my Amazon Kindle Fire using xda premium
Thanks for the suggestion but unfortunately a 1A wall charger doesn't seem to change this.
E107946 said:
I need to encrypt my Kindle Fire running on AOKP otter in order to access corporate e-mail, and in order to do so, it requires the charger to be plugged in. The problem is that this particular ROM cannot correctly report that the power cable is plugged in, so I cannot proceed as it gives me a message "plug in charger and try again". Other than that, it is not really a problem for me. My question would be how to "trick" (albeit temporarily) the ROM into thinking that the charger is plugged in (even though in reality it IS plugged in) just to be able to proceed with encryption? Any system files that store the state of AC adapter that I can override?
Your help would be greatly appreciated.
Click to expand...
Click to collapse
I believe the command you're looking for can be executed from a root terminal:
'vold cryptfs enablecrypto inplace'
I couldn't get it to run on the CM10 kindle builds, though since the encryption menu was completely missing a few weeks ago I'm not sure it works on CM10 on any build yet. I've only ever used encryption on CM9 and haven't tried that on a Kindle. There seems to be some (files?) missing pieces (you'll see in logcat : search "vold").
Possibly I may be missing a step, but I believe that's the background task that gets launched from the UI after checking for AC power.
It should be noted, if you weren't aware, that messing with encryption tasks can potentially trash your data (for example, if interrupted).
Well, the latest builds do have the AC fix in, which means that the Encrypt UI is now available. It went as far as a black screen with a large line drawing of the green andoid mascot, and sat there for hours. I assumed it was doing its thing but when it was still there in the morning, I realized I was able to edge-swipe back to Home and it hadn't actually done anything at all.
So yes, it does appear that some pieces are still missing here.

how do I get otg 100% of the time

on CM 12.1 and I can get SOME flashdrive to work otg, SOME of the time.
I tried stickmount and ex kernel, but it's the same (worst on ex kernel, can't even detect otg)
I tried using a powered usb hub to see if that was the issue (for some reason, the microusb port isn't giving power to the drive. is this normal?)
after several more testing, seems like there are 2 issues that is causing otg not to work all the time.
1. Power. Doesn't seem to be able to provide enough power for self powered usb devices (ie. flash drive, dac, etc..) or enough to maintain connection.
2. Microusb port. might be one of the reason why devices aren't getting enough power and/or not being detected.
I really think it's a power issue cause everything seems to run fine if I connect it to an external powered usb hub. I tried the same setup (flash drive and dac to an usb hub, no power) with my 1st gen Nexus 7 and it had zero issues.
so is there a way to raise or maintain 5v OUTPUT out the microusb port so it doesn't randomly disconnect otg devices?
I've been able to power A pretty heavy duty usb audio interface. I think I may have had that issue A couple times, but it was never A big deal for me.
I don't remember having the problem after enabling "OTG+Charging" in Elemental X kernels' aroma installer. Did you use that?
Also possibly (not likely) A Cyanogenmod issue. I haven't used that on the nexus 7 in A while though.
Wierd that flash drives don't stay on. Does it do that frequently? I've looked into "overvolting" the usb port A long time ago, it seemed to need A kernel change

S20 won't charge using original cable and charger after using USB Tethering

Just as title says, 10 days ago i used my s20 exynos (g980f) on some windows 7 pc for wifi access, and after that i couldnt charge it. Charger works with another phone, cable works when connected to laptop, but together nothing.
I found that entering safe mode helps, did reboot in safe mode, rebooted normally (had to reapply theme, wallpapers, set default apps), and charger worked again.
The same thing happened yesterday, using the same pc. So, i'm just asking if anyone else experienced the same? Maybe someone could try usb tethering and charging afterwards?
Btw, it doesnt matter if i enable or disable fast or super fast charging... Also i think i was using ATCT (or ATD3) back then, now i'm on ATD5.
Try setting default usb setting to charging only and see if that yields any results

Categories

Resources