Hi,
I would like to change the owner of a directory on the sdcard
/sdcard/aDirectory
I have a terminal installed on my Android 10 (LineageOS 17)
com.android.terminal
sudo
is not present so I use su
and it works.
su
#Terminal was granted Superuser rights
cd /sdcard
chown 10:10 aDirectory
#I don't get any error message.
stat aDirectory
#Uid (0/root)
So the owner stay root no matter what I’m doing, any ideas ?
Unless the SD card is using a Linux filesystem, you won’t be able to use Linux access permissions.
Most SD cards are preformatted to FAT or exFAT in order to maximise compatibility. If you don’t need to use the card on any non-linux devices you should be able to reformat it and gain the ability to chown/chmod (should go without saying, but back up any data on the card you want to keep before this)
What filesystem do you have on that SD-card? Likely FAT32, which does not support ownership.
But is it an SD card.
I mean, the directory name says so, but…
~ $ realpath /sdcard /storage/emulated/0 ~ $
…it may also not be.