Distraction-Free Instagram
A patching toolkit that removes addictive features from Instagram while keeping essential functionality.
Based on FeurStagram by jean-voila.
You have two options:
- Ready-to-install APK - Grab the latest patched APK from the Releases page and install it directly
- DIY Patching - Use the toolkit below to patch any Instagram version yourself
| Feature | Status | How |
|---|---|---|
| Feed Posts | Blocked | Network-level blocking |
| Explore Content | Blocked | Network-level blocking |
| Reels Tab | Redirected | Reels tab sends you to the DM page |
| Reels Feed | Blocked | Network-level blocking |
| Stories Tray | Blocked | Stories tray removed from the homepage |
| Ads | Blocked | Sponsored units in feed, stories, profile, DMs and Explore |
| Suggested Accounts | Blocked | "Suggested for you", chaining and friend recommendations |
| Analytics & Telemetry | Blocked | Client logging, "seen" receipts and usage stats |
| Shopping | Blocked | Commerce and shopping preloads |
| Feature | Status |
|---|---|
| Direct Messages | All DM features work |
| Stories from DMs | Access friends' stories from the DM page |
| Profile | View your own stories and posts from your profile page |
| Posting Stories | You can post stories normally |
| Reels in DMs | Reels shared via DMs still play |
| Search | Searching for users works |
| Notifications | Works |
| Deep Links | Shared links open their post instead of dropping to the feed |
- Java 17 or newer, and Python 3
zipalignandapksignerfrom the Android SDK build-tools- apktool - a system package, or let the patcher fetch a pinned copy into
tools/
sudo apt install apktool zipalign apksigner openjdk-17-jdk python3brew install apktool android-commandlinetools openjdk python3
sdkmanager "build-tools;35.0.0"-
Download an Instagram APK from APKMirror.
Pick the arm64-v8a variant for your Android version. APKMirror now ships Instagram as a split BUNDLE (
.apkm); the patcher merges those into a single universal APK for you, so download it as-is. -
Run the patcher:
./patch.sh instagram.apkm
The signed result is written to
instafree_<instagram-version>.apk. -
Install the patched APK:
adb install -r instafree_*.apk -
Cleanup build artifacts:
./cleanup.sh
| Flag | Effect |
|---|---|
-o, --output FILE |
Write the patched APK somewhere specific |
--keep-work |
Keep the decoded sources for inspection |
--no-deeplinks |
Skip the signature check bypass |
Set INSTAFREE_HEAP (default 4g) to change how much memory apktool gets.
The Patch Instagram APK workflow does the same thing on GitHub Actions, so a new release does not need a local Android toolchain.
APKMirror blocks automated downloads, so hand the stock APK to the workflow one of two ways:
- attach it to a release in this repo and pass that tag as
source_release, or - pass any direct download link as
apk_url.
The patched APK is uploaded as a workflow artifact. Set publish_tag as well to
attach it to a release.
instafree/
├── patch.sh # Main patching script
├── cleanup.sh # Removes build artifacts
├── apply_network_patch.py # Network hook injection
├── global_redirect.py # Reels tab redirection
├── apply_signature_bypass.py # Deep-link signature check bypass
├── instafree.keystore # Signing keystore (password: android)
└── patches/
├── InstaFreeConfig.smali # Configuration class
└── InstaFreeHooks.smali # Network blocking rules
The patched APK needs to be signed before installation. The patcher uses a keystore file for signing.
If instafree.keystore doesn't exist, create one:
keytool -genkey -v -keystore instafree.keystore -alias instafree \
-keyalg RSA -keysize 2048 -validity 10000 \
-storepass android -keypass android \
-dname "CN=InstaFree, OU=InstaFree, O=InstaFree, L=Unknown, ST=Unknown, C=XX"| Property | Value |
|---|---|
| Filename | instafree.keystore |
| Alias | instafree |
| Password | android |
| Algorithm | RSA 2048-bit |
| Validity | 10,000 days |
Note: If you reinstall the app, you must use the same keystore to preserve your data. Signing with a different keystore requires uninstalling the previous version first.
Override the defaults with INSTAFREE_KEYSTORE, INSTAFREE_KEYSTORE_PASS,
INSTAFREE_KEY_ALIAS and INSTAFREE_KEY_PASS.
View logs to see what's being blocked:
adb logcat -s "InstaFree:D"Blocked requests also surface as java.io.IOException: Blocked by InstaFree.
Hooks into TigonServiceLayer.startRequest (a named, non-obfuscated class) right
where the request URI is loaded, inside a try block that already catches
IOException. Blocked requests throw, so Instagram treats the surface as a
failed network call and leaves it empty. The rules live in
patches/InstaFreeHooks.smali.
Rewrites the fragment_clips (Reels) fragment name to fragment_direct_tab
(DMs), so every Reels entry point opens the DM inbox instead. Reels shared in
DMs are unaffected: they never go through the tab host.
Instagram checks that the running APK carries Meta's signing certificate before
following a link into its own content, so a re-signed build silently drops shared
links to the home feed. The key-hash class is located by the string
Invalid SHA256 key hash, and the allowlist checks that take key hashes are
forced to return true. This is a trust check on the app's own signature, not a
security boundary against anything else. Skip it with --no-deeplinks.
Run ./patch.sh against the new APK - the patches locate their targets by
class, method and string rather than by obfuscated names, so they usually carry
over untouched. If Instagram restructures a targeted area the patcher stops with
a message naming which of the three patches lost its anchor.
FeurStagram has since moved to a different architecture, built on the Morphe patcher with a runtime settings page. InstaFree stays on this self-contained smali toolkit. See docs/UPSTREAM.md for what that means and what a move upstream would cost.
This project is a fork of FeurStagram by jean-voila, originally released under the Unlicense.
This project is released under the Unlicense - you can do whatever you want with it. See LICENSE for details.