Skip to content

joelindra/Frida-xTR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›‘οΈ Frida-xTR v1.1

Advanced Multi-Device Frida Manager for Android

Python Platform License Frida


🌟 Overview

Frida-xTR is a premium, high-performance management tool designed for security researchers and developers who work with multiple Android devices. It automates the tedious process of deploying, managing, and monitoring Frida Servers across a fleet of devices (physical or emulated) through an elegant, color-coded terminal interface.

Note

This tool is a complete Python-based evolution of the original batch scripts, offering smarter architecture detection, dynamic port mapping, and seamless integration with emulator environments like LDPlayer.


✨ Key Features

πŸš€ Smart Deployment

  • Auto-Arch Detection: Automatically identifies device architecture (arm64, x86, arm, x86_64) and pushes the matching frida-server binary.
  • Root Elevation: Intelligent root detection and elevation via ADB for seamless server execution.
  • Smart Deduplication: Automatically handles duplicate device IDs (common with emulators like LDPlayer and Genymotion).

πŸ› οΈ Multi-Device Management

  • Concurrent Control: Setup or start Frida Server on multiple devices simultaneously.
  • Dynamic Port Mapping: Automatically assigns unique local ports (starting at 27042) for each device to prevent conflicts.
  • LDPlayer Integration: One-click connection to the default LDPlayer ADB bridge.

πŸ’‰ Advanced Injection

  • Target Selection: Search and select target packages from a live list on the device.
  • Dual Script Support:
    • Local: Load your own .js scripts from the scripts/ folder.
    • Codeshare: Instantly inject popular scripts from the Frida Codeshare library.
  • Spawn Mode: Automatically spawns target applications to ensure early-stage hooking.

πŸ’Ž Premium Terminal UI

  • Vibrant Aesthetics: Pink-to-Blue gradient headers and color-coded status indicators.
  • Real-time Feedback: Interactive loading spinners and modal-style dialogs.
  • Multi-Window Support: Spawns independent terminal windows for active Frida sessions.

πŸ—οΈ Supported Architectures

Frida-xTR searches for architecture-specific binaries in the server/ directory:

Architecture Recommended Binary Name Target Device
ARM64 frida-server-arm64 Modern physical Android devices
ARM frida-server-arm Older physical Android devices
x86_64 frida-server-x86_64 High-performance Android Emulators
x86 frida-server-x86 Standard Android Emulators

πŸ“± Emulator & Device Compatibility

Frida-xTR is optimized for a wide range of Android environments. Whether you are using official development tools or high-performance gaming emulators, the tool ensures stable connectivity.

1. Android Studio (AVD)

  • Detection: Automatically detected as emulator-5554, emulator-5556, etc.
  • Root Tip: Use "Google APIs" system images for full root control. If using "Google Play" images, you may need additional tools like rootAVD to gain /system access.
  • Perf: x86_64 binaries are highly recommended for the best performance on modern machines.

2. Third-Party Emulators

The tool features specialized logic to handle common emulator ports and deduplication:

  • LDPlayer: Use the built-in "Auto-Connect" feature if your device isn't showing up (Default port: 5555).
  • NoxPlayer: Ensure "Root" is enabled in Nox settings. Detected via port 62001 or 52001.
  • BlueStacks: Requires "Android Debug Bridge" to be enabled in settings. Detected via localhost dynamic ports.
  • MEmu / Genymotion: Fully supported via standard ADB bridge.

3. Network & Wireless ADB

Connecting a physical device over WiFi? Simply connect via ADB first:

adb connect <device_ip>:5555

Frida-xTR will immediately recognize the network device and allow you to manage it just like a USB-connected phone.


πŸ“₯ Installation

Prerequisites

  • Python 3.6+
  • ADB (Android Debug Bridge) added to your System PATH.
  • Frida Tools installed on your host machine.

Quick Start

  1. Clone the repository:

    git clone https://github.com/joelindra/Frida-xTR.git
    cd Frida-xTR/Dev
  2. Install requirements:

    pip install -r requirements.txt
  3. Prepare Frida Server Binaries: Download the latest Frida Server binaries, rename them according to the architecture table above, and place them in the server/ folder.


πŸ—ΊοΈ System Architecture & Logic Flow

1. Operational Logic Flow

The core engine's decision-making process from startup to execution.

graph TD
    Start([Launch main.py]) --> Init[Initialize Colors & UI]
    Init --> Detect{Detect Devices}
    
    Detect -->|Found| Menu[Display Main Menu]
    Detect -->|None| LDConnect[Auto-Connect LDPlayer?]
    LDConnect -->|Yes| Connect[ADB Connect 127.0.0.1:5555]
    Connect --> Detect
    
    Menu -->|Menu 1| Setup[Setup Frida Server]
    Menu -->|Menu 2| StartSrv[Start Frida Server]
    Menu -->|Menu 7| Inject[Inject Script to App]
    Menu -->|Exit| Cleanup[Kill Processes & Close]
    
    Setup --> Arch{Detect Arch}
    Arch -->|Auto| Push[Push Correct Binary & chmod 755]
    Push --> Menu
    
    StartSrv --> Port[Dynamic Port Mapping 27042++]
    Port --> Exec[Execute Server with Root/Shell]
    Exec --> Menu
Loading

2. High-Level Sequence Diagram

How Frida-xTR interacts with ADB and the Android system during a typical "Setup & Inject" session.

sequenceDiagram
    participant U as User
    participant S as Frida-xTR Engine
    participant A as ADB Bridge
    participant D as Android Device

    U->>S: Select Device & Action (Setup)
    S->>A: getprop ro.product.cpu.abi
    A->>D: Query Architecture
    D-->>A: arm64-v8a
    A-->>S: return Architecture
    S->>A: push server/frida-server-arm64
    A->>D: Store in /data/local/tmp/
    S->>A: shell chmod 755
    A->>D: Set Executable
    S-->>U: Setup Complete βœ“

    U->>S: Start Injection (Menu 7)
    S->>A: forward tcp:27042 -> tcp:27042
    A->>D: Map Port
    S->>A: shell frida-server &
    A->>D: Background Execution
    S->>S: Local Spawn (frida -H 127.0.0.1:27042 -f package)
    S-->>U: Active Hook Session (New Window)
Loading

Typical Workflow:

  1. Menu 1: Initialize your devices (pushes the server binary).
  2. Menu 2: Spin up the Frida Server on selected devices.
  3. Menu 4: Verify all servers are ONLINE and see their local port mappings.
  4. Menu 7: Select a process and inject your bypass or monitoring script.

πŸ“ Project Structure

Frida-xTR/
β”œβ”€β”€ πŸ“ server/                # Frida Server binaries (arm64, x86, etc.)
β”œβ”€β”€ πŸ“ scripts/               # Custom JavaScript (.js) injection scripts
β”œβ”€β”€ πŸ“ rootAVD/               # Support tools for AVD rooting (Internal)
β”œβ”€β”€ πŸ“„ main.py                # Main entry point & Terminal UI engine
β”œβ”€β”€ πŸ“„ requirements.txt       # Project dependencies (frida-tools)
β”œβ”€β”€ πŸ“„ README.md              # Project documentation
└── πŸ“„ port_mapping.txt       # [Auto-Generated] Active dynamic ports

Component Details:

Item Description
main.py The heart of the tool. Handles ADB communication, terminal rendering, and logic.
server/ Place your downloaded frida-server binaries here. The tool will auto-select them.
scripts/ Repository for your local hooks. Scripts here appear in the Menu 7 selection list.
port_mapping.txt Generated when servers start. Tracks which device is on which localhost port.
rootAVD/ Integrated support for rooting certain Android Studio system images.


πŸ› οΈ Troubleshooting

  • "Text file busy": The tool automatically tries to pkill existing servers, but if it fails, manually stop frida-server on the device.
  • Device Not Authorized: Check your phone's screen for the ADB debugging prompt.
  • Port Conflict: Use Menu 6 to refresh or clear existing port forwardings.
  • Architecture Mismatch: Ensure you have the correct binary for your emulator (usually x86_64) vs your phone (usually arm64).

🀝 Contribution

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“œ Credits & License

  • Lead Developer: Anonre | Tuan Hades
  • Inspiration: Frida Multi-Device Manager Batch Script
  • License: Distributed under the MIT License.

About

An advanced Frida Server management application for managing multiple Android devices simultaneously. This tool allows you to setup, start, stop, and monitor Frida Server on multiple Android devices at once with a user-friendly interface.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors