Reputation: 1136
I wish to back port the Android RTP APIs introduced in version 3.1(Honeycomb) to earlier versions. I downloaded the source of version 4.0 and found that it these APIs had both java and native code. In order to build the native code with the NDK, certain shared libraries are required.
According the Android.mk file, these are libnativehelper
, libcutils
, libutils
, and libmedia
. Though the source of all of these are present in the source code, building them was difficult. Each required many other shared libraries. For eg, 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 some way of obtaining the original 4 shared libs? Does it involve building the entire source?
Upvotes: 4
Views: 2506
Reputation: 1280
I can understand your problem, you can pull the libraries from /system/lib of device or emulator. But you need a system permission. But you can do it by installing application. Otherwise build your source code on linux platfor. Building process is very easy, just using 2 or 3 command. First time it is needed long time to build. After that you need very short time to build, it will build only according to the timestamp of modified code. Please have a look here
Upvotes: 0
Reputation: 3338
Say I need to build a piece of native code which is going to use standard Android shared libraries such as libutils
, libcutlis
, libmedia
. I would perform following steps:
AOSP
repository with target version../frameworks/base
. Android.mk
of course.AOSP
it will build required libraries and link them for you automatically.P.S. To accomplish that you're better to use a Linux-based build host.
Upvotes: 3
Reputation: 657
using cygwin terminal, build native part i.e. jni folder. To build using cygwin, goto jni folder using cygdrive command. Then type ndk-build. After successful completion, shared libraries i.e. .so files will be created in libs folder.
Upvotes: 0