Skip to content
TanzirErenPublic

About

DeMod is an advanced Android APK comparison and modification analysis tool that compares original and modified APKs to identify added, removed, and changed files, DEX classes, methods, permissions, components, strings, signatures, and potential modifications — with detailed reports and visual diffs.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

Repository files navigation

DeMod (by TENIx)

Android app that compares an original APK with a modified APK and explains what the modder changed. Java UI (Material 3) + C++ DEX engine (JNI). Built with GitHub Actions - no local SDK needed.

Build with GitHub

  1. Create a new GitHub repo, upload everything in this folder (keep .github/workflows/build.yml).
  2. Open Actions -> Build DeMod -> Run workflow (it also runs on every push).
  3. Download DeMod-debug-apk or DeMod-release-apk from the run's Artifacts. (Release is signed with the debug key so it installs directly.)

The workflow installs JDK 17, Android SDK 34, NDK 26.1, CMake 3.22 and Gradle 8.5 itself, so the Gradle wrapper jar is not required.

How analysis works (handles 500 MB+ APKs)

  1. ZIP central directory compare (CRC/size) -> added / removed / modified files in seconds.
  2. Every classes*.dex is extracted once into a cache (reused by Search Lab); only DEX files whose CRC changed are diffed by the C++ engine (mmap, multithreaded).
  3. C++ parses DEX, builds a normalized pseudo-smali fingerprint for every method (registers omitted), and reports added/removed classes, changed methods, new/removed code strings.
  4. Java classifies results with assets/rules.json + built-in heuristics: Pairip/Google protection, bypass (forced-true methods, billing, premium flags), strings, dialogs, toasts, hooks (original code calling classes that exist only in the mod), permissions, components, manifest, signature, native libs (string diff), URLs/domains, ad/analytics SDKs, added packages.
  5. Results go to SQLite; UI pages them (search, category chips, severity filter, bookmarks).

Features

Project list, history, rename/delete, foreground-service analysis with progress, mod-impact score, category chips + counts, search, severity filter, bookmarks, diff viewer (red/green), copy/share finding, copy whole tab, custom rules import (rules.json), dark/light/system theme, export: TXT, Markdown, HTML, JSON, CSV, method patch (.diff), full ZIP bundle (reports + added/changed files).

What is new in v1.0.1

  • Search Lab (Result screen -> Search Lab): one search per line, searched one by one over the ORIGINAL, the MODIFIED or BOTH APKs. Searches smali code, strings (const-string, static values, string pool), methods, classes, fields, resource ids/names/values, file paths, assets / decoded manifest text, and the analysis findings. Prefixes: s: m: c: f: code: x: (callers) id: res: file: text: re: find:. Pasting real smali lines works (registers are ignored). Presets: premium/VIP, protection, ads, network/root, secrets. Import a .txt list. Export results.
  • Hit screen: path (smali_classesN/.../Class.smali), real smali with registers + labels (method or whole class), callers (xref), compare original vs modified.
  • Browse APK files: every file with its path, preview (decoded AndroidManifest/XML, resources.arsc table, .so strings, text, hex), extract and share.
  • Why was it bypassed?: findings carry real smali (before/after) and the direct callers of each bypassed method; a summary finding lists the strongest causes.
  • Pairip detector: own chip + verdict (REMOVED / PATCHED / INTACT / NOT PRESENT) from libpairipcore.so, com.pairip.* classes, VMRunner stub calls, manifest entries and changed Pairip methods.
  • New rules: SSL pinning, trust-all, root/emulator/debugger/Frida checks, signature checks and spoofing, RevenueCat/billing, premium flag in SharedPreferences, manifest flags (debuggable, cleartext, allowBackup, network security config), ad / analytics SDK removal (rule scope manifestAttr is new).
  • Stability: Cancel button, resume (copied APKs and DEX cache are reused), performance profile (Low / Normal / High caps), clear DEX cache.
  • UI: heuristic notice, sort (severity / category / title / order), bookmarked chip, minimum-severity chip, "Why:" line on every finding, detail text is searched too.

Honest limits

  • Detection is heuristic (pattern based) - always verify in the shown pseudo-smali.
  • The diff view is register-free pseudo-smali; the ORIGINAL / MODIFIED blocks and Search Lab show baksmali-like smali (try/catch tables, annotations and debug info are not printed). Not guaranteed assemblable.
  • Call tracing is one level (direct callers). Reflection / native callers are not seen.
  • Pairip names are matched by pattern from known layouts; a new Pairip version may need new rules.
  • Runtime hooks (Frida/Xposed) cannot be found statically; only code injected into the APK.
  • Only the v1 (META-INF) signing certificate is compared.
  • Needs free storage for two copies of the APKs.

Edit app/src/main/assets/rules.json to add new protection/bypass patterns without touching Java.

About

DeMod is an advanced Android APK comparison and modification analysis tool that compares original and modified APKs to identify added, removed, and changed files, DEX classes, methods, permissions, components, strings, signatures, and potential modifications — with detailed reports and visual diffs.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages