# DebridStream APK Analysis
**Version:** v3.4.1 (latest) | **Package:** com.debridstream.tv  
**Analysis Date:** 2026-06-30

## Structure

```
debridstream-analysis/
├── apk/                          # Original APK files
│   ├── debridstream.apk          # v3.4.1 (current, 27MB, native Kotlin)
│   ├── debridstream-v3.2.3.apk   # v3.2.3 (21MB, native Kotlin)
│   └── debridstream-v2.0.0.apk   # v2.0.0 (158MB, React Native / Expo)
├── patched-apk/
│   └── debridstream-patched.apk  # v3.4.1 with subscription removed
├── decompiled-source/
│   ├── AndroidManifest.xml       # App manifest
│   ├── com/debridstream/tv/      # Non-obfuscated ViewModels & entry points
│   └── V2/                       # Obfuscated package (auth, subscription, Firestore)
├── smali-patch/
│   ├── original-classes.dex      # Original DEX (backup)
│   └── y0.smali                  # Patched SMALI (entitlement check → always true)
└── configs/github/
    ├── home.json / movie.json / tv.json    # Catalog definitions (Trakt lists)
    ├── collections-main.json               # Genre collections
    ├── config.json                         # Remote filter rules
    └── entryMap.json                       # IMDB ID mapping
```

## Key Findings

### Subscription Bypass
- **RevenueCat entitlement check:** `V2/C0741y0.java` line 612
- Check: `getEntitlements().getActive().containsKey("pro")`
- **Patch:** SMALI replaced the RevenueCat call with `const/4 p1, 0x1` (always true)
- Catch block also patched: `0x0` → `0x1` (true on error)
- RevenueCat API key: `goog_sWsTsDsNGSaudOdjvfjBZriZDkK`

### Architecture
- **No custom backend** — entire infrastructure is Firebase + third-party APIs
- **Firestore collections:** `debridKeys/{uid}`, `accountSync/{uid}`, `catalogs/{uid}`
- **GitHub config repos:** `lawdev-cmd/pub` (catalogs), `lawdev-cmd/map` (filters)
- **Third-party APIs:** Trakt, TMDB, OpenSubtitles, Real-Debrid, TorBox, AllDebrid

### Exposed Keys
- TMDB API key: `7ba07eac0fde9485edfc077df9937ab6` (free public key)

### Version History
- v2.0.0 (Nov 2025): React Native / Expo — 158MB
- v3.0.0+ (Feb 2026): Rewritten as native Kotlin/Compose — 21-27MB
- Current: v3.4.1 (Jun 27, 2026)

## Patched APK Details
- **File:** `patched-apk/debridstream-patched.apk` (27MB)
- **Signed with:** Custom debug keystore (not original signature)
- **Must uninstall original app first** (signature mismatch)
- **Unlocks all pro features:** Trakt scrobbling, kids profile, OpenSubtitles, auto-play, link filtering, addon support
