Re: çå: [PATCH] USB: storage: fix Huawei modeswitching regression

From: BjÃrn Mork
Date: Thu Mar 07 2013 - 07:20:29 EST


"Fangxiaozhi (Franko)" <fangxiaozhi@xxxxxxxxxx> writes:

> As far as I know, except switching in kernel, there isn't any
> mode switch solution on Android now. Do you have any good ideas
> for the mode switch on Android system?

Josh, the usb_modeswitch maintainer, is also maintaining this Android app:
http://www.draisberghof.de/android/pppwidget.html

That's one possible solution. According to him, there is also

"a number of Chinese Android tablets (from the A10 family) that are
supporting a number of 3G modem sticks by providing usb_modeswitch
on-board, which is obviously working well."

That's another possible solution.

Userspace mode switching on Android should not be any more difficult
than userspace mode switching on any other Linux distro. You unbind the
usb-storage driver and submit your bulk message. Looking at a sample
Android device (Galaxy S3 running the default image):

shell@android:/ $ cat /proc/version
Linux version 3.0.31-836582 (se.infra@SEP-97) (gcc version 4.4.3 (GCC) ) #1 SMP PREEMPT Tue Jan 15 14:17:21 KST 2013
shell@android:/ $ ls -l /dev/bus/usb/001/
crw-rw---- root usb 189, 0 2013-02-19 19:51 001
crw-rw---- root usb 189, 2 2013-03-07 09:01 003

it looks like your app will need to be a member of the "usb" group to do
this. I assume there is a way for an app to request such permissions in
Android. Josh has obviously managed to get it.


BjÃrn
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/