Skip to content

Y0lan/instafree

 
 

Repository files navigation

InstaFree Icon

InstaFree

Distraction-Free Instagram

Download APK


A patching toolkit that removes addictive features from Instagram while keeping essential functionality.

Based on FeurStagram by jean-voila.

Installation

You have two options:

  1. Ready-to-install APK - Grab the latest patched APK from the Releases page and install it directly
  2. DIY Patching - Use the toolkit below to patch any Instagram version yourself

What Gets Disabled

Feature Status How
Feed Posts Blocked No stories or posts shown from the homepage feed
Explore Content Blocked Network-level blocking
Reels Tab Redirected Reels tab sends you to the DM page
Stories Tray Blocked Stories tray removed from the homepage

What Still Works

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

Requirements

Linux

sudo apt install apktool android-sdk-build-tools openjdk-17-jdk python3

macOS

brew install apktool android-commandlinetools openjdk python3
 sdkmanager "build-tools;34.0.0"

Quick Start

  1. Download an Instagram APK from APKMirror (arm64-v8a recommended)

  2. Run the patcher:

    ./patch.sh instagram.apk
  3. Install the patched APK:

    adb install -r instafree_patched.apk
  4. Cleanup build artifacts:

    ./cleanup.sh

File Structure

instafree/
├── patch.sh                    # Main patching script
├── cleanup.sh                  # Removes build artifacts
├── apply_network_patch.py      # Network hook patch logic
├── instafree.keystore          # Signing keystore (password: android)
└── patches/
    ├── InstaFreeConfig.smali   # Configuration class
    └── InstaFreeHooks.smali    # Network blocking hooks

Keystore

The patched APK needs to be signed before installation. The patcher uses a keystore file for signing.

Generating a Keystore

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"

Keystore Details

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.

Debugging

View logs to see what's being blocked:

adb logcat -s "InstaFree:D"

How It Works

Tab Redirect

Intercepts fragment loading in the main tab host. When Instagram tries to load fragment_clips (Reels), it redirects to fragment_direct_tab (DMs).

Network Blocking

Hooks into TigonServiceLayer (a named, non-obfuscated class) and blocks requests to /feed/timeline/ and /discover/topical_explore.

Credits

This project is a fork of FeurStagram by jean-voila, originally released under the Unlicense.

License

This project is released under the Unlicense - you can do whatever you want with it. See LICENSE for details.

Packages

 
 
 

Contributors

Languages

  • TypeScript 67.9%
  • Smali 12.1%
  • Shell 7.4%
  • Python 6.6%
  • CSS 3.9%
  • HTML 1.4%
  • JavaScript 0.7%