Building libadblockplus for multiple Android architectures

Various discussions related to Adblock Plus development
Post Reply
volk
Posts: 2
Joined: Tue Aug 08, 2017 3:03 am

Building libadblockplus for multiple Android architectures

Post by volk »

Hello everyone,

I'm new to the forum so I apologize if this is an incorrect place for my query.

I was trying to run libadblockplus-android on my Nexus but it seems the arm64-v8a architecture is not supported in the current build? Is there a plan to make that available?

Meanwhile, I attempted to re-build the ".a" files needed by libadblockplus-android by building libadblockplus from source. However, even when attempting to build for armeabi-v7a (via the "make android_arm" command), I ran into an issue that has already been reported: https://issues.adblockplus.org/ticket/5393. What's the time frame for fixing this issue or for supporting all Android architectures?

I will continue building myself, so my main question is: what is the development environment of choice for building libadblockplus? I can create a VirtualBox with any Linux version. What do people normally use? I'd like to replicate so that I can avoid further compilation errors and etc.

Thanks in advance,
Volk
sergz
Posts: 2
Joined: Fri Mar 04, 2016 2:19 pm

Re: Building libadblockplus for multiple Android architectures

Post by sergz »

Hello Volk,
volk wrote:... it seems the arm64-v8a architecture is not supported in the current build? Is there a plan to make that available?
Yes, there is a plan to add it (https://issues.adblockplus.org/ticket/5266) but firstly it should be added in libadblockplus (https://issues.adblockplus.org/ticket/5267) and then libadblockplus should be updated in libadblockplus-android.

Meanwhile in order to build libadblockplus for arm64 one has to add the condition setting ANDROID_ABI = arm64-v8a when ANDROID_ARCH is equal to arm64 at the beginning of libadblockplus/Makefile and run make with the corresponding parameters (e.g. `ANDROID_NDK_ROOT=... ANDROID_ARCH=arm64 make amdroid_multi`) (on macOS also don't forget about ranlib, see in Makefile). In order to use it in libadblockplus-android one can use changes from https://codereview.adblockplus.org/29503591/, pay attention to the version of libadblockplus used in this review before building it for arm64 (the most recent version of libadblockplus requires much more changes).
volk wrote:What's the time frame for fixing this issue or for supporting all Android architectures?
It seems to not happen very soon because even if do it in libadblockplus, it's not going to be very fast to update it in libadblockplus-android, so far you can have your own special build supporting it.
volk wrote: what is the development environment of choice for building libadblockplus?
Ubuntu 16.04 x64 is definitely enough, in order to get all required packages please refer to the configuration for travis here https://codereview.adblockplus.org/2949 ... travis.yml, though g++-7 is not required nor p7zip-full because the latter is only for prebuilt V8 which is not your case. It also works on macOS Sierra.
volk
Posts: 2
Joined: Tue Aug 08, 2017 3:03 am

Re: Building libadblockplus for multiple Android architectures

Post by volk »

Thanks so much for the fast response Sergz! With the help of your post and your latest commits on libadblockplus and libadblockplus-android (and some getting to understand the structure of libadblockplus more, on my part), I was able to build and run libadblockplus-android on my Nexus. :D
Post Reply