0

Please help. I'm working with Android marshmallow (6.0) source code and I need a linux message queue and shared memory related system call support for an application to port. Formerly I was using Kitkat source code and in that it was working.

The steps I did for that is:

  1. Added syscalls in /BSP/Bionic/libc/SYSCALLS.TXT
  2. Generated asm stubs using gensyscalls.py script.
  3. Compiled without error libc but the libc.so generated is not containing the added symbols.

Thanks in advance.

Syscalls added in /BSP/Bionic/libc/SYSCALLS.TXT:

  • int semctl(int semid, int semnum, int cmd, ...) all
  • int semget(key_t key, int nsems, int semflg) all
  • int semop(int semid, struct sembuf* sops, size_t nsops) all
  • void* shmat(int shmid, const void* shmaddr, int shmflg) all
  • int shmctl(int shmid, int cmd, struct shmid_ds* buf) all
  • int shmdt(const void* shmaddr) all
  • int shmget(key_t key, size_t size, int shmflg) all
  • int msgctl(int msqid, int cmd, struct msqid_ds *buf) all
  • int msgget(key_t key, int msgflg) all
  • int msgrcv(int msqid, void* msgp, size_t msgsz, long int msgtyp, int msgflg) all
  • int msgsnd(int msqid, const void* msgp, size_t msgsz, int msgflg) all
buczek
  • 2,011
  • 7
  • 29
  • 40
arunpm
  • 1
  • 1
  • 1
    Rather than re-invent the wheel here and create your own kernel and libc changes, you should use `Binder` (message/transaction based exchange) and `ashmem` (shared memory between processes.) Both are available in all builds of Android and properly handle security and resource management in Android's lifecycle model. – Larry Schiefer May 04 '16 at 16:41
  • Thanks Larry, The application which i'm planning to port needs these. Thats why I'm going with this implementation. Otherwise need to redesign the entire application.Anyway; found a solution by adding the syscalls in libc.maps and rebuilding it. – arunpm May 19 '16 at 14:58

0 Answers0