2 releases

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

#43 in #public-api

Download history 332/week @ 2024-07-22 608/week @ 2024-07-29 553/week @ 2024-08-05 167/week @ 2024-08-12 290/week @ 2024-08-19 446/week @ 2024-08-26 219/week @ 2024-09-02 555/week @ 2024-09-09 479/week @ 2024-09-16 268/week @ 2024-09-23 238/week @ 2024-09-30 378/week @ 2024-10-07 330/week @ 2024-10-14 281/week @ 2024-10-21 310/week @ 2024-10-28 243/week @ 2024-11-04

1,188 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

~57KB