iRetardLab: Engineering Instagram Discipline Across Chrome and Android
Back to Log
Chrome ExtensionAndroidManifest V3Open SourceSecurity

iRetardLab: Engineering Instagram Discipline Across Chrome and Android

5 min read
Chrome Extension

Overview

iRetardLab is a two-product discipline stack for Instagram usage control:

iRetardLab product overview

  1. iRetard: a strict local-only Manifest V3 Chrome extension.
  2. iRetardgram: an open-source Android patching toolkit.

The objective is consistent across both: remove high-distraction surfaces while preserving direct communication features required for normal use.

Open source:

Live project entry:


iRetard Chrome Extension

iRetard is built with a strict local-only policy and no cloud dependency.

Chrome extension surface

Strict default policy

  • No user override controls in popup
  • Daily Instagram budget fixed to 30 minutes
  • Popup shows a live countdown from 30:00 in MM:SS
  • Active sessions are monitored continuously with heartbeat checks
  • Every 5 minutes of active usage triggers a mandatory math challenge modal
  • Emergency unlock flow is disabled

Network blocking behavior

The extension blocks home-feed request patterns, including:

  • /feed/timeline/
  • /feed/following/
  • /web/feed/timeline/
  • GraphQL home-feed queries that include feed timeline hints

Tab redirection behavior

  • Reels tab routes are redirected to Direct Messages
  • Fragment requests targeting fragment_clips are intercepted and redirected to DMs

What is disabled

  • Feed posts: blocked at network layer with visual fallback blocker on home
  • Reels tab: redirected to DMs and blocked from fragment loading

What still works

  • Stories
  • Direct Messages
  • Profile
  • Reels in DMs
  • Search
  • Notifications

Load unpacked (development)

  1. Open chrome://extensions
  2. Enable Developer mode
  3. Click Load unpacked
  4. Select the extension folder

iRetardgram Android Toolkit

iRetardgram is an Android patching toolkit that removes high-distraction Instagram surfaces while preserving core communication behavior.

This project builds on the FeurStagram concept.

Why iRetardgram

  • Predictable and scriptable patching workflow
  • Signed release APKs via GitHub Actions
  • Tag-based automated build and release pipeline
  • Fallback APK sources when primary download fails

Download

What it disables

FeatureStatusMethod
Feed postsBlockedNetwork-level blocking
Explore contentBlockedNetwork-level blocking
Reels contentRedirectedRedirects to DMs
Analytics and telemetryBlockedNetwork path blocking
Shopping and commerce preloadsBlockedNetwork path blocking

What still works

FeatureStatus
StoriesWorks
Direct MessagesWorks
ProfileWorks
Reels in DMsWorks
SearchWorks
NotificationsWorks

Community:


In-Product Screens

Instagram surface after discipline patch

Instagram surface after discipline patch


System 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"

Windows

Use WSL2 (Ubuntu recommended) and install the Linux requirements in WSL.


Quick Start

  1. Download an Instagram APK from APKMirror (arm64-v8a recommended).
  2. Run patcher:
./patch.sh instagram.apk
  1. To also block stories:
./patch.sh --block-stories instagram.apk
  1. Install patched APK:
adb install -r artifacts/iRetardgram_patched_<instagram_apk_name>_stories_enabled.apk
  1. Cleanup build artifacts:
./cleanup.sh

Automated Release Pipeline

The repository includes a GitHub Actions workflow at .github/workflows/release.yml.

When a tag starting with v is pushed (example: v1.0.3), the workflow:

  • Downloads latest Instagram APK automatically
  • Uses fallback sources if APKMirror fails
  • Builds stories-enabled and stories-blocked variants
  • Generates SHA256 files
  • Uploads assets to GitHub Release

Release trigger:

git tag v1.0.3
git push origin v1.0.3

Primary source:

Fallback sources:

  • APKPure endpoint
  • Uptodown endpoint

Core Structure

iRetardgram/
|- patch.sh
|- cleanup.sh
|- apply_network_patch.py
|- global_redirect.py
|- artifacts/
|- scripts/
`- patches/
   |- IRetardConfig.smali
   `- IRetardHooks.smali

Keystore and Signing

The patched APK must be signed before installation.

Example run with environment variables:

IRETARDGRAM_KEYSTORE=./iRetardgram.keystore \
IRETARDGRAM_KEYSTORE_PASS=your_store_password \
IRETARDGRAM_KEY_ALIAS=iRetardgram \
./patch.sh instagram.apk

Create keystore if missing:

keytool -genkey -v -keystore iRetardgram.keystore -alias iRetardgram \
  -keyalg RSA -keysize 2048 -validity 10000 \
  -storepass android -keypass android \
  -dname "CN=iRetardgram, OU=iRetardgram, O=iRetardgram, L=Unknown, ST=Unknown, C=XX"

Keystore details:

PropertyValue
FilenameiRetardgram.keystore
AliasiRetardgram
AlgorithmRSA 2048-bit
Validity10,000 days

Note: keep the same keystore for updates to preserve app data continuity.


How Blocking Works

Tab redirect

Fragment loading is intercepted. Requests for fragment_clips are redirected to fragment_direct_tab.

Network blocking

Hooks are applied in TigonServiceLayer. Before each request, IRetardHooks.throwIfBlocked() checks URI path patterns and fails blocked calls with IOException.

Blocked network paths (representative)

  • /feed/timeline/
  • /discover/topical_explore
  • /clips/discover
  • /api/v1/clips/user/
  • /api/v1/clips/multi_user/
  • /api/v1/feed/reels_media/
  • /blend
  • /blends
  • /api/v1/qe/sync/
  • /api/v1/launcher/sync/
  • /api/v1/direct_v2/threads/get_by_participants/
  • /api/v1/reels/liked/
  • /api/v1/discover/explore/
  • /logging/
  • /async_ads_privacy/
  • /async_critical_notices/
  • /api/v1/fbupload/
  • /api/v1/stats/
  • /api/v1/loom/
  • /api/v1/analytics/
  • /api/v1/commerce/
  • /api/v1/shopping/
  • /api/v1/sellable_items/

Pattern matching is implemented with String.contains() checks on URI paths.


Maintenance

For new Instagram versions:

  • Re-apply the patch flow
  • Validate TigonServiceLayer hook points
  • Ship a new tag release

Debug log command:

adb logcat -s "iRetardgram:D"

Contributing and Security

Contributions are welcome. Read CONTRIBUTING.md before opening pull requests.

If you identify a security issue, follow SECURITY.md and avoid public disclosure until review is complete.

Author:

  • brittytino (Tino Britty J)

Licensing:

  • iRetardgram repository includes GNU GPL v3
  • iRetard extension references MIT licensing in project documentation

Refer to the specific repository license file for exact terms.

Share this article