Discussion:
Problems about AHardwareBuffer_sendHandleToUnixSocket and AHardwareBuffer_recvHandleFromUnixSocket
(too old to reply)
lala chen
2018-08-16 05:49:18 UTC
Permalink
Hi all,

I encounter some problems when I use AHardwareBuffer_sendHandleToUnixSocket
and AHardwareBuffer_recvHandleFromUnixSocket.

The first problem is that I get the result *'permission denied' *when I use
function connect.

I find a solution via setting the SELinux mode to permissive. But it seems
unsafe. Do I have another solution?

The second problem occur after I set the SELinux mode to permissive. The
connection is found successfully.

But I get the result -22 returned by AHardwareBuffer_sendHandleToUnixSocket
in client service and

the AHardwareBuffer_recvHandleFromUnixSocket return -38 in server APP.

What are those error return value means?


B.R.
LaChen
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/4d804e61-9210-495c-bbf0-760d8246f188%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
lala chen
2018-08-17 05:18:37 UTC
Permalink
Hi, all

I found the error about second problem.

I forget input allocated hardwarebuffer into function
AHardwareBuffer_sendHandleToUnixSocket.

So it return EINTVAL.

B.R.
LaChen

lala chenæ–Œ 2018幎8月16日星期四 UTC+8䞋午10時57分28秒寫道
Post by lala chen
Hi all,
I encounter some problems when I use
AHardwareBuffer_sendHandleToUnixSocket and
AHardwareBuffer_recvHandleFromUnixSocket.
The first problem is that I get the result *'permission denied' *when I
use function connect.
I find a solution via setting the SELinux mode to permissive. But it seems
unsafe. Do I have another solution?
The second problem occur after I set the SELinux mode to permissive. The
connection is found successfully.
But I get the result -22 returned
by AHardwareBuffer_sendHandleToUnixSocket in client service and
the AHardwareBuffer_recvHandleFromUnixSocket return -38 in server APP.
What are those error return value means?
B.R.
LaChen
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/708b608f-d348-4636-9b86-930687a26d94%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...