Skip to content

Added android support.#257

Draft
AzulEterno wants to merge 1 commit into
domcyrus:mainfrom
AzulEterno:main
Draft

Added android support.#257
AzulEterno wants to merge 1 commit into
domcyrus:mainfrom
AzulEterno:main

Conversation

@AzulEterno
Copy link
Copy Markdown

Screenshot_2026-05-10-17-31-22-43_19c728251d09c0fe78c67e02832626d9

Add advanced android user support. Only tested on root user execution.

@domcyrus
Copy link
Copy Markdown
Owner

@AzulEterno Thanks a lot for your contribution!

Before going into details about the PR, I think one thing worth checking: RustNet already ships Android binaries. The workflow is .github/workflows/build-android-static.yml and the install path is documented under "Android (Termux) Installation" in INSTALL.md. Those artifacts are built as Linux-musl (aarch64-unknown-linux-musl, armv7-unknown-linux-musleabihf, etc.) with --no-default-features, so eBPF and Landlock are already disabled in shipping Android builds. Did you try the released rustnet-vX.Y.Z-aarch64-linux-android-musl.tar.gz on your device first?

One specific question on the clipboard piece: does pressing the copy key in the current shipping binary on Termux actually fail for you (error, crash, no-op)? arboard needs X11/Wayland/Win32 and the wl-copy fallback won't help in Termux either, so I can see this being a real bug worth fixing even if the rest of the PR isn't needed. If so, we might be able to handle it without an target_os = "android" cfg, for example by showing the "copied (log only)" message whenever Clipboard::new() fails on Linux targets.

@AzulEterno
Copy link
Copy Markdown
Author

Actually, this is patch serves different purpose for generic linux android musl version. Musl version usually runs within provided musl lib c by termux (Or other alpine proot env), Provided patch version is built against android ndk toolkit, which uses native android bionic libc bindings. So it can run natively even in Android system opened shell without musl support. Althrough it's kind of limited user scope (Only tested in root priviledge since it might use bpf feature and need Android sdk >= 28 for some feature support.) So it's more sort of "Native" android support. I think it has it's merits but final decision it's up to you.

@AzulEterno
Copy link
Copy Markdown
Author

Regarding the clipboard issue, I would further investigate it. I remembered it as failing because some features were missing in native android glibc. I will report when I have more intel on this.

@AzulEterno AzulEterno marked this pull request as draft May 12, 2026 07:28
@domcyrus
Copy link
Copy Markdown
Owner

Regarding android support that sounds good to me. I'll go through your PR and I think a couple things we might need to address but if this helps some users on android I think it is a good contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants