Opened 6 years ago

Last modified 3 years ago

#1414 reviewing change

Document how to build libadblockplus for Android

Reported by: fhd Assignee: asmirnov
Priority: P3 Milestone:
Module: Libadblockplus Keywords:
Cc: sergz, rjeschke Blocked By: #4135, #4173
Blocking: Platform: Unknown
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):



We're currently using libadblockplus-binaries directly in Android. That works fine, but how to build libadblockplus for Android is undocumented, we should mention it in the README.

What to change

Building libadblockplus for Android is pretty straightforward if everything's in place: make android. However, there are some things that need explaining:

  1. There are some requirements: NDK r9b (that version?), and presumably the Android SDK.
  2. On my 64 bit OSX system, I had to change TOOLCHAIN_DIR from darwin-x86 to darwin-x86_64 in third_party/v8/

While we're at it, we should explain why we're using libadblockplus-binaries in the ABP for Android README, point to libadblockplus (and how to build it for Android) and explain how to use self-built binaries. This should stop F-Droid from saying we use blobs.

Change History (11)

comment:1 Changed 6 years ago by fhd

  • Cc trev added

Wladimir, have you found a better way of building libadblockplus on OSX? Changing something in V8 is not pretty.

comment:2 Changed 6 years ago by trev

The toolchain issues are present on Linux as well, V8 simply won't select the right one on x64 systems. So far the best solution was to export ANDROID_TOOLCHAIN environment variable that will point to toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86_64 directory explicitly, this will disable the selection mechanism.

comment:3 Changed 5 years ago by sergz

  • Cc sergz rjeschke added
  • Tester set to Unknown

We also need to specify the exact location one can download NDK from. It seems there is no way to get a link to older versions of NDK on google web site.

comment:4 Changed 5 years ago by rjeschke

Currently this only builds with Android NDK r10d, r10e does no longer contain a gcc-4.6 toolchain.

Also we're currently using clang3.4 for libadblockplus and gcc-4.6 for v8. In Adblock Plus for Android we're not even specifying any toolchain version.

I suggest we unify the toolchain's used and settle on the one that v8 uses for now.

Download links for Android NDK r10d:

comment:5 Changed 4 years ago by fhd

  • Owner set to asmirnov

Assigning Anton to this one, since he was assigned to #4107 which was closed as a duplicate.

comment:6 Changed 4 years ago by asmirnov

  • Blocked By 4135 added

comment:7 Changed 4 years ago by asmirnov

  • Status changed from new to reviewing

comment:8 Changed 4 years ago by asmirnov

  • Review URL(s) modified (diff)

comment:9 Changed 4 years ago by asmirnov

  • Blocked By 4173 added

comment:10 Changed 4 years ago by abpbot

A commit referencing this issue has landed:
Issue 1414 - Document how to build libadblockplus for Android

comment:11 Changed 3 years ago by fhd

  • Cc trev removed
Note: See TracTickets for help on using tickets.