android_of_theseus/theseus_autopatcher
2025-11-19 19:24:42 +01:00
..
src/theseus_autopatcher fix bugs 2025-04-18 15:43:31 +02:00
.gitignore use inria gitlab as source 2025-04-07 16:06:12 +02:00
build.sh wip 2025-04-07 15:40:51 +02:00
poetry.lock make it optionnal to ignore matplotlib 2025-04-08 12:12:25 +02:00
pyproject.toml add license 2025-11-19 19:24:42 +01:00
README.md make it optionnal to ignore matplotlib 2025-04-08 12:12:25 +02:00
test.sh fix bugs 2025-04-18 15:43:31 +02:00

Android Theseus Patcher

This is mostly glueware between the theseus frida python package (used to get runtime information) and the theseus patcher (rust binary used tp patch the apk).

This package embed the patcher binary for ease of use. The embedded version is build for linux x86_64, statically linked to musl. For other target platform (windows, arm, ect), a different patcher binary can provided at runtime.

Build

TODO: use nix build the project

Before building this package, the patcher binary must be built with the musl target. This require the x86_64-unknown-linux-musl to be installed, as well as musl-gcc:

rustup target add x86_64-unknown-linux-musl
doas pacman -S musl

Build the patcher:

cd ../patcher
cargo build --release --target=x86_64-unknown-linux-musl
cd -

Copy to patcher to the python directory:

cp ../patcher/target/x86_64-unknown-linux-musl/release/patcher src/theseus_autopatcher/patcher_86_64_musl

Build the package:

poetry build

Install

Once all the build steps are done, you can install the package with pip install dist/theseus_autopatcher-0.1.0-py3-none-any.whl.

If you use an external patcher binary (with the --patch option), you can skip the build steps and pip install ..

If you have access to the grodd repo, you can use the grodd automatic app runner, by the project with the grodd extra:

pip install dist/theseus_autopatcher-0.1.0-py3-none-any.whl[grodd,no-plt] or pip install .[grodd,no-plt]

(The no-plt extra replace the matplotlib that can problematic on some system with a dummy package. The package is needed because androguard uses it on a feature that really should be optional)