Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cutils not included in NDK?

I need to use cutils library and headers to implement ashmem on my NDK project but I could not find anything related to cutils in my system. Where is it located or from where can I obtain it?

like image 891
eozgonul Avatar asked Jul 19 '13 10:07

eozgonul


2 Answers

The Android "cutils" library, found in the sources at system/core/libcutils, is not part of the NDK. The code there changes with every release, so it's not something you can rely on.

The best approach for now is to copy the source for the relevant portions of the library into your project.

like image 163
fadden Avatar answered Nov 02 '22 06:11

fadden


If you don't mind about compatibility, you can get the libcutils.so from your connected device or emulator.

adb pull /system/lib/libcutils.so

This is good for development or for private use; for release just copy the source of the things you need into your own project.

like image 25
Tamas Avatar answered Nov 02 '22 07:11

Tamas