How to Allow Apps To Write Files to USB Mass Storage Devices in Android

Orange Pi Development Boards

When you’ve got an Android media player or mini PC, you may want to connect an external USB drive and allow write access to this drive to some applications. However, this is disabled by default in Android, although file managers appear to allow copy/paste of files to those drives without issue. Some applications may even refuse to install if they can’t find writable SD card or USB mass storage  device. I’ve tried to install the latest version of aTorrent (version 1.7.6) in my Mele A1000, and it could not install at all and returned a message like:

Can’t install on SD card or USB device

The solution below is adapted from a solution on XDA Developers Forums. Some instructions tells you to use an app such as Root Explorer to edit the files in Android (ES File Manager will also do, after allowing “Up to Root” option), but I personally prefer to run Dropbear SSH server, connect via SSH and edit text files with vi. After login to the system via SSH or adb, remount the system partition in read/write mode:


Go to /system/etc/permissions/, make a backup of platform.xml and edit it:


Add a line with <group gid=”media_rw” /> to WRITE_EXTERNALS_STORAGE, so that the section looks like:


Save the file, and reboot your device.

After following these steps, I was able to complete the installation of aTorrent, and download some files via Bit Torrent to my USB drive (in /mnt/usbhost1).

Support CNX Software - Donate via PayPal or become a Patron on Patreon

16
Leave a Reply

avatar
16 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
11 Comment authors
Android setup for USB Wi-Fi adapter | Tech journaling and logginggergoReview of Open Hour Chameleon Android Media PlayerbobbitNidhin Augustine Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
nklh
Guest
nklh

thanks for the tips

Andrea
Guest
Andrea

Thanks!!!

jm
Guest
jm

Thanks, very useful. I make me remember the vi commands like
“i” enter edit mode
“:” quit edit mode
and
“wq” write and quit vi

Fabian
Guest
Fabian

Sadly, this didn’t work for me, the file has changed and I can check it after the reboot, the permissions are set correctly, but I still can’t write on my USB drive. 🙁

trackback

[…] usb i karty sd, bez tego torrent nie był w stanie nic zapisać na dysku usb. Więcej tutaj: How to Allow Apps To Write Files to USB Mass Storage Devices in Android Odpowiedz z cytatem « Poprzedni wątek | Następny wątek […]

arielle
Guest
arielle

hello, where can i find this “/system/etc/permissions.”?i dont know where it’s located.help please. 🙁

jeblister
Guest
jeblister

hello,

thanks a lot for the tips.

umut
Guest
umut

Thank you. I used es file manager but editing media_rw permissions did the trick

Nidhin Augustine
Guest
Nidhin Augustine

thanks bro

bobbit
Guest
bobbit

worked a charm for my android tv box

trackback

[…] A1 SD Bench was used to test the bootable SD card provided with the player, as well as USB 3.0 NTFS performance. I could not measure EXT-4 performance, as A1 SD could not write to the partition, even after changing permissions for external storage. […]

gergo
Guest
gergo

Not optimal, but works for me.
Have searched long time for other solution until I found this simple solution.
Thanks

trackback

[…] Second problem: the NAND memory is too small for video caching so I need to make Android 4.2.2 write to external USB hard-drive. Solution found here: http://www.cnx-software.com/2012/08/26/how-to-allow-apps-to-write-files-to-usb-mass-storage-devices-&#8230; […]