MCPcopy Index your code
hub / github.com/ChiChou/grapefruit

github.com/ChiChou/grapefruit @v1.1.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.1.2 ↗ · + Follow
2,504 symbols 7,056 edges 449 files 27 documented · 1%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README
<img src="https://github.com/ChiChou/grapefruit/raw/v1.1.2/gui/src/assets/logo.svg" alt="logo" width="320">

Grapefruit: Open-source mobile security testing suite

John Discord npm version Commits contributers License

Runtime mobile application instrumentation toolkit powered by Frida. Inspect, hook, and modify mobile apps through a web-based interface.

Now it supports both iOS and Android!

Quick Start

Requires Frida server running on your device. Follow the official setup guides(Android) first.

npm (recommended)

npm install -g igf
igf

Or run without installing

npx igf

Prebuilt binaries for macOS, Linux, and Windows are available on GitHub Releases.

Note: even we use bun as primary development environment, and the prebuilt single binaries are bun based, the package on npm is not compatible with bun, do not use bunx to run.

Features

  • Runtime Method Hooking - Intercept native and managed functions with structured logging
  • Cryptographic API Interception - Monitor encryption/decryption operations with data capture
  • Filesystem Browser - Navigate, upload, download, and inspect files with hex/text preview
  • SQLite Database Inspection - Browse tables, run queries, and view results
  • Syslog Streaming - Real-time system and agent log monitoring
  • Process Crash Reporting - Exception handler with register dump and backtrace
  • Flutter Support - Monitor platform method channel communication on both platforms
  • React Native Support - Bridge inspector and JavaScript injection REPL
  • Memory Scanner - Search and inspect process memory
  • Privacy Monitor - Track sensitive API access (camera, microphone, location, sensors, etc.)
  • Thread Inspector - View and manage process threads
  • Module/Symbol Browser - Inspect loaded modules and exported symbols
  • Analysis & Decompilation - DEX, Hermes bytecode, and native code. AI assistance available for hook script generation

iOS

iOS Screenshot

  • Keychain access and modification
  • NSURL session traffic capture (HTTP/HTTPS/WebSocket)
  • WebView and JSContext inspection with JavaScript execution
  • UI hierarchy dump and element highlighting
  • Info.plist, entitlements, and binary cookie viewers
  • Biometric (Touch ID / Face ID) bypass
  • UserDefaults browser
  • Pasteboard and file operation monitoring
  • Geolocation spoofing
  • Device ID spoofing
  • Objective-C class and method inspection
  • Open file handles and network connections (lsof)
  • Security analysis (PIE, ARC, stack canaries, encryption)
  • Asset catalog viewer (Assets.car)
  • XPC/NSXPC message inspection

Android

Android Screenshot

  • AndroidManifest.xml decoder and component browser (activities, services, receivers, providers)
  • Android Keystore inspection with key attributes
  • Content provider query, insert, update, and delete
  • JNI call tracing with arguments, return values, and backtraces
  • Java class inspection (methods, fields, interfaces)
  • Intent building and launching
  • Open file handles and network connections (lsof)
  • HTTP traffic capture (OkHttp, Volley, URLConnection)
  • Resources browser
  • Clipboard and SharedPreferences monitoring
  • Broadcast receiver monitoring

Scope and Non-Goals

This project does not include built-in bypasses for anti-tampering protections:

  • Frida detection bypass
  • SSL/TLS certificate pinning bypass
  • Jailbreak or root detection bypass

Rationale: RASP (Runtime Application Self-Protection) solutions evolve continuously to detect instrumentation frameworks. Maintaining effective bypasses requires ongoing effort to keep pace with new detection methods, introducing significant maintenance burden and potential stability issues. These bypasses are also highly application-specific, making general-purpose solutions fragile.

Rather than shipping brittle built-in bypasses, Grapefruit focuses on instrumentation and inspection capabilities that compose well with dedicated bypass tooling.

Recommended approaches for authorized assessments where RASP bypass is required:

  1. Frida Syscall Tracer — Use frida-strace (Frida 17.8.0+) to trace system calls in the target process. This helps identify detection artifacts and determine what patches are needed before attaching Grapefruit:

sh frida-strace -U -f com.example.app

See the Frida 17.8.0 release notes for details.

  1. Multi-session Architecture — Frida supports multiple sessions attached to the same process. Spawn a separate session with your RASP bypass scripts first, then launch Grapefruit. When Grapefruit detects that the target app is already running, it attaches to the existing process rather than respawning it, preserving any bypasses already in effect.

Documentation

License

MIT

Extension points exported contracts — how you extend this code

LogStore (Interface)
(no doc) [4 implementers]
src/routes/data.ts
SocketEmitter (Interface)
Minimal event-emitter surface for dynamic socket event binding.
gui/src/hooks/useLogStream.ts
FlutterEvent (Interface)
(no doc)
src/types.ts
HARNameValue (Interface)
(no doc)
src/lib/har.ts
ClientOptions (Interface)
(no doc)
src/cli/client.ts
ParamInfo (Interface)
(no doc)
scripts/skills.ts
LanguageContextType (Interface)
(no doc)
website/app/context/LanguageContext.tsx
PosixApi (Interface)
(no doc)
agent/src/lib/posix.ts

Core symbols most depended-on inside this repo

push
called by 639
gui/src/lib/codefence.ts
toString
called by 417
agent/src/fruity/typings.ts
send
called by 233
agent/src/droid/modules/receivers.ts
bt
called by 183
agent/src/common/hooks/java.ts
get
called by 156
gui/src/components/shared/DecompilerShell.tsx
rpc
called by 135
src/cli/rpc.ts
cn
called by 135
gui/src/lib/utils.ts
exitErr
called by 119
src/cli/commands.ts

Shape

Function 1,720
Interface 453
Method 283
Class 46
Enum 2

Languages

TypeScript99%
C1%

Modules by API surface

agent/src/fruity/typings.ts77 symbols
agent/src/fruity/modules/webview.ts43 symbols
src/lib/r2.ts39 symbols
gui/src/lib/dex.ts38 symbols
agent/src/droid/bridge/wrapper.ts36 symbols
agent/src/fruity/modules/cookies.ts34 symbols
gui/src/lib/rpc.ts33 symbols
src/cli/commands.ts28 symbols
agent/src/fruity/hooks/url/common.ts28 symbols
agent/src/common/il2cpp.ts25 symbols
agent/src/fruity/hooks/xpc/index.ts22 symbols
agent/src/fruity/modules/fs.ts21 symbols

For agents

$ claude mcp add grapefruit \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact