- Kotlin 100%
|
|
||
|---|---|---|
| .github/workflows | ||
| apps/example | ||
| gradle/wrapper | ||
| .gitignore | ||
| gradlew | ||
| gradlew.bat | ||
| LICENSE | ||
| manifest.toml | ||
| NOTICE | ||
| README.md | ||
| settings.gradle.kts | ||
Reseam patch bundle template
Start here to write your own patches for Reseam. Copy this repository, rename a few things, and you have a bundle that builds, signs itself, and publishes releases Reseam Manager can install.
It ships two example patches that work on any app:
Enable debuggingedits the manifest.Allow screenshotsredirects calls into Kotlin code shipped in the bundle (an extension).
The docs walk through this template step by step.
Setup
- JDK 17.
- Android SDK, with
ANDROID_HOMEpointing at it. - The
reseamCLI, onPATHor at the path inRESEAM_BIN. Use the version that matches the plugin version insettings.gradle.kts. Releases ship Linux x64 and Windows x64 binaries; on other platforms build it from source. - A signing key:
reseam bundle keygen --out ~/.reseam/bundle-signing.key. It prints the public key users will trust. Keep the key file private and out of the repository.
Make it yours
- Set
name,author, anddescriptioninmanifest.toml, androotProject.nameinsettings.gradle.kts. - Rename
apps/exampleto the app you patch and change theapp.examplepackages to your own. - Replace the example patches with your own.
Layout:
manifest.toml bundle name, author, description
settings.gradle.kts Reseam plugin version
apps/<app>/patch/ Kotlin patches, one module per app
apps/<app>/extensions/<name>/ Kotlin code injected into the app
apps/<app>/settings/ in-app settings and translated strings (optional)
shared/<name>/ extensions used by more than one app
Modules need no build script. The app.reseam.workspace plugin configures them from the layout. How to write patches is in Your first patch.
Build and test
./gradlew bundle
reseam bundle list build/reseam/example-patches.reseam
reseam patch app.apk \
--bundle build/reseam/example-patches.reseam \
--trust <public key> \
--enable "Enable debugging" \
--output patched.apk
Release
The workflow in .github/workflows/release.yml runs on v* tags, on GitHub and on Forgejo, including Codeberg. It builds and signs the bundle, then reseam release patches adds the release to the patches.json of your latest release with the commit subjects since the previous tag as its notes, and publishes both on a release.
- Add the signing key as the repository secret
BUNDLE_SIGNING_KEY_B64:base64 -w0 ~/.reseam/bundle-signing.key. - On Forgejo, set the repository variable
RUNNERto the label of a runner with Java and Node.js. GitHub usesubuntu-latest. - Push a tag:
git tag v0.1.0 && git push origin v0.1.0.
Share your patch source with this link. It opens Reseam Manager, which shows the source's apps, patches and signing key before adding it, and keeps it up to date from your latest release. Every release lists the link too.
https://reseam.app/add/?url=https%3A%2F%2Fgithub.com%2F<owner>%2F<repo>
Without Reseam Manager, the link opens a page with the steps to add the source. Publish your public key where users can check it against the one Reseam Manager shows.
When you move to a new Reseam version, bump the plugin version in settings.gradle.kts. The release workflow downloads the CLI of that same version.
License
AGPL-3.0-or-later, with additional terms under section 7 in NOTICE.