arrow_back Android App (Vulner)ability
Cross compiling native Linux libraries for Android
Submitted by Hitesh Sondhi (@hiteshsondhi88) on Wednesday, 22 October 2014
Section: Workshops Technical level: Intermediate
Learn how to cross compile and use native linux libraries like FFmpeg/curl for Android.
The new Android Lollipop requires binaries to be PIE executables so I will also cover during the course on how to make binaries compatible with Android Lollipop.
We’ll have hands on session cross compiling native Linux libraries for Android. Will walk through the following steps during the workshop:
- Installing Android NDK
- Installing required Linux packages
- Basic linux compilation and how can we cross compile native Linux projects for Android.
- What is pkg-config, how it works on Linux and how can we use it to make our life easier while cross compiling for Android.
- Demonstration of compiling curl for Android.
- How can we make our binaries compatible with Android Lollipop (i.e Creating PIE binaries).
- Demonstration of compiling FFmpeg for Android.
- How to add more codecs/features to FFmpeg.
- Demonstrating use of these compiled binaries using Java.
In the end will share a shell script that would cover all the steps above and the developer can easily modify it to compile other native Linux libraries.
- Basic linux knowledge.
- A laptop with Ubuntu 12.04, 14.04 or Debian wheezy.
- Basic Android Development Setup.
Optional: (Can do it during the workshop)
- Android NDK (https://developer.android.com/tools/sdk/ndk/index.html).
- FFmpeg source code (http://ffmpeg.org/releases/ffmpeg-2.4.2.tar.bz2)
- curl source code (https://github.com/bagder/curl/archive/curl-7_38_0.tar.gz)
- openssl source code (https://github.com/openssl/openssl/archive/OpenSSL_1_0_1j.tar.gz)
- x264 source code (ftp://ftp.videolan.org/pub/x264/snapshots/last_x264.tar.bz2)
Android lover, nodeJS enthusiast, hacker, coder, loves server side scripting.
I’ve been working on Android framework from last 3 years with Vinsol. I’ve worked on
various interesting apps and I am keen to share my experience with the community.
I occasionally write about my technical experience on Vinsol’s blog http://vinsol.com/blog
Android weekly published few of my blog posts in the weekly issues below:
I’ve been maintaining few open source libraries
Connect me on github https://github.com/hiteshsondhi88