Skip to content

PermissionDenied on android (API >= 30) #21

@flapili

Description

@flapili

Hi, I have an issue with building an mobile app (using tauri) which get local ip

logs:

I/RustStdoutStderr: thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }', src/lib.rs:86:43
I/RustStdoutStderr: note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
W/tokio-runtime-w: type=1400 audit(0.0:38): avc: denied { bind } for scontext=u:r:untrusted_app:s0:c159,c256,c512,c768 tcontext=u:r:untrusted_app:s0:c159,c256,c512,c768 tclass=netlink_route_socket permissive=0 bug=b/155595000 app=foobar

I'll try to use https://developer.android.com/reference/java/net/NetworkInterface with jni then if it's succesfull I'll try to implement properly and submit a PR :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions