So Android treats every app like a human user - with a unique UID/GID.Įxternal storage ( /sdcard) - whether physically external or internal - is meant to be shared by all apps i.e. On Android devices - meant for one human user usually - apps need to be isolated and protected so that they can't access each other's data. Traditional *NIX DAC (UIDs/GIDs) was designed to isolate human users, not programs. It should be root:everybody (0:9997) with mode 0770 for directories and 0660 for files. I would like to map uid=neo(1000)->root(0) and guid=neo(1000)->sdcard_r(1028) where neo:neo is the user on the server and root:sdcard_r is the user on the phone.įiles ownership root:sdcard_r (0:1028) on Android won't work for apps. I would like to map uid=neo(1000)->root(0) and guid=neo(1000)->sdcard_r(1028) where neo:neo is the user on the server and root:sdcard_r is the user on the phone. It would be much easier to just modify how Android mount the share. All my other computers have UID and GID 1000 and the same username neo. In Android those are reserved for the system user and group. PS: The UID and GID on the server are 10 respectively. System - V10i-TWN (6th-Nov-17) 7.0 Stock, Rooted & Xposed.This is the relevant line of the /etc/exports file on the NFS server (a raspberry pi 3) /media/neo/BLACKBOX /0(rw,insecure,sync,no_root_squash,no_subtree_check,anonuid=1000,anongid=1000) Where REMOTE_URI is the remote location and LOCAL_DIRECTORY is the local directory. This is how I mount the NFS share su -c "busybox mount -o nosuid,nolock,nodev,rw,nofail,noatime,intr,tcp,actimeo=1800,context=u:object_r:rootfs:s0,user -t nfs $REMOTE_URI $LOCAL_DIRECTORY" I would like to be able to specify the ownership of the mounted filesystem at mount time. The problem is that the share is always mounted as user= system and group= system, making it inaccessible to regular apps. This wouldn't be an issue if I could set the correct ownership for the mounted file system. The NFS share mounts flawlessly but I can only mount as the system user. I have already compiled and installed all the needed kernel modules. I am trying to mount an NFS share on my Android phone.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |