android - How to write files to a usb memory? (root) -


tablet usb plug in memory stick , access

try {     runtime.getruntime().exec("su"); } catch (ioexception e) {     e.printstacktrace(); }  file testfile = new file("mnt/usbhost0"); boolean b1 = testfile.canread();   //b1 = true boolean b2 = testfile.canwrite();  //b2 = false 

why b2 false?

my device rooted

ps. sorry english bad..

you need set app's persmissions in manifest write storage

<uses-permission android:name="android.permission.write_external_storage" /> 

Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -