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 ?


Could be.
On my phone (Poco X3 Pro - stock Android 11, MIUI 12) the
/sdcardis a symlink pointing to/storage/self/primarywhich itself is a symlink pointing to/storage/emulated/0, which is/data/media, the user-accessible portion of internal storage.Though from what I can find it anyway is just emulated FAT filesystem which is actually ext4 under that.
Something about backwards compatibility as the directory used to actually be used for SD cards in the past.