Skip to main content

version PyPI version Publish status

AndroidFridaManager

AndroidFridaManager is a Python API designed to simplify the installation and management of Frida on Android devices. It provides an easy-to-use interface for installing and running the latest Frida server, as well as the flexibility to install specific versions as needed.

Key features:

  • Frida Server Management: Seamlessly install and run the latest Frida server on your Android device, or choose to install a specific version as required.
  • Job Management: Execute Frida scripts as independent jobs, managed by the JobManager(). This feature allows for concurrent execution of multiple Frida scripts, with each job running in its own thread.
  • afrim Tool Integration: Utilize the afrim tool to check for existing Frida server installations on your device and ensure you are always running the latest version.

The project was inspired by Frida-Python-Binding.

Install

Just install it via pip:

python3 -m pip install AndroidFridaManager

This will install the afrim-command to your system.

Usage

In order to easily install the latest frida-server version to your Android device just run the following command:

$ afrim 

In order to check only if frida-server is running invoke it with the -r-parameter:

$ afrim -r

API Usage

In order to install and run Frida on your Android device use the FridaManager-API:

from AndroidFridaManager import FridaManager
...
afm_obj = FridaManager(is_remote=False, socket="ip:port", verbose=False, frida_install_dst="/data/local/tmp/")
afm_obj.install_frida_server()
afm_obj.run_frida_server()

For running Frida scripts as jobs use the JobManager-API:

from AndroidFridaManager import JobManager
...
app_package = "net.classwindexampleyear.bookseapiececountry"
frida_script_path = "./frida_script1.js"
job_manager = JobManager()
job_manager.setup_frida_session(app_package, myAwesomeHookingHandler)
job_manager.start_job(frida_script_path, myAwesomeHookingHandler)
print("Running jobs:", job_manager.running_jobs())
job_manager.stop_app_with_closing_frida(app_package)

The setup_frida_session() function accepts a callback function as its second parameter, typically provided by script.on('message', on_message). This initializes the first job and, by default, is the only job where you can activate child_gating and spawn_gating. To execute the job, you must invoke the start_job() function.

API

install_frida_server(dst_dir="/data/local/tmp/", version="latest")
run_frida_server()
is_frida_server_running()
stop_frida_server()
remove_frida_server()

# JobManager
JobManager(host="", enable_spawn_gating=False)
running_jobs() # list running jobs
start_android_app(package_name, main_activity = None, extras = None) # returns the PID of the start app
setup_frida_session(target_process, frida_callback_function, should_spawn=True,foreground=False)
start_job(frida_script_name, frida_callback_function)
stop_jobs() # stops all running jobs
stop_job_with_id(job_id) # stop only job with job_id
detach_from_app() # will also be invoked when running stop_app_with_closing_frida()
stop_app_with_closing_frida(app_package)
stop_app(app_package)
kill_app(pid)
setup_frida_handler(host="", enable_spawn_gating=False) # returns the device object and is used by setup_frida_session()

# setup_frida_handler,setup_frida_session will raise the FridaBasedException(Exception). Ensure to handle it

JobManager

The JobManager expect a running frida-serveron the target device.

Metadata

Release files for AndroidFridaManager 1.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for AndroidFridaManager 1.9.0
File Size Uploaded Provenance Actions
androidfridamanager-1.9.0.tar.gz 26.3 kB Without provenance Details for androidfridamanager-1.9.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for AndroidFridaManager 1.9.0
File Interpreter ABI Platform Actions
androidfridamanager-1.9.0-py3-none-any.whl Python 3 none any Details for androidfridamanager-1.9.0-py3-none-any.whl

Total release size: 52.0 kB

Release files / androidfridamanager-1.9.0.tar.gz

Download URL androidfridamanager-1.9.0.tar.gz
Size 26.3 kB
Tags Source
SHA-256 checksum
How to use checksums
9183ef5c8860e04cead8bac06f4498373fd729565b1795c9a7ad45814275e82d
BLAKE2b-256 checksum
How to use checksums
ce6263180b878913faef5283ea661837c41c15c13af7c8f83efaa3fda169a6b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / androidfridamanager-1.9.0-py3-none-any.whl

Download URL androidfridamanager-1.9.0-py3-none-any.whl
Size 25.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ad238a9a1b6f9bf1de437460bcfd485e359209310ed77448a47f08d19c173e39
BLAKE2b-256 checksum
How to use checksums
b84aa19cb9f4da0f0e15538631611d4520712c3cb8d3a34173e2d4db08c9fe53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Security for AndroidFridaManager 1.9.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.9.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page