I wanted to transfer large data from one process/app to another process/app in Android, but some how creating shared memory using Memory File in Java layer doesn't work.
So then tried to create shared Memory in android native, somewhere I read
ashmem_create_region API can be used. But looks like this API is not accessible or open. It is inside libcutils.so.
which is at
android-ndk-r9c/platforms/android-19/arch-arm/usr/lib/rs/libcutils.so
Q1. How to access this library in android native code.
Q2. If it is not possible to access then what is purpose of giving this in ndk tool.
Q3. If somehow I linked libcutils.so and able to create shared Memory in native using libcutils.so Then can I use this fd to map with MemoryFile in Java layer so it will avoid application native copy to write for each data transaction.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…