@@ -3,14 +3,26 @@ android-shmem
3
3
4
4
System V shared memory emulation on Android, using ashmem.
5
5
That includes shmget, shmat, shmdt and shmctl functions.
6
- It does not use Binder service, and does not link to Java libraries -
7
- it uses Linux sendmsg/recvmsg API to transfer file handlers.
6
+ It does not use Binder service, and does not link to Java libraries.
7
+ It uses Linux sendmsg/recvmsg API instead to transfer file handlers.
8
8
9
9
Before compiling it, run
10
- git submodule update --init libancillary
11
10
12
- Also, you will need to add to your CFLAGS:
13
- -D_LINUX_IPC_H -Dipc_perm=debian_ipc_perm
11
+ git submodule update --init libancillary
12
+
13
+ To use in Android add the android-shmem folder to your jni/ directory and add
14
+
15
+ LOCAL_SHARED_LIBRARIES += android-shmem
16
+
17
+ to any Android.mk module file using the android-shmem library.
18
+ Add ` include $(call all-subdir-makefiles) ` to the jni/Android.mk
19
+ so that it builds the android-shmem module unless you already specify that
20
+ explicitly in some other way.
21
+
22
+ Also, you will need to add the following to your CFLAGS:
23
+
24
+ -D_LINUX_IPC_H -Dipc_perm=debian_ipc_perm
25
+
14
26
if you link to this library from Android code.
15
27
16
28
The most obvious reasons to use this lib is to speed up Linux GUI applications,
@@ -20,8 +32,9 @@ which can be downloaded here:
20
32
https://sourceforge.net/projects/libsdl-android/files/apk/XServer-XSDL/
21
33
22
34
To use it inside Linux chroot installed on Android, do
23
- env LD_PRELOAD="/path/to/libandroid-shmem-gnueabihf.so" linux_command
24
35
25
- The shared memory segments it creates will be automatically destoryed
36
+ env LD_PRELOAD="/path/to/libandroid-shmem-gnueabihf.so" linux_command
37
+
38
+ The shared memory segments it creates will be automatically destroyed
26
39
when an owner process destroys them or dies,
27
40
however Xserver and it's clients do not depend on that functionality.
0 commit comments