11

I am unable to write to my sdcard using SSHelper:

u0_a264@MSM8974:/storage/sdcard1 $ df /storage/sdcard1                                                               
Filesystem               Size     Used     Free   Blksize
/storage/sdcard1       119.1G   625.3M   118.4G   32768

u0_a264@MSM8974:/storage/sdcard1 $ mkdir Test

mkdir failed for Test, Permission denied

In the "internal" sdcard there is no problem:

u0_a264@MSM8974:/data/data/com.arachnoid.sshelper/home $ mkdir Test
u0_a264@MSM8974:/data/data/com.arachnoid.sshelper/home $ rmdir Test

Android 5.1.1 App info Permissions shows:

  • modify or delete the content of your sdcard. read the contents of your SD card

What is missing to be able to scp files on my micro SD card using SSHelper ?

3
  • On an android 4.2.2 it works fine on both /data and /storage/sdcard1 Commented Sep 14, 2015 at 15:35
  • It is crazy how difficult is to use permissions on vfat, which wasn't design for that. I don't understand, why Android does not use ext2 instead. Commented May 30, 2016 at 12:59
  • how are you going to take pictures on your digital camera and then put the card in your android device? digital cameras don't support ext2...
    – Michael
    Commented Jun 28, 2020 at 21:34

1 Answer 1

5

Take a look at the various ways to get around this issue as explained in the official docs.

Here're some excerpt:

One solution, not at all easy, is to take the external storage device out of the Android device, write to it elsewhere, and put it back. This is a great pain, and works only if you have access to the device and are a bit of a techie.

There's a more difficult solution that grants permanent write access in place, which I will explain here. But be warned — this is not a normal activity for end users, and without being careful you could brick your device.

The latter solution requires root access and modifying /system/etc/permissions/platform.xml to include <group gid="media_rw" /> permission in the relevant sections as shown below:

<permission name="android.permission.READ_EXTERNAL_STORAGE" >
    <group gid="sdcard_r" />
    <group gid="media_rw" />
</permission>

<permission name="android.permission.WRITE_EXTERNAL_STORAGE" >
    <group gid="sdcard_r" />
    <group gid="sdcard_rw" />
    <group gid="media_rw"/>
</permission>

<permission name="android.permission.ACCESS_ALL_EXTERNAL_STORAGE" >
    <group gid="sdcard_r" />
    <group gid="sdcard_rw" />
    <group gid="sdcard_all" />
    <group gid="media_rw" />
</permission>

Also note that your changes to the above file will most likely be lost when you do an OTA (Over-The-Air) update.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .