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

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).

Share this:

Support CNX Software! Donate via cryptocurrencies or become a Patron on Patreon

ROCK Pi 4C Plus
Subscribe
Notify of
guest
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
16 Comments
oldest
newest
Weller PCB manufacturer