Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7009645
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:53:20+00:00 2026-05-27T21:53:20+00:00

Is it possible to check which shared libraries are loaded by the calling process

  • 0

Is it possible to check which shared libraries are loaded by the calling process from another shared library (.so)? I know there are command line tools for that, but is it possible to perform such a check in C++ code?

I need to somehow get the list of native shared libraries loaded by an Android application, but it doesn’t seem to be possible from a Java code.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T21:53:20+00:00Added an answer on May 27, 2026 at 9:53 pm

    You could use /proc/<pid>/maps file or just /proc/self/maps for the calling process: lines that ends with ‘.so’ are for linked shared libraries. It’s a hack, but should work. Note that one library could be mapped multiple times so you need to skip the repetitions.

    And good news: you could do it from java. The code snippet below prints shared libraries for the current process to the logcat.

    try {
        Set<String> libs = new HashSet<String>();
        String mapsFile = "/proc/self/maps";
        BufferedReader reader = new BufferedReader(new FileReader(mapsFile));
        String line;
        while ((line = reader.readLine()) != null) {
            if (line.endsWith(".so")) {
                int n = line.lastIndexOf(" ");
                libs.add(line.substring(n + 1));
            }
        }
        Log.d("Ldd", libs.size() + " libraries:");
        for (String lib : libs) {
            Log.d("Ldd", lib);
        }
    } catch (FileNotFoundException e) {
        // Do some error handling...
    } catch (IOException e) {
        // Do some error handling...
    }
    

    The output on my device is:

    D/Ldd     (11286): 55 libraries:
    D/Ldd     (11286): /system/lib/libc.so
    D/Ldd     (11286): /system/lib/libdbus.so
    D/Ldd     (11286): /system/lib/librpc.so
    D/Ldd     (11286): /system/lib/libEGL.so
    D/Ldd     (11286): /system/lib/libstagefright_color_conversion.so
    D/Ldd     (11286): /system/lib/libmedia.so
    D/Ldd     (11286): /system/lib/libemoji.so
    D/Ldd     (11286): /system/lib/libcrypto.so
    D/Ldd     (11286): /system/lib/libstagefright_avc_common.so
    D/Ldd     (11286): /system/lib/libnativehelper.so
    D/Ldd     (11286): /system/lib/libskiagl.so
    D/Ldd     (11286): /system/lib/libopencore_player.so
    D/Ldd     (11286): /system/lib/libjpeg.so
    D/Ldd     (11286): /system/lib/libsurfaceflinger_client.so
    D/Ldd     (11286): /system/lib/libstagefright.so
    D/Ldd     (11286): /system/lib/libdrm1.so
    D/Ldd     (11286): /system/lib/libdvm.so
    D/Ldd     (11286): /system/lib/libwebcore.so
    D/Ldd     (11286): /system/lib/libGLESv1_CM.so
    D/Ldd     (11286): /system/lib/libhardware.so
    D/Ldd     (11286): /system/lib/libexif.so
    D/Ldd     (11286): /system/lib/libgps.so
    D/Ldd     (11286): /system/lib/liblog.so
    D/Ldd     (11286): /system/lib/libexpat.so
    D/Ldd     (11286): /system/lib/libopencore_common.so
    D/Ldd     (11286): /system/lib/libbluedroid.so
    D/Ldd     (11286): /system/lib/libm.so
    D/Ldd     (11286): /system/lib/libicui18n.so
    D/Ldd     (11286): /system/lib/libomx_amrenc_sharedlibrary.so
    D/Ldd     (11286): /system/lib/libwpa_client.so
    D/Ldd     (11286): /system/lib/libstdc++.so
    D/Ldd     (11286): /system/lib/libandroid_runtime.so
    D/Ldd     (11286): /system/lib/libz.so
    D/Ldd     (11286): /system/lib/libETC1.so
    D/Ldd     (11286): /system/lib/libsonivox.so
    D/Ldd     (11286): /system/lib/libstlport.so
    D/Ldd     (11286): /system/lib/libutils.so
    D/Ldd     (11286): /system/lib/libicudata.so
    D/Ldd     (11286): /system/lib/libsqlite.so
    D/Ldd     (11286): /system/lib/libhardware_legacy.so
    D/Ldd     (11286): /system/lib/libpixelflinger.so
    D/Ldd     (11286): /system/lib/libvorbisidec.so
    D/Ldd     (11286): /system/lib/libstagefright_amrnb_common.so
    D/Ldd     (11286): /system/lib/libcutils.so
    D/Ldd     (11286): /system/lib/libui.so
    D/Ldd     (11286): /system/lib/libmedia_jni.so
    D/Ldd     (11286): /system/lib/libomx_sharedlibrary.so
    D/Ldd     (11286): /system/lib/libcamera_client.so
    D/Ldd     (11286): /system/lib/libskia.so
    D/Ldd     (11286): /system/lib/libopencore_net_support.so
    D/Ldd     (11286): /system/lib/libnetutils.so
    D/Ldd     (11286): /system/lib/libbinder.so
    D/Ldd     (11286): /system/lib/libssl.so
    D/Ldd     (11286): /system/lib/libicuuc.so
    D/Ldd     (11286): /system/lib/libGLESv2.so
    

    Also if necessary pid could be obtained by android.os.Process.myPid().

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to check the existence of process from Java in Windows. I
Is it possible to check if a dynamically loaded assembly has been signed with
Is there a way to check which interceptors are present for the current method?
How I can check which system libraries I need for my gems ? For
I know how to check an attribute for errors: @post.errors[:title].any? Is it possible to
Is it possible to check a bash script syntax without executing it? Using Perl,
It is not possible to check out a single file. The finest level of
How is it possible to check if MOSS Standard or MOSS Enterprise is installed?
Is it possible to check who is entering your website in PHP. I have
Is it possible to check if a char has been passed into a method

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.