Installing shared memory APIs emulation for nonrooted Android
Android does not provide neither the System V nor Posix shared memory kernel calls
due to possibility of orphaned memory allocations accumulation.
This wrapper library provides generic Linux shmem calls emulation for dynamically linked software.
<<Details…>>
It’s supposed to use a PRooted environment to install it (see Installing Linux under PRoot first).
Script to build it right on your phone (under PRooted Linux and with bash
installed):
Copy-paste snippet to download, build and install:
( S=install-libwrapdroid.sh ; "$TERMSH" copy -f -fu "https://raw.githubusercontent.com/green-green-avk/AnotherTerm-scripts/master/$S" -tp . && chmod 755 $S && ./$S )
Note: It will not be added to your startup scripts automatically:
Just set your environment variables when required in a way similar to:
export LIBWRAPDROID_SOCKET_NAME=<some-socket-name>
export LIBWRAPDROID_AUTH_KEY=<some-auth-key> # not less than 16 hexidecimal digits
export LD_PRELOAD="/opt/shm/lib/libwrapdroid-shm-sysv.so:/opt/shm/lib/libwrapdroid-shm-posix.so${LD_PRELOAD:+:$LD_PRELOAD}"
and run /opt/shm/bin/libwrapdroid-server
.