If you only want to start USB Activity Mass Storage , then your question will be an exact duplicate: Android Intent to open Mass Storage Activity and should be closed.
If you really want to change the status of the USB mode as it looks, then this is not a duplicate (as far as I can tell), but the answer is still: you cannot do it.
Maybe there is a better way, but when I want to know what intentions are available to trigger system actions, I look at the Android SDK documentation for Intent and find the “action action”. This shows you a lot of system actions that you can run, for example, “use a battery” Activity and removing an Activity . There is nothing there, showing the USB Activity mode as a public Intent . Excusing the pun, it was probably deliberate.
And there is no documentation I can find about any way to programmatically turn USB mode on or off, and this is also supposedly intentional.
Darshan rivka whittle
source share