Coder Social home page Coder Social logo

kindle-delete-ads's Introduction

kindle-delete-ads

Installation

The recommended installation is to your local bin folder (it should be in your $PATH by default).

wget -P ~/bin https://raw.githubusercontent.com/avindra/kindle-delete-ads/main/kindle-delete-ads.sh
chmod +x ~/bin/kindle-delete-ads.sh

Usage

$ sudo kindle-delete-ads.sh
 Kindle device file is /dev/sde1
 Mounting Kindle to temporary location: /tmp/tmp.jIUXPogGgC
 Ads detected. Cleaning time.
 Deleting all ads... done
 Installing temp ad blocker... done
 Unmounting kindle... done

# Will do nothing if ad blocker is in place

$ sudo kindle-delete-ads.sh
 Kindle device file is /dev/sde1
 Mounting Kindle to temporary location: /tmp/tmp.q1jNYEkwex
 Temp ad blocker is still intact! Nothing to do.
 Unmounting kindle... done

How

Kindle stores the cover ads on the lock screen in a system folder called .assets. This is a script which automates the well known hack.

It works on Linux, and should work on other *nix systems.

It will not work on macOS, because it uses blkid. If you want to create a PR for macOS support, feel free.

Why

Deleting the .assets folder will work, but is only a temporary fix. I would recommend using this script to purge your Kindle when necessary, and keeping your Kindle in airplane mode so that it doesn't try to fetch more ads. Usage of airplane mode should also extend your battery life.

Autorun on plug in

To make life as easy as possible, have your computer wipe the Kindles ads every time you plug it in.

Unfortunately since June 2018, udevd service has been restricted to a limited set of syscalls, notably missing @mount. To work around this, add @mount to SystemCallFilter in /usr/lib/systemd/system/systemd-udevd.service, or simply comment out the entire SystemCallFilter line.

Afterwards, add a file to /etc/udev/rules.d called 99-kindle.rules.

ACTION=="add", ENV{DEVTYPE}=="partition", ATTRS{idVendor}=="1949", ATTRS{idProduct}=="0004", RUN+="/home/avindra/bin/kindle-delete-ads.sh '%E{DEVNAME}'"

NOTE: Your idProduct will probably differ, depending on the Kindle model you have. Additionally, be sure to set the script path in RUN to the location where you have installed this script.

kindle-delete-ads's People

Contributors

avindra avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.