Create / search shared libraries from Android source code

I want to return to the Android RTP API presented in version 3.1 (Honeycomb) in earlier versions. I downloaded the source version 4.0 and found that these APIs have both java and native code. To create custom code with the NDK, certain shared libraries are needed.
According to the Android.mk file, these are libnativehelper , libcutils , libutils and libmedia . Although the source of all of them is present in the source code, creating them was difficult. Each required many other shared libraries. For example, libmedia requires these shared libraries: libui , libcutils , libutils , libbinder , libsonivox , libicuuc , libexpat , libcamera_client , libstagefright_foundation , libgui and libdl .

So my question is: is there a way to get the original 4 shared libraries? Does this include the creation of an entire source?

+4
source share
3 answers

Let's say I need to create a piece of my own code that will use standard Android public libraries like libutils , libcutlis , libmedia . I would follow these steps:

  • Install the AOSP repository with the target version.
  • Add the source code to the appropriate directories under ./frameworks/base .
    In your case, it might be easier to create a separate folder and, of course, correctly place Android.mk .
  • You may get compilation errors if the required functions from these standard shared libraries are not present in the previous version.
  • When you create code as part of AOSP , it will create the necessary libraries and automatically link them for you.

PS. For this, you better use a Linux-based build host.

+3
source

using the cygwin terminal, create the native part ie jni folder. To create using cygwin, goto jni folder using the cygdrive command. Then enter ndk-build. After successful completion, shared libraries will be created in the libs folder, i.e. .so.

0
source

I can understand your problem, you can pull libraries from the / system / lib device or emulator. But you need system resolution. But you can do this by installing the application. Otherwise, create the source code on linux platfor. The construction process is very simple, just using team 2 or 3. The first time you need to build a long time. After that, you need a very short time to build, it will be built only in accordance with the time stamp of the modified code. Please see here

0
source

Source: https://habr.com/ru/post/1414873/


All Articles