* * *

Author Topic: Android - socket accept function (A/libc: Fatal signal 31 (SIGSYS))  (Read 1443 times)

kim yun-tae

  • Newbie
  • Posts: 1
I am writing an Android program using indy Component. Since the Android oreo version, the accept function does not work because of security.

This can be found at https://android.googlesource.com/platform/bionic.git/+/master/libc/SYSCALLS.TXT.

I want to know how to use the accept4 function. Or I want to know how to use server sockets in Android on oreo version.

Thank you.

tool, laz4Android
indy, 10.2.0.3
« Last Edit: April 07, 2018, 08:27:49 pm by kim yun-tae »

madmai

  • New member
  • *
  • Posts: 15
Re: Android - socket accept function (A/libc: Fatal signal 31 (SIGSYS))
« Reply #1 on: April 29, 2018, 03:52:20 am »
hi, can explain me how uses indy compnents in laz4droid?, thanks in advance

Remy Lebeau

  • Sr. Member
  • ****
  • Posts: 464
    • Lebeau Software
I am writing an Android program using indy Component. Since the Android oreo version, the accept function does not work because of security.

Are you referring to this?

Android 8.0 Behavior Changes | Security

Quote
Android 8.0 (API level 26) applies a Secure Computing (SECCOMP) filter to all apps. The list of allowed syscalls is restricted to those exposed through bionic. Although there are several other syscalls provided for backwards compatibility, we recommend against their use.

This can be found at https://android.googlesource.com/platform/bionic.git/+/master/libc/SYSCALLS.TXT.

accept4() is on that list, and accept() is just a wrapper for accept4(), so it should work.  So what is the actual problem?

I want to know how to use the accept4 function. Or I want to know how to use server sockets in Android on oreo version.

Are you saying that Indy's TIdTCPServer and TIdSimpleServer components do not work on Android OREO?

indy, 10.2.0.3

That is a VERY old version of Indy, and predates any support for Android in Indy.  At the time of this writing, the latest version is 10.6.2.5455.  You really need to upgrade.  Indy 10.6.2 is available in Lazarus' Online Package Manager.
Remy Lebeau
Lebeau Software - Owner, Developer
Internet Direct (Indy) - Admin, Developer (Support forum)

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus