Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Fire Tablet Cleanup

A small, conservative ADB helper for Amazon Fire tablets that run out of internal storage even when a large SD card is configured as adopted/internal storage.

Why this exists

Some Fire tablets have very little internal flash available to /data. Fire OS can accumulate cache and restore preinstalled Amazon apps, eventually leaving too little internal working space to install games—even when an adopted SD card has tens or hundreds of gigabytes free.

This script automates the boring recovery steps:

  • verifies that exactly one authorized ADB device is connected;
  • prints device model, Android base, and Fire OS build info;
  • shows /data usage before and after cleanup (df -h /data);
  • reverts /data/app updates of listed preinstalled Amazon system apps;
  • then removes those optional Amazon media/content apps for the primary user;
  • optionally attempts the same user cleanup for additional Android users;
  • gracefully skips restricted child profiles;
  • trims application caches;
  • reports adopted/expanded storage mounts;
  • optionally reboots the tablet.

It does not root the tablet or modify the system partition.

Safety philosophy

The default package list is intentionally conservative. Add future unwanted Amazon packages in fire-tablet-cleanup.sh (DEFAULT_PACKAGES plus PACKAGE_LABELS).

Package App Cleanup
com.amazon.mp3 Amazon Music revert system updates, then uninstall for user
com.amazon.avod Prime Video revert system updates, then uninstall for user
com.amazon.photos Amazon Photos revert system updates, then uninstall for user
com.amazon.imdb.tv.mobile.app Freevee / IMDb TV revert system updates, then uninstall for user
com.audible.application.kindle Audible revert system updates, then uninstall for user
com.amazon.kindle Kindle revert system updates, then uninstall for user
com.amazon.kindle.unifiedSearch Kindle unified search revert system updates, then uninstall for user

Run ./fire-tablet-cleanup.sh --list-packages to print the same list from the script.

There are three package categories:

  1. Revert then uninstall (DEFAULT_PACKAGES): preinstalled system apps whose updated copies under /data/app should be reverted, then removed for the user.
  2. Uninstall for user only (USER_ONLY_PACKAGES): optional apps that should be removed/disabled for a user without calling uninstall-system-updates. Currently unused.
  3. Never touch: required Fire OS components. These are not listed in either array and must not be added.

The script deliberately does not target:

  • Amazon Appstore
  • Amazon Kids
  • parental controls
  • Fire launcher
  • Settings/System UI
  • OTA/update services
  • device-management services
  • core Amazon framework packages

Why reverting system updates is necessary

pm uninstall --user only removes a system app for an Android user. That does not necessarily reclaim internal storage.

Fire OS may install updated copies of preinstalled Amazon apps into /data/app (for example Amazon Photos, Music, Audible, Prime Video, and Freevee). Those updated APKs can keep using hundreds of megabytes on the tablet's limited internal flash even after the app has been uninstalled for user 0. The original baked-in APK remains on the read-only system partition (/system/system_ext/...).

For each listed system-app package, the script therefore runs:

adb shell pm uninstall-system-updates PACKAGE_NAME

before:

adb shell pm uninstall --user 0 PACKAGE_NAME

That reverts the package to its baked-in system version and deletes the /data/app update, which is what actually frees space. The command is best-effort: if a package has no updates, is not a system package, or the command fails, the script logs the result and continues. It never calls pm uninstall-system-updates with no package argument.

Fire OS updates or provisioning may restore these apps later. That is why this tool is designed to be safe to run repeatedly.

Requirements

Linux, macOS, or Windows with adb in your PATH.

On Ubuntu/Zorin:

sudo apt install android-sdk-platform-tools

On macOS with Homebrew:

brew install android-platform-tools

On Windows, install Android SDK Platform-Tools and add the install directory to your PATH.

Enable Developer Options and USB debugging on the Fire tablet, then verify:

adb devices

The device should show as device, not unauthorized or no permissions.

Usage

chmod +x fire-tablet-cleanup.sh
./fire-tablet-cleanup.sh

Useful options:

./fire-tablet-cleanup.sh --dry-run
./fire-tablet-cleanup.sh --all-users
./fire-tablet-cleanup.sh --all-users --reboot
./fire-tablet-cleanup.sh --no-uninstall
./fire-tablet-cleanup.sh --list-packages

Recommended first run

./fire-tablet-cleanup.sh --dry-run --all-users

Review the output, then:

./fire-tablet-cleanup.sh --all-users --reboot

Restricted Amazon Kids profiles may return DELETE_FAILED_USER_RESTRICTED. Some Fire OS builds refuse removal entirely with DELETE_FAILED_INTERNAL_ERROR. pm uninstall-system-updates may also report that a package has no updates. The script treats all of these as expected and continues.

Watch the Internal /data before cleanup and Internal /data after cleanup lines to see how much space was reclaimed. If Fire OS still reports stale numbers, reboot (--reboot or manually).

Restoring an app

A preinstalled app removed for a user can usually be restored with:

adb shell cmd package install-existing --user 0 PACKAGE_NAME

Example:

adb shell cmd package install-existing --user 0 com.audible.application.kindle

Replace --user 0 with the target user ID when restoring on a secondary profile.

Troubleshooting

Symptom What to try
unauthorized Unlock the tablet and approve the USB debugging prompt.
no permissions (Linux) Install udev rules for Android USB devices and ensure your user is in the plugdev group.
No device listed Try another cable/port; confirm USB debugging is enabled.
Multiple devices connected Disconnect extra phones/tablets so only the Fire tablet remains.
Non-Amazon manufacturer warning The script will still run, but double-check you connected the intended tablet.
uninstall-system-updates skipped Expected if the package has no /data/app update or is not a system app. Cleanup continues.
Stale storage numbers after cleanup Reboot the tablet (--reboot or manually).

Important caveats

  • Package names and Fire OS behavior can change between models and OS versions.
  • Fire OS may restore preinstalled apps after updates or provisioning.
  • Updated copies under /data/app can return after a Fire OS update; re-run the script if internal storage fills up again.
  • This script intentionally does not disable OTA/security updates.
  • Adopted SD storage is encrypted and paired with the tablet; do not casually remove or reformat the card.
  • Always keep important game saves/data backed up where possible.

Contributing

If you test this on another Fire model, contributions are useful—especially:

  • Fire model/generation
  • Fire OS version (build ID from script output)
  • which packages were present
  • whether uninstall-system-updates reclaimed /data space
  • whether cleanup succeeded
  • before/after /data free space

Please avoid proposing removal of launcher, parental-control, OTA, or core framework packages without strong evidence and prominent warnings.

License

MIT — see LICENSE.

About

Conservative ADB helper to reclaim internal storage on Amazon Fire tablets

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages