Questions tagged [bionic]

Bionic is a C language support library (libc), written by Google for its Android Operating System. It is BSD licensed, small and fast.

Some information about it you can get on http://codingrelic.geekhold.com/2008/11/six-million-dollar-libc.html page

63 questions
1
vote
1 answer

Does NDK support C++14?

Currently working on something where I need to develop some feature using C++14, but still wondering on whether it can be supported by Bionic & NDK?? From Bionic Wiki Status, C++11 featureshas been implemented/included into Bionic. Only catch is, it…
Novice
  • 540
  • 2
  • 8
  • 21
1
vote
1 answer

android libuv use of undeclared identifier 'EPOLL_CLOEXEC'

i'm trying to build libuv for android in android studio cmake and i get the following errors: error: use of undeclared identifier 'EPOLL_CLOEXEC' warning: implicit declaration of function 'epoll_pwait' [-Wimplicit-function-declaration] warning:…
1
vote
1 answer

Is there no pthread library in bionic libc?

I'm using a toolchain to cross compile some library which is dependent on lpthread for android. It had bionic version of libc. It says lpthred cannot be found and there is no libpthread.so to be found in the toolchain. So is there no pthread library…
Saty Anand
  • 480
  • 3
  • 11
1
vote
1 answer

How to get uid in bionic libc?

I am trying to get the uid of the process calling dns files in bionic libc. I know using current->cred->uid.val is used to get the uid in android/linux kernel, but how to get the uid in bionic libc. I don't think the same will work. Can you please…
1
vote
1 answer

Why only static build run on Android?

I build some applications for android without using Android studio & NDK. I've noticed that if I build them without "-static" arguments, then Android fails to run them. I could not find the reason for that documented anywhere, though I guess that it…
ransh
  • 1,589
  • 4
  • 30
  • 56
1
vote
0 answers

Bionic toolchain ld relocatable object file issue

I'm trying to cross-compile for Arm-android the GRPC C++, during the linking of some libraries I've got these errors from ld: arm-linux-androideabi-ld: error: /grpc/objs/opt/src/cpp/client/client_context.o: requires unsupported dynamic reloc…
1
vote
1 answer

Bionic and libc’s stub implementations

I’d like to run an x86 shared library that I grabbed from an apk on a non-android linux machine. It’s linked against android libc, so I grabbed the libc.so from the android ndk. After debugging segfaults for a while, I figured that libc.so is…
rumpel
  • 7,870
  • 2
  • 38
  • 39
1
vote
0 answers

Missing functions in Bionic

Im cross compiling haskell to run on Android. After some days of struggling my only remaining problem is that libc on Android (Bionic) is missing some functions found in glibc. More precisely getnetent, setnetent, endnetent, getprotoent,…
prinsen
  • 748
  • 6
  • 16
1
vote
2 answers

Process-shared mutexes and conditional variables in Android

Does Android support process-shared mutexes and condition variables? I've heard bionic implementation doesn't support them because Android has other means of IPC, but cannot find information that would either confirm or deny it. The sources are a…
olegst
  • 1,209
  • 1
  • 13
  • 33
1
vote
1 answer

Android Bionic and Libc libraries

I want to create small command interpreter for android (shell). It should perform only few features : 'scanf','printf','cd', 'pwd', 'echo','set', 'unset', 'exit' and should support internal path variables : 'path', 'home', 'status'. Is it possible…
user3991417
1
vote
1 answer

ualarm() equivalent (Android Bionic libc)

ualarm() is not implemented in Android version of libc, bionic (check Bionic unistd.h). Moreover, ualarm() is obsolete. I am porting an application on Android NDK so I need an equivalent of ualarm(999999,999999), i.e. something that would send a…
KrisWebDev
  • 9,342
  • 4
  • 39
  • 59
1
vote
2 answers

rand() function Bionic vs glibc

I found that rand() function from bionic does't work without including stdlib.h extern int rand(void); static void foo() { int a = rand(); } int main() { foo() return 0; } Results for glibc: Compilation successful Results for…
Laser
  • 6,652
  • 8
  • 54
  • 85
1
vote
1 answer

Rebuilding part of Android (libc)

I've downloaded sources from http://source.android.com, and build them as in instruction. But now I want to rebuild only Bionic libc. Is it possible, without full build process?
Laser
  • 6,652
  • 8
  • 54
  • 85
1
vote
2 answers

dalvik segfault on embedded linux

all. I'm trying to get dalvikVM running on embedded linux. I use xilinx-linux for zynq-zc702 running on qemu. I followed this tutorial: http://www.bolatdinc.com/?p=336&cpage=1 I ported ashmem and logger to my linux kernel and compiled dalvik for…
1
vote
1 answer

Why does memcmp have duplicated lines in bionic?

I found memcmp.c in bionic is like this: 30 int memcmp(const void *s1, const void *s2, size_t n) 31 { 32 const unsigned char* p1 = s1; 33 const unsigned char* end1 = p1 + n; 34 const unsigned char* p2 = s2; 35 int …
Victor S
  • 4,021
  • 15
  • 43
  • 54