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
2
votes
0 answers

How to use shared library from Android on Raspberry Pi

I have closed-source shared library originally built for Android which I want to use on Raspberry Pi. The problem is this: /usr/bin/ld: /usr/lib/libfoo.so: undefined reference to `__cxa_atexit@LIBC' /usr/bin/ld: /usr/lib/libfoo.so: undefined…
Anonymix321
  • 107
  • 6
2
votes
0 answers

Does Ubuntu 18.04 boost include lzma support?

I have a piece of C++ software that uses a bzip2 decompressor on a boost::iostreams::filtering_istreambuf. This works well. I now tried to change it to also support lzma decompression. The corresponding include file seems to be there in my ubuntu…
user52366
  • 1,035
  • 1
  • 10
  • 21
2
votes
0 answers

Cross-compiling of C code for Android

I cross-compiled my C application for Android ARM with arm-linux-gnueabi tool under Ubuntu 16.04 LTS. I compiled it with static linking flag. This C application is big and it has complicated makefile. It compiled successfully without any errors. But…
2
votes
0 answers

sendmsg socket system call parameters in bionic libc (android)

I was going through the bionic libc socket system calls and noticed something confusing. The android/bionic/libc/include/sys/socket.h has a system call declaration for sendmsg as __socketcall int sendmsg (int, const struct msghdr*, int); Whereas in…
2
votes
2 answers

How to stop android system and launch a particular application in Android

I have written an application in C, statically linked without using any android services or framework. It just uses API provided by kernel and libc. I want to stop all android services, framework and just launch my application when some event…
prasannatsm
  • 900
  • 1
  • 11
  • 19
2
votes
1 answer

How to add libc to android application?

I am writing a C code which I wish to run in android using ndk. I have glibc library in the code which as I understood is difficult to port directly. Hence I tried to use libc instead from the bionic repository in github. I am facing numerous errors…
re3el
  • 735
  • 2
  • 12
  • 28
2
votes
0 answers

Using a new method in latest Android NDK libc

I'm using the latest version of the NDK (as of a few weeks ago), r10d, and using the build tools to build python and some extensions in python. Using the build tools, I create a shared object that then gets linked into my project in Android Studio.…
reactive-core
  • 1,071
  • 1
  • 7
  • 15
2
votes
3 answers

reset sigaction to default

In Android the bionic loader sets a default signal handler for every process on statrtup: void debugger_init() { struct sigaction act; memset(&act, 0, sizeof(act)); act.sa_sigaction = debugger_signal_handler; act.sa_flags =…
stdcall
  • 27,613
  • 18
  • 81
  • 125
2
votes
2 answers

bionic (android libc) mutex variants

Which types of mutex does bionic libc support? recursive timed adaptive errorchecking
osgx
  • 90,338
  • 53
  • 357
  • 513
2
votes
1 answer

Minimal set of files required to build Android's bionic

I made some changes to Android's bionic in order to run it with a specific application. I'd like to keep these modifications in my source control (SVN). Any idea what the minimal set of files required to still be able to build bionic with Android's…
nitzanms
  • 1,786
  • 12
  • 35
2
votes
0 answers

How can I use Standard C libraries that are not supported in the Bionic C library to build with Android-NDK?

My native source makes use of complex operations (defining ). These operations are implemented in the standard C99 math library but not in the bionic math library used by Android-NDK. For this reason I would like to make use of the Standard Math…
Sam
  • 314
  • 3
  • 8
2
votes
1 answer

Using time(NULL) on Android

Is there any known problem with using time(NULL) on Android? I tried running the following piece of code: int32_t now1 = time(NULL); int64_t now1_6 = (int64_t)time(NULL); int32_t nt = (time_t)-1; int64_t nt6 = (int64_t)-1; And then log the result…
mcmlxxxvi
  • 1,358
  • 1
  • 11
  • 21
2
votes
1 answer

Difference between glibC and bioniC

Hi i have some problems with optimization. I tried to compile one of gcc test with builtin functions: #include #ifdef HAVE_C99_RUNTIME double test1 (double x) { return __builtin_pow (x, 1/3); } double test2 (double x) { return…
Laser
  • 6,652
  • 8
  • 54
  • 85
2
votes
2 answers

How to understand this code snippet in the bcopy.c of bionic?

I read the memcpy implementation in the http://androidxref.com/4.0.4/xref/bionic/libc/string/bcopy.c find following code is hard to understand, can anybody explain it? 36 /* 37 * sizeof(word) MUST BE A POWER OF TWO 38 * SO THAT wmask BELOW IS…
Victor S
  • 4,021
  • 15
  • 43
  • 54
1
vote
1 answer

Can we use glibc instead of Bionic in Android?

Considering No licensing issue, enough memory and processing power can we switch back to glibc for Android from Bionic? What are those functionalities are there in bionic which are not available with glibc?
ammyvns
  • 11
  • 2