Utility for dumping .so files from Android applications using Frida.
Project description
soSaver
A utility for extracting and saving native (.so) libraries from the memory of Android applications using Frida.
Description
soSaver is a tool for dynamic analysis of Android applications, enabling extraction of native libraries (.so files) from running applications' memory. Unlike static file system analysis, soSaver can access libraries that are:
- Encrypted in the APK and decrypted only at runtime
- Dynamically loaded from the internet or other sources
- Unpacked or generated during application execution
- Protected against extraction by standard methods
Features
- Extraction of native libraries from running Android applications
- Interception of library loader calls (
dlopen,android_dlopen_ext) - Periodic memory scanning to detect libraries loaded through non-standard methods
- Fallback mechanism for extracting libraries from the file system
- Informative output and statistics on extracted modules
- Simple CLI interface
Installation
From PyPI
pip install sosaver
Requirements
- Python 3.10 or higher
- Android device (physical or emulator) with root access
- Frida server running on the target device
Usage
Basic Usage
# Extract libraries from an application by package name
sosaver com.example.app
# Extract from an application by PID
sosaver 1234
# Save results to a specified directory
sosaver -o /path/to/output com.example.app
# Enable debug mode
sosaver --debug com.example.app
Usage Examples
# Extract libraries from a game
sosaver com.example.game
# Extract with detailed output
sosaver --debug com.unity.game
Architecture
soSaver consists of two main components:
-
Python application (
sosaver/) — responsible for:- Connecting to Android devices
- Injecting the Frida script into the target process
- Processing messages from the Frida agent
- Saving extracted libraries
-
Frida agent (
agent/, written in TypeScript) — responsible for:- Intercepting library loaders in the application
- Scanning memory for ELF headers
- Reading library data from memory
- Sending data to the Python application
How It Works
- soSaver connects to an Android device via Frida
- Injects a JavaScript agent into the target process
- The agent performs:
- Initial scanning of already loaded modules
- Setting up hooks for library loading functions
- Periodic memory scanning for new libraries
- When a library is detected:
- Reading content from memory in blocks
- Transferring data via Frida messages to the host application
- In case of memory read error, attempting to read from the file system
- The Python application saves the extracted libraries to disk
- Upon completion, statistics on extracted modules are displayed
Building from Source
The Frida agent is pre-built and included as sosaver/frida/scripts/agent.js. To modify the agent:
# Clone the repository
git clone https://github.com/TheQmaks/sosaver.git
cd sosaver
# Install agent dependencies and build
cd agent && npm install && npm run build
# Install the Python package in development mode
cd .. && pip install -e .
Development and Contribution
This is a monorepo containing both the Python CLI and the TypeScript Frida agent:
sosaver/— Python CLI applicationagent/— TypeScript Frida agent source
To set up a development environment:
pip install -e ".[dev]"
cd agent && npm install
License
This project is distributed under the MIT license. See the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sosaver-1.0.1.tar.gz.
File metadata
- Download URL: sosaver-1.0.1.tar.gz
- Upload date:
- Size: 5.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a934b7befbad04eeffb89c774d6f3cbec4826fbcc0a9e47f46dbe11fc79ec9c8
|
|
| MD5 |
1975a3ed1493d05a6ea864eb0deaeb34
|
|
| BLAKE2b-256 |
9b4d78f9ee755853a0e7814fee30a47144f968de87f87d94ecde1fdd4bf7d159
|
Provenance
The following attestation bundles were made for sosaver-1.0.1.tar.gz:
Publisher:
release.yml on TheQmaks/soSaver
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sosaver-1.0.1.tar.gz -
Subject digest:
a934b7befbad04eeffb89c774d6f3cbec4826fbcc0a9e47f46dbe11fc79ec9c8 - Sigstore transparency entry: 924530388
- Sigstore integration time:
-
Permalink:
TheQmaks/soSaver@2adf95bc5d9b1d857a06bec11282020a86faae35 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/TheQmaks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2adf95bc5d9b1d857a06bec11282020a86faae35 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sosaver-1.0.1-py3-none-any.whl.
File metadata
- Download URL: sosaver-1.0.1-py3-none-any.whl
- Upload date:
- Size: 28.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b9cacb004568a27f7bcd2c8c2269d89a78d45609da46589300740b2438eff3c
|
|
| MD5 |
b233ef16e18b275f3ff9ddfc44584654
|
|
| BLAKE2b-256 |
b62650cbd507b1d132bd8b8b4c559be672b24d9ad45f985db117320e626a8c10
|
Provenance
The following attestation bundles were made for sosaver-1.0.1-py3-none-any.whl:
Publisher:
release.yml on TheQmaks/soSaver
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sosaver-1.0.1-py3-none-any.whl -
Subject digest:
7b9cacb004568a27f7bcd2c8c2269d89a78d45609da46589300740b2438eff3c - Sigstore transparency entry: 924530391
- Sigstore integration time:
-
Permalink:
TheQmaks/soSaver@2adf95bc5d9b1d857a06bec11282020a86faae35 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/TheQmaks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2adf95bc5d9b1d857a06bec11282020a86faae35 -
Trigger Event:
push
-
Statement type: