NDK-Socket-IPC
NDK-Socket-IPC copied to clipboard
UDS might not work on Android10
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?
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
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
Yes, it seems that so module need group authority to connect uds
how to solve this problem?