Skip to content

feat: android support#326

Open
Ludea wants to merge 23 commits intovoidzero-dev:mainfrom
Ludea:android
Open

feat: android support#326
Ludea wants to merge 23 commits intovoidzero-dev:mainfrom
Ludea:android

Conversation

@Ludea
Copy link
Copy Markdown

@Ludea Ludea commented Apr 10, 2026

Add android support

@Ludea Ludea changed the title android support feat: android support Apr 10, 2026
Comment thread crates/fspy/Cargo.toml Outdated
[target.'cfg(all(unix, not(target_env = "musl")))'.dependencies]
fspy_preload_unix = { workspace = true }
#[target.'cfg(all(unix, any(not(target_env = "musl"), not(target_os = "android"))))'.dependencies]
#fspy_preload_unix = { workspace = true }
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fspy needs fspy_preload_unix on macOS and glibc Linux

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ipc channel is only used by LD_PRELOAD. Since we won't use that in android (same as musl), we don't need to fix it for android. You can completely skip compiling this module.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. I've gated them in #327 and #328. You can now try adding not(android) to the cfg and removing the code changes to the ipc module.

Copy link
Copy Markdown
Author

@Ludea Ludea Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, I excluded ipc module, like musl host

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you try adding not(target_os = "android") to

#[cfg(not(target_env = "musl"))]
? That way we won't need any changes under fspy_shared/src/ipc.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you undo all the changes in ‎crates/fspy_shared/src/ipc/channel? Thanks.

They aren't necessary since the channel module is properly gated.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, crates/fspy_shared/src/ipc/channel content (mod.rs and shm_io.rs) is the same as main branch

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

crates/fspy_shared/src/ipc/channel/mod.rs still contains lots of code changes, and they cause the CI failures. Could you undo them all?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better?

@branchseer
Copy link
Copy Markdown
Member

branchseer commented Apr 17, 2026

Looks like the macOS test failures come from the gate change in crates/fspy_preload_unix/src/lib.rs, where you narrowed unix down to linux:

-#[cfg(all(unix, not(target_env = "musl")))]
+#[cfg(all(target_os = "linux", not(target_env = "musl")))]
 mod client;  // same for interceptions, libc, macros

On macOS that makes the preload crate compile empty, so DYLD_INSERT_LIBRARIES still injects the dylib into Node but it hooks nothing, and the fs calls just pass through.

Probably want all(unix, not(target_os = "android"), not(target_env = "musl")) there.

@branchseer
Copy link
Copy Markdown
Member

@copilot resolve the merge conflicts in this pull request

@branchseer
Copy link
Copy Markdown
Member

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 747e02555e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/fspy_shared_unix/src/spawn/linux/mod.rs
@branchseer branchseer force-pushed the android branch 2 times, most recently from 531e41d to 6da9e9a Compare April 22, 2026 02:54
@branchseer branchseer force-pushed the android branch 2 times, most recently from c0cf7c7 to 09fa2e7 Compare April 23, 2026 01:15
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