2 releases

0.1.2 Dec 23, 2021
0.1.1 Mar 25, 2021
0.1.0 Mar 25, 2021

#37 in #public-api

Download history 27/week @ 2023-12-22 58/week @ 2023-12-29 83/week @ 2024-01-05 122/week @ 2024-01-12 149/week @ 2024-01-19 150/week @ 2024-01-26 114/week @ 2024-02-02 126/week @ 2024-02-09 119/week @ 2024-02-16 158/week @ 2024-02-23 112/week @ 2024-03-01 117/week @ 2024-03-08 64/week @ 2024-03-15 120/week @ 2024-03-22 122/week @ 2024-03-29 69/week @ 2024-04-05

389 downloads per month

ISC license

9KB
111 lines

ashmem-rs

Provides a compatibility interface for Android 8.0's public ASharedMemory API.

Some variant of ashmem has existed in Android as a private API for some time. Originally available only via direct ioctl interface, it later became callable (still private) via ashmem_create_region (et al.) in libcutils.

ASharedMemory is the public API to ashmem made available in Android 8.0 (API level 26). Builds targeting Android 10 (API 29) are no longer permitted to access ashmem via the ioctl interface. This makes life for a portable program difficult - you can't reliably use the old or new interface during this transition period.

ashmem-rs provides a simple wrapper around the ASharedMemory API, directly calling the public API implementation via dynamically loaded libandroid where available, and falling back to the direct ioctl interface elsewhere.

References:

Dependencies

~55KB