See the top rated post in this thread. Click here

Results 1 to 8 of 8
  1. #1

    Standard "C" library (glibc) for Android ?

    I know that Android doesn't use 'glibc' and instead uses a custom trimmed down "C" library.

    Has anyone compiled the usual Linux 'glibc' on Android ? I know it is not easy, and probably native compilation should be used which implies building native 'gcc' for Android.

    Is it possible to use in parallel the "C" library coming with Android and 'glibc' ?

    Rather, I should first ask whether it is possible to build 'glibc' for Android - the kernel which comes with Android can be trimmed down too.

  2. #2
    This might not answer your question but can be useful info.
    http://www.rfc1149.net/blog/2011/03/...creating-buzz/

    Regards,
    archieval



  3. #3
    Hi, Sergei -

    The "native" library for Android is the Java SDK. You'd be doing yourself a serious disservice if you explored any other alternatives (including the C-language NDK, analogous to Java/SE's "JNI") before familiarizing yourself with it:

    http://developer.android.com/



  4. #4
    Quote Originally Posted by archieval View Post
    This might not answer your question but can be useful info.
    http://www.rfc1149.net/blog/2011/03/...creating-buzz/

    Regards,
    archieval
    No, the article doesn't at all answer any of my concerns.

    The "C" library used in Android is inferior compared to 'glibc', especially, in the threads area. So I want a full fledged 'glibc'. I also vaguely remember that Linux kernel used in Android has some features disabled compared to regular Linux kernel, so this might prevent having full fledged 'glibc'.



  5. #5
    Member
    Join Date
    May 2011
    Posts
    9

    Device(s)
    Galaxy Nexus, Nexus 7
    It is only "inferior" because you aren't supposed to be directly using it. Bionic implements enough threading to get Dalvik working, and not much else.

    From the sound of things, you are attempting to make Android more like a standard Linux system. Getting glibc installed would certainly be the first step in that process, but on a whole, Android is different enough from a standard Linux OS to make it unsuitable for any serious tasks.

    As to whether or not it is possible to get glibc running, I would have to assume it is, but I have not heard of anyone doing it successfully. The choice of going with Bionic was a completely conscious development decision, glibc is too large and efficient for mobile devices, so a stream-lined version was put in it's place. Google also wanted to avoid putting GPL code into the userland. I don't believe there is a technical reason that glibc couldn't be grafted into Android.



  6. #6
    Quote Originally Posted by paulsm4 View Post
    Hi, Sergei -

    The "native" library for Android is the Java SDK. You'd be doing yourself a serious disservice if you explored any other alternatives (including the C-language NDK, analogous to Java/SE's "JNI") before familiarizing yourself with it:

    http://developer.android.com/
    I first familiarized myself with Android. And remotely using Email I helped a guy to compile SoX for Android.

    I'm interested at the moment in everything on Android which is non-Android. E.g. native (C/C++) code development.

    Yes, I'd like to be able to make Android look and feel (in the programming sense of the word) as much as possible regular Linux. It looks like standard C++ library (but not "C") exists: http://www.crystax.net/android/ndk-r4.php .

    And a related issue I'm interested in is native 'gcc' on Android.



  7. #7

    It's there..

    Well, if you're still interested in this question; I did successfully compiled and installed the GLibC into an Android phone - HTC Desire - along with a few linux software. Go check it out at XDA-Developers:

    http://forum.xda-developers.com/show....php?t=1299962


    1 members found this post helpful.

  8. #8
    Quote Originally Posted by theGanymedes View Post
    Well, if you're still interested in this question; I did successfully compiled and installed the GLibC into an Android phone - HTC Desire - along with a few linux software. Go check it out at XDA-Developers:

    http://forum.xda-developers.com/show....php?t=1299962
    Thanks for the update.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •