GithubHelp home page GithubHelp logo

hassoon1986 / android-shmem Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pelya/android-shmem

1.0 2.0 0.0 58 KB

System V shared memory emulation on Android, using ashmem. That includes shmget, shmat, shmdt and shmctl functions.

License: BSD 3-Clause "New" or "Revised" License

Makefile 1.82% C 83.66% Shell 14.52%

android-shmem's Introduction

android-shmem

System V shared memory emulation on Android, using ashmem. That includes shmget, shmat, shmdt and shmctl functions. It does not use Binder service, and does not link to Java libraries. It uses Linux sendmsg/recvmsg API instead to transfer file handlers.

Before compiling it, run

git submodule update --init libancillary

To use in Android add the android-shmem folder to your jni/ directory and add

LOCAL_SHARED_LIBRARIES += android-shmem

to any Android.mk module file using the android-shmem library. Add include $(call all-subdir-makefiles) to the jni/Android.mk so that it builds the android-shmem module unless you already specify that explicitly in some other way.

Also, you will need to add the following to your CFLAGS:

-D_LINUX_IPC_H -Dipc_perm=debian_ipc_perm

if you link to this library from Android code.

The most obvious reasons to use this lib is to speed up Linux GUI applications, connected to XServer on Android - it will work for both Xtightvnc Xserver inside Linux chroot, and for standalone Xserver, which can be downloaded here: https://sourceforge.net/projects/libsdl-android/files/apk/XServer-XSDL/

To use it inside Linux chroot installed on Android, do

env LD_PRELOAD="/path/to/libandroid-shmem-gnueabihf.so" linux_command

The shared memory segments it creates will be automatically destroyed when an owner process destroys them or dies, however Xserver and it's clients do not depend on that functionality.

android-shmem's People

Contributors

pelya avatar uberspot avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.