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:
1 |
mount -o remount,rw /system |
Go to /system/etc/permissions/, make a backup of platform.xml and edit it:
1 2 3 |
cd /system/etc/permissions/ busybox cp platform.xml platform-old.xml busybox vi platform.xml |
Add a line with <group gid=”media_rw” /> to WRITE_EXTERNALS_STORAGE, so that the section looks like:
1 2 3 4 |
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" > <group gid="sdcard_rw" /> <group gid="media_rw" /> </permission> |
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).
Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011.
Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress
thanks for the tips
Thanks!!!
Thanks, very useful. I make me remember the vi commands like
“i” enter edit mode
“:” quit edit mode
and
“wq” write and quit vi
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. 🙁
@Fabian
I’ve tried this in Android 4.0. Are you using a different version of Android?
hello, where can i find this “/system/etc/permissions.”?i dont know where it’s located.help please. 🙁
@arielle
You need to connect to your device via adb, ssh or use Android Terminal Emulator (https://play.google.com/store/apps/details?id=jackpal.androidterm&hl=en) to access the command prompt in your device, or use an editor in Android.
hello,
thanks a lot for the tips.
Thank you. I used es file manager but editing media_rw permissions did the trick
thanks bro
worked a charm for my android tv box
Looks like SD Kitkat Fixer app does the same thing -> https://play.google.com/store/apps/details?id=jrummy.sdfix
Not optimal, but works for me.
Have searched long time for other solution until I found this simple solution.
Thanks
WARNING: This may make your phone unbootable or cause a boot-loop!
So, ONLY do this after a full backup and after being prepared to re-flash your phone!
(If it does cause a boot-loop, you may try to boot into TWRP and revert the change (mv platform-old.xml platform.xml), and if you’re lucky, your phone may boot again.)
I can’t root my device (thanks a lot stupid Verizon *********!!!) So… what’s the solution?
This is in Android 10 and works
name=”android.permission.READ_EXTERNAL_STORAGE” />
sion name=”android.permission.WRITE_EXTERNAL_STORAGE” />