09-12-2012, 08:41 AM | #1 |
Senior Altruist
Posts: 82
Karma: 600554
Join Date: Jun 2012
Device: Onyx Boox C67ML, Onyx Boox Note Pro
|
/system/bin/switcher: Battery drain, USB misbehavior
I have seen /system/bin/switcher and its wake lock causing battery drain. Maybe switcher also plays a role in an USB issue where sometimes an USB plug / unplug event is not correctly handled (device thinks USB is still connected / disconnected when it's not, ADB connection cannot be established, freezes / crashes after USB unplug).
I'd like to understand what Switcher actually does and why it misbehaves. Maybe we can collect some observations about it and perhaps even come up with a fix? Here's what I know so far: Switcher is a system service run from /init.rc. When it's killed, init immediately restarts it. Switcher seems to play a role in driving the USB port. I have experimented replacing /system/bin/switcher with a shell script that does nothing but sleep forever. This certainly solved the battery-drain issue, but also rendered the USB port unusable: The Reader couldn't detect host connections or chargers anymore. From looking at the strings embedded within the binary, Switcher also seems to play a role in Adobe DRM activation over USB. An strace reveals that Switcher listens on all input events: It registers all touch events and button presses. No idea why. Scary. My workaround for the ADB and hang-after-USB-disconnect issues: After connecting the USB cable to the host PC, enter the application debugging settings screen, disable USB debugging, then re-enable it. Now ADB works. Before removing the USB cable, enter the settings screen again and disable USB debugging. Optionally, re-enable it after removing the cable (I usually do this because otherwise Titanium Backup sometimes complains and hangs.) |
09-12-2012, 10:56 AM | #2 |
Evangelist
Posts: 425
Karma: 75216
Join Date: Nov 2011
Location: old europe
Device: Kobo Mini, Tolino Epos 2
|
Does disabling + re-enabling usb debugging stop battery drain for you?
I ran into the same issue: https://www.mobileread.com/forums/sho...d.php?t=181673 My workaround for battery drain: disconnect usb cable and soft reset. Maybe it is also a good idea to keep usb debugging disabled if not needed. |
09-17-2012, 11:56 AM | #3 |
Senior Altruist
Posts: 82
Karma: 600554
Join Date: Jun 2012
Device: Onyx Boox C67ML, Onyx Boox Note Pro
|
|
Tags |
battery drain, prs-t1, wake lock |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PRS-650 battery drain | StanByk | Sony Reader | 13 | 06-25-2011 04:27 PM |
Battery Drain | MaudDib | Amazon Kindle | 6 | 02-07-2011 12:28 AM |
DR1000 Battery drain with 1.7.1 | Gogolo | iRex | 11 | 09-14-2010 06:37 AM |
Classic Battery Drain | Pomtroll | Barnes & Noble NOOK | 2 | 07-11-2010 09:58 PM |
Battery drain when off? | Avenger | iRex | 19 | 06-17-2009 11:46 AM |