ad-free icon indicating copy to clipboard operation
ad-free copied to clipboard

A modularized audio ad blocker for Android

ad-free

CI Kotlin App codebeat badge

ad-free is a research project attempting to show flaws in the way how audio advertisement is shown on Android. It is a proof-of-concept of a modularized audio ad blocker written in Kotlin with a modern and simplistic user interface.

https://adfree.abertschi.ch

Features

  • Lower phone volume when advertisement is playing
  • Play other audio when advertisement is plaing
  • Support for Spotify, Spotify Lite, Soundcloud, Deezer, Accuradio
  • Mute Google Chromecast (experimental)
  • Plugin based design
  • No root required

Download

Download the latest release from the F-Droid store.

Legality

This app is free and open-source and does not seek a commercial interest. It does not collect user data. It is a proof-of-concept for research purposes to show flaws in the way how audio advertisement is often implemented on Android. It does not alter or "hack" protection measures of music players, and only gathers context information provided by the Android runtime. It simply turns down phone volume when it detects advertisements. Nonetheless, ad-free may be against terms of services of music players. Muting commercials may not be supported and may result in a temporary ban. Use at your own risk.

Troubleshooting

See Troubleshooting section for help to get ad-free up and running.

Changelog

See Changelog for a list of implemented features in new releases.

Implementation notes

Ad detection

Advertisement detectors are modularized into implementations of AdDetectable. An instance of AdDetectable can determine if a track being played is advertisement or not.

Ad Free registers an NotificationListenerService and is therefore able to parse all incoming notifications on Android. Notifications are parsed by implementations of AdDetectable More

Ad blocking

AudioManager, Android's Audio System provides several streams on which audio can be played. Music players play audio on the stream STREAM_MUSIC. In case of ad detection, Ad Free mutes STREAM MUSIC and calls a configured AdPlugin. AdPlugins aim to replace advertisement. They play music on an alternative stream and are therefore not affected by the mute of STREAM MUSIC.

Plugins

Mute Audio

As the title of this plugin suggests, it only mutes advertisements without playing sound.

Play local music

Play music tracks stored on your phone while advertisement is playing. At the moment .mp3, .wav, and .m4a are supported.

Interdimensional Cable (discontinued)

Interdimensional Cable replaces advertisements with interdimensional cable advertisements featured in Adult Swim's Rick and Morty TV series.

This feature is no longer supported. See here.

Credits

  • Many thanks to Janis Bitta design(at)jbitta.de for creating the logo
  • The bird and website icons used in this app are made by Freepik from www.flaticon.com and are licensed by CC 3.0 BY.

Licence

This project is lisenced by the Apache Lisence 2.0

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IT IS A PROOF OF CONCEPT AND INTENDED TO BE A RESEARCH PROJECT. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.