From 255820370ab641da8ddf6e1564d96430193c8a0f Mon Sep 17 00:00:00 2001 From: Philippe De Swert Date: Mon, 2 Jun 2014 15:33:29 +0300 Subject: [PATCH] [usb-moded] Document broken android kernel behaviour Documented what happens when the -a switch is used to make sure usb_moded works when the kernel cable detection/charging is "broken" by non-active android gadgets. Signed-off-by: Philippe De Swert --- docs/usb_moded-doc.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/usb_moded-doc.txt b/docs/usb_moded-doc.txt index c9169e0..0cc5642 100644 --- a/docs/usb_moded-doc.txt +++ b/docs/usb_moded-doc.txt @@ -315,6 +315,21 @@ softconnect = 1 softconnec_disconnect = 0 idProduct = 0002 + +Android portability +--------------------- + +On some android kernels cable detection/charging etc is broken unless the gadget is active. +Often this is weirdly done on purpose by checking if the gadget is active before doing anything. +This is not recommend and is actually wrong. Not to mention all the potential issues this could cause. +(extra power drain, suspend issues, accidental exposure of data over USB, ...) + +For this purpose there is the -a switch that activates by default the charging mode, and will set it +on disconnect. So technically unless you connect and set some mode, the gadget will always be active +in the fake mass-storage charging mode. + +WARNING: This could potentially expose data over mass-storage (TODO, make sure this does not happen) + rescue mode -----------