Android intention to open 'Mass storage activities'

I need to open USB Mass Storage Activity from my application.

Is there an Intent for this?

something like

startActivity(new Intent(Settings.ACTION_APPLICATION_DEVELOPMENT_SETTINGS))

+6
android android-intent usb-mass-storage
source share
1 answer

You can try using the following:

su -c setprop sys.usb.config <command>

A complete list can be found on this command:
cat init.usb.rc

Function to run the command from the application:

  public void RunAsRoot(String[] cmds){ Process p = Runtime.getRuntime().exec("su"); DataOutputStream os = new DataOutputStream(p.getOutputStream()); for (String tmpCmd : cmds) { os.writeBytes(tmpCmd+"\n"); } os.writeBytes("exit\n"); os.flush(); } 
0
source share

All Articles