System V and Posix shared memory wrapper for chrooted environments (i.e.: PRoot) under Android. Supposed to be an extended version of https://github.com/termux/libandroid-shmem
- Android 10 and higher support (not relied upon ashmem): see https://developer.android.com/about/versions/10/behavior-changes-10#shared-memory
- Resouces are linked to a server instance and will be freed at the instance exit.
- Each server instance provides its own namespace.
- System V shared memory calls:
shmget(),shmat(),shmdt(),shmctl():- There are some problems around process termination and
fork()but it serves Xwayland + XFCE + Firefox without any visible problems even in its current state.
(Full support will be added in the next version.)
- There are some problems around process termination and
- Posix shared memory calls:
shm_open(),shm_unlink().
Under PRoot:
make PREFIX=/opt/shm installlibwrapdroid-server— is to be started to create a resource namespace.libwrapdroid-shm-posix.so— Posix shared memory API; to be added toLD_PRELOAD.libwrapdroid-shm-sysv.so— System V shared memory API; to be added toLD_PRELOAD.
LIBWRAPDROID_SOCKET_NAME— communication socket name in the abstract namespace.
(must be set per server instance)LIBWRAPDROID_AUTH_KEY— authentication key (at least 16 hex digits length).
(must be set per server instance)