{"id":20561505,"url":"https://github.com/avindra/kindle-delete-ads","last_synced_at":"2025-04-14T14:14:35.239Z","repository":{"id":92404376,"uuid":"64082829","full_name":"avindra/kindle-delete-ads","owner":"avindra","description":" :black_square_button:  :name_badge:Save some disk space and your eyeballs.","archived":false,"fork":false,"pushed_at":"2025-01-25T21:45:35.000Z","size":7,"stargazers_count":18,"open_issues_count":2,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-14T14:14:27.162Z","etag":null,"topics":["kindle","linux","paperwhite","udev"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/avindra.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-24T19:49:21.000Z","updated_at":"2025-02-06T00:08:09.000Z","dependencies_parsed_at":"2025-01-25T22:30:26.646Z","dependency_job_id":"8d6a4e48-4b11-40c0-a9f3-2f87a1f2f336","html_url":"https://github.com/avindra/kindle-delete-ads","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avindra%2Fkindle-delete-ads","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avindra%2Fkindle-delete-ads/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avindra%2Fkindle-delete-ads/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avindra%2Fkindle-delete-ads/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avindra","download_url":"https://codeload.github.com/avindra/kindle-delete-ads/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248894943,"owners_count":21179153,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kindle","linux","paperwhite","udev"],"created_at":"2024-11-16T03:59:33.960Z","updated_at":"2025-04-14T14:14:35.223Z","avatar_url":"https://github.com/avindra.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kindle-delete-ads\n\n## Installation\n\nThe recommended installation is to your local `bin` folder (it should be in your `$PATH` by default).\n\n```bash\nwget -P ~/bin https://raw.githubusercontent.com/avindra/kindle-delete-ads/main/kindle-delete-ads.sh\nchmod +x ~/bin/kindle-delete-ads.sh\n```\n\n## Usage\n\n```bash\n$ sudo kindle-delete-ads.sh\n Kindle device file is /dev/sde1\n Mounting Kindle to temporary location: /tmp/tmp.jIUXPogGgC\n Ads detected. Cleaning time.\n Deleting all ads... done\n Installing temp ad blocker... done\n Unmounting kindle... done\n\n# Will do nothing if ad blocker is in place\n\n$ sudo kindle-delete-ads.sh\n Kindle device file is /dev/sde1\n Mounting Kindle to temporary location: /tmp/tmp.q1jNYEkwex\n Temp ad blocker is still intact! Nothing to do.\n Unmounting kindle... done\n```\n\n## How\n\nKindle stores the cover ads on the lock screen in a system folder called `.assets`. This is a script which automates the well known hack.\n\nIt works on Linux, macOS and should work on other \\*nix systems.\n\nUse [`kindle-delete-ads-mac.sh`](./kindle-delete-ads-mac.sh) on macOS\n\n## Why\n\nDeleting 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.\n\n\n# Autorun on plug in\n\nTo make life as easy as possible, have your computer wipe the Kindles ads every time you plug it in.\n\nUnfortunately [since June 2018, udevd service has been restricted to a limited set of syscalls](https://github.com/systemd/systemd/commit/ee8f26180d01e3ddd4e5f20b03b81e5e737657ae#r143372255), 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.\n\nAfterwards, add a file to `/etc/udev/rules.d` called `99-kindle.rules`.\n\n```sh\nACTION==\"add\", ENV{DEVTYPE}==\"partition\", ATTRS{idVendor}==\"1949\", ATTRS{idProduct}==\"0004\", RUN+=\"/home/avindra/bin/kindle-delete-ads.sh '%E{DEVNAME}'\"\n```\n\n*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.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favindra%2Fkindle-delete-ads","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favindra%2Fkindle-delete-ads","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favindra%2Fkindle-delete-ads/lists"}