Skip to main content
Filter by
Sorted by
Tagged with
2 votes
1 answer
108 views

I'm having performance issues on Android when sem_posting on a contended semaphore with a somewhat large number of (pshared) waiters. What I'm trying to do is to spawn a large number of processes, ...
LaomaiWeng's user avatar
0 votes
1 answer
110 views

Android bionic defines a series of structs that are used specifically to handle kernel level uapi data, like sysinfo.h header which defines a struct called sysinfo that defines registers for kernel &...
user30722934's user avatar
4 votes
1 answer
288 views

As it is already painfully known, modifying the process environment in a multi-threaded application during runtime is asking for trouble. However, not always we can control who accesses that. In this ...
The Storm's user avatar
  • 190
-1 votes
1 answer
374 views

Introduction In a log output of a crash, there is an error with backtrace output as: #00 pc 00038cf0 /apex/com.android.runtime/lib/bionic/libc.so (__futex_wait_ex(void volatile*, bool, int, bool, ...
Mauricio Schalch's user avatar
2 votes
1 answer
2k views

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 ...
ammyvns's user avatar
  • 21
1 vote
1 answer
313 views

According to ISO C standard (ISO/IEC 9899), printf function contains "%n" format to count the number of output characters. n: The argument shall be a pointer to signed integer into which is ...
stanchcorder6's user avatar
6 votes
2 answers
2k views

Note: Symbols are showing up in crashlytics for our c++ library, the problem is that they aren't showing for system libraries like libc, libart, libbase, and libandroid_runtime. We have some tricky ...
Andrew Stromme's user avatar
5 votes
1 answer
3k views

For glibc you can find an online documentation here. I am looking for an equivalent documentation for Android's libc implementation (headers located under sysroot/usr/include). Is there a ...
zomega's user avatar
  • 2,434
2 votes
1 answer
355 views

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' /...
Anonymix321's user avatar
0 votes
1 answer
330 views

I know that these 2 functionalities are not provided by Bionics libc implementation. I do need these for a C++ to Android port. How can I solve this problem? I dont know where to start here. I get ...
tjk's user avatar
  • 13
0 votes
0 answers
107 views

Application is supporting to 32bit. Facing issue while migrating from 32bit (armeabi-v7a) to 64bit (arm64-v8a). Issue - assertion "orig___sfp" failed In project, using two symbol __sfp and ...
Bhumika Mehta's user avatar
1 vote
1 answer
883 views

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 ...
Novice's user avatar
  • 580
1 vote
1 answer
1k views

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 '...
akbar_ahmad's user avatar
0 votes
0 answers
104 views

I am writing a code that requires changing the functions in the Bionic that access resources such as the camera, microphone, location, contacts, and more (for academic research purposes). I am having ...
Shira Berman's user avatar
0 votes
0 answers
318 views

I am trying to port a code that uses glibc into Android NDK and running into some issues related to mutexes. Currently our code uses mutex.__data.__count to cycle through all the locks, and release ...
Nas Makkiya's user avatar
3 votes
0 answers
456 views

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. ...
A. Zhabolenko's user avatar
0 votes
1 answer
488 views

I'm wondering if Android has an option for user to enable LD_DEBUG-style logs for Zygote-spawned processes. Probably we can not start app_process for Zygote with customized environment without being a ...
Sergio's user avatar
  • 8,239
1 vote
1 answer
558 views

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 ...
Saty Anand's user avatar
2 votes
0 answers
465 views

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 ...
user7718036's user avatar
1 vote
1 answer
240 views

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 ...
user7718036's user avatar
0 votes
1 answer
676 views

So each entry in maps file has start and end addresses where they were mmap'ed. If a library is dynamically loaded (maybe using dlopen()), would the addresses of previous entries be affected in any ...
sg1993's user avatar
  • 345
1 vote
1 answer
310 views

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 ...
ransh's user avatar
  • 1,742
1 vote
0 answers
153 views

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/...
Michele Zanella's user avatar
1 vote
1 answer
2k views

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 ...
rumpel's user avatar
  • 8,358
0 votes
0 answers
405 views

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 ...
arunpm's user avatar
  • 1
6 votes
2 answers
1k views

As you may know, Bionic is a C library used by Google to run Android applications. There are efforts to compile it in Linux machines, so it could be easily used outside Android. This is the code from ...
Ho1's user avatar
  • 1,289
2 votes
2 answers
712 views

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 ...
prasannatsm's user avatar
2 votes
1 answer
3k views

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 ...
re3el's user avatar
  • 785
1 vote
0 answers
251 views

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 ...
prinsen's user avatar
  • 779
2 votes
0 answers
801 views

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 ...
reactive-core's user avatar
1 vote
1 answer
830 views

I am experimenting on alternate signal stack(man sigaltstack). Two pieces of code allocating stack differently: int method1(void) { struct sigaction act, oldact; memset(&act, 0, sizeof(...
Sandeep's user avatar
  • 19.8k
1 vote
2 answers
778 views

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 ...
olegst's user avatar
  • 1,297
0 votes
1 answer
420 views

I've got a function int foo() { ... char* real_path_buffer = (char*)malloc(sizeof(char)*PATH_MAX); realpath("a/certain/path/that/doesnt/exist", real_path_buffer); ... } That makes a ...
Reuben Tanner's user avatar
3 votes
0 answers
643 views

I have a cross platform library and use posix_spawn from libc to spawn new processes on Linux'y environments. However this is not included in the Bionic libc library included on Android. Is there an ...
Jan Jongboom's user avatar
  • 27.5k
-1 votes
1 answer
131 views

Recently, I'm reading the libc-init code of android. When I read the code in malloc_debug_leak.cpp, line 70 and line 263, it said as follows. #define GUARD 0x48151642 static uint32_t ...
Jinye.Dou's user avatar
1 vote
1 answer
1k views

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 ...
user avatar
10 votes
3 answers
903 views

I'm trying to implement a native shared library(.so) for the Android system. Naturally, there are some code blocks that need to be thread-safe. I found out here that pthreads locks, mutexes, or ...
sundie's user avatar
  • 245
2 votes
4 answers
9k views

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 = ...
stdcall's user avatar
  • 29.2k
3 votes
1 answer
2k views

I just wrote a small c file and its header file. dev_access.c and dev_access.h I want to link it to the bionic library in android and create a statically/dynamically linked archive file. My files ...
preetam's user avatar
  • 1,619
1 vote
1 answer
1k views

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(...
KrisWebDev's user avatar
  • 9,522
3 votes
1 answer
2k views

I have large project which needs futimes or futimens function. Unfortunately there are no such functions in header files in android ndk include folder. Is there a work-around (stub or simple code ...
4ntoine's user avatar
  • 20.6k
0 votes
2 answers
1k views

I'm trying to dynamically load a specific shared library using dlopen() in lazy mode. There are of course unresolved symbols in the shared library, but the lazy mode supposed to ignore them. It does ...
stdcall's user avatar
  • 29.2k
1 vote
2 answers
1k views

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:...
Laser's user avatar
  • 7,030
1 vote
1 answer
3k views

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's user avatar
  • 7,030
1 vote
2 answers
643 views

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 ...
user2451629's user avatar
2 votes
1 answer
408 views

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 ...
nitzanms's user avatar
  • 1,718
2 votes
0 answers
231 views

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 ...
Sam's user avatar
  • 344
2 votes
1 answer
617 views

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; ...
mcmlxxxvi's user avatar
  • 1,419
4 votes
2 answers
562 views

I found interesting moment: the atexit() function works differently for bionic and glibc. Here is an example: #include <cstdlib> #include <cstdio> extern "C" { void one(){ printf("...
Laser's user avatar
  • 7,030
2 votes
1 answer
4k views

Hi i have some problems with optimization. I tried to compile one of gcc test with builtin functions: #include <stdio.h> #ifdef HAVE_C99_RUNTIME double test1 (double x) { return ...
Laser's user avatar
  • 7,030