From 1f2b211ef23164046e01ada01b4389e2ef5e3d95 Mon Sep 17 00:00:00 2001 From: Martin Marmsoler Date: Mon, 10 Nov 2025 18:44:24 +0100 Subject: [PATCH 1/2] Signature description --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index b6df0f7e..d4885dee 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,13 @@ info: component 'rust-std' for target 'aarch64-linux-android' is up to date ![x](https://user-images.githubusercontent.com/741807/162616805-30b48faa-84f0-4fec-851a-4c94fd35c6bd.png) +## Signing apks + +xbuild is able to automatically signing the file. For this a pem certificate must be available. +- Specify as argument with `--pem ` +- Store the content of a pem in the environment variable `X_PEM`. +The pem file can be created described in the [Signer](https://docs.rs/xcommon/latest/xcommon/struct.Signer.html) section of the documentation + ## Troubleshooting ### Command not found From 6f4362d20bbf461adb2b6b0d53a9b4710b783f4b Mon Sep 17 00:00:00 2001 From: Martin Marmsoler Date: Mon, 10 Nov 2025 19:21:08 +0100 Subject: [PATCH 2/2] Add possibility to sign apk's created by gradle --- xbuild/src/command/build.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/xbuild/src/command/build.rs b/xbuild/src/command/build.rs index 363b054c..2f2124b3 100644 --- a/xbuild/src/command/build.rs +++ b/xbuild/src/command/build.rs @@ -197,6 +197,7 @@ pub fn build(env: &BuildEnv) -> Result<()> { if env.target().android_gradle { crate::gradle::build(env, libraries, &out)?; + Apk::sign(&out, env.target().signer().cloned())?; runner.end_verbose_task(); return Ok(()); } else {