Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UDS might not work on Android10 #2

Open
ylz-at opened this issue Mar 11, 2021 · 4 comments
Open

UDS might not work on Android10 #2

ylz-at opened this issue Mar 11, 2021 · 4 comments

Comments

@ylz-at
Copy link

ylz-at commented Mar 11, 2021

I tried to copy-paste the code of the UDS server part and test it on Android 10 (device: Note20 Ultra),
and got the error: bind Read-only file system.

        minSdkVersion 29
        targetSdkVersion 30

Could you please try to update the demo and see if it works on API level >=29?

@ylz-at
Copy link
Author

ylz-at commented Mar 11, 2021

My bad...
Yes, it works on Android10

I typed

strncpy(server_addr.sun_path, socket_name, sizeof(server_addr.sun_path) - 1);

as

strncpy(server_addr.sun_path, SOCKER_NAME, sizeof(server_addr.sun_path) - 1);

lol

@ylz-at ylz-at closed this as completed Mar 11, 2021
@ylz-at
Copy link
Author

ylz-at commented Mar 11, 2021

not really works on the client-side.

2021-03-11 15:55:54.637 22278-22278/com.example E/example: connect: Permission denied
2021-03-11 15:40:18.528 749-749/? E/audit: type=1400 audit(1615448418.523:10804): avc:  denied  { connectto } for  pid=20579 comm="ase.example" path=000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 scontext=u:r:untrusted_app:s0:c16,c257,c512,c768 tcontext=u:r:untrusted_app:s0:c17,c257,c512,c768 tclass=unix_stream_socket permissive=0 SEPF_SM-N986U_10_0019 audit_filtered

@ylz-at ylz-at reopened this Mar 11, 2021
@frankgogoland
Copy link

Yes, it seems that so module need group authority to connect uds

@ouclbc
Copy link

ouclbc commented Mar 15, 2023

how to solve this problem?

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

No branches or pull requests

3 participants