Userland: Is writing to external SD enabled ?

Created on 29 Jun 2018  路  7Comments  路  Source: CypherpunkArmory/UserLAnd

For most Android devices there is an external SD card (/storage/XXXX-XXXX where X is a hexstring) which is normally not write enabled for apps.
Can UserLand enable WRITE_EXTERNAL, which would be useful for write accessing media, such as videos, from Userland ?

duplicate

Most helpful comment

Apparently, we can only write to folders defined for use by the UserLAnd package. Here's what I did in v0.3.1 to at least get some writeable space on the external microSD card:

USB debugging:

host$ adb shell
$ cd /storage/xxxx-xxxx/Android/data
$ mkdir -p tech.ula/files # /files is optional but cleaner

In the UserLAnd session:

user@localhost$ sudo ln -s /host-rootfs/storage/xxxx-xxxx/Android/data/tech.ula/files /microsd
user@localhost$ cd /microsd
user@localhost$ echo Hello world > hello.txt # add .txt so it can be opened in an Android file manager
user@localhost$ ls
hello.txt
user@localhost$ cat hello.txt
Hello world

Note: Unfortunately, tech.ula doesn't show up in Android File Tranfer for the Mac, but it is there. YMMV

All 7 comments

Did you try to access through host-rootfs (is a bind to Android rootfs) folder. For example:
If the path of external storage is /storage/sdcard02, then /host-rootfs/storage/sdcard02 is the place.

You can type env | grep STORAGE in an Android terminal emulator to check exactly the correct path of both internal and external storage

This is a duplicate of #46

I can confirm that the fix for this will make it into the next release. Specifically, you will be able to see your sdcard from inside your rootfs at the bound path /sdcard

I don't think this works in 0.2.3 yet, re #46 .

I can access shared internal storage via /sdcard but for external storage I still have to go via /host-rootfs/storage/sdcardname; and there I have only read access. Is there a way to give UserLAnd write access?

I too can read External Storage but gives Permission denied error when I try to Write to external card.
Userland app version : 0.2.5
Filesystem : Ubuntu
Android Version : 7.0.0
Device : Moto G5 (Plus)
Device is not rooted.

Apparently, we can only write to folders defined for use by the UserLAnd package. Here's what I did in v0.3.1 to at least get some writeable space on the external microSD card:

USB debugging:

host$ adb shell
$ cd /storage/xxxx-xxxx/Android/data
$ mkdir -p tech.ula/files # /files is optional but cleaner

In the UserLAnd session:

user@localhost$ sudo ln -s /host-rootfs/storage/xxxx-xxxx/Android/data/tech.ula/files /microsd
user@localhost$ cd /microsd
user@localhost$ echo Hello world > hello.txt # add .txt so it can be opened in an Android file manager
user@localhost$ ls
hello.txt
user@localhost$ cat hello.txt
Hello world

Note: Unfortunately, tech.ula doesn't show up in Android File Tranfer for the Mac, but it is there. YMMV

Hello all,

I have two Android phones
One is running Android 6.0 and can access the SDCard from within UserLand Debian in root mode with ln -s /host-rootfs/sdcard /

The second one is running Android 8.1.0 and CANNOT access the SDCard from within UserLand Debian in root mode. The same command ln -s /host-rootfs/sdcard / return premission denied

I also tried under root permission (sudo su) to change the repertory rights with chmod -R 777 /host-rootfs and I got :
chmod : changing permissions of '/host-rootfs': Read-only file system
chmod : cannot read directory '/host-rootfs': Permission denied

While the same command work on Android 6.0

Please help as my Android phone 6.0 has issues and I would like to use my new phone.
Best regards,
Jean

@corbinlc NOT A DUPLICATE!

/sdcard is internal storage on android and is not about external usb or external sdcard. Se https://www.instructables.com/id/How-to-bypass-Android-44-KitKat-external-SD-write-/

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  7Comments

laem picture laem  路  5Comments

foodmaher picture foodmaher  路  8Comments

saurabh6377 picture saurabh6377  路  7Comments

lewisdonofrio picture lewisdonofrio  路  6Comments