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 7839951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T15:36:33+00:00 2026-06-02T15:36:33+00:00

I am developing an open-source emulator project, and it has multiple, customizable native plug-ins.

  • 0

I am developing an open-source emulator project, and it has multiple, customizable native plug-ins. These plug-ins are built as native shared object libraries (.so files), and have various interfaces between native and Java through JNI. Rather than distribute the APK with every single plug-in ever created, and in order to allow folks to build their own custom plug-ins, I need a method of importing these .so files any time after the app has been installed.

I’ve found that I can copy files to the folder /data/data/[package_name], but not to the lib/ sub-folder (because it is owned by the “system” group). To utilize the JNI interfaces in Java, I must call System.loadLibrary( libname ); However, this seems to require the .so file to be located in the lib/ sub-folder. The only way around this I can think of is to require the user to have a rooted device. Is there another way to accomplish this?

  • 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-06-02T15:36:34+00:00Added an answer on June 2, 2026 at 3:36 pm

    Use System.load() instead:

    static
    {
        final String[] libs = {
            "/data/data/com.foo.test/lib/liba.so",
            "/data/data/com.foo.test/lib/libb.so"
        };
    
        for (int i=0; i<libs.length; ++i)
        {
            Log.d(TAG, "Loading " + libs[i] + "...");
            System.load(libs[i]);
        }
    }
    

    $ adb logcat

    D/LibTest ( 1022): Loading /data/data/com.foo.test/lib/liba.so…
    D/dalvikvm( 1022): Trying to load lib /data/data/com.foo.test/lib/liba.so 0x40512640
    D/dalvikvm( 1022): Added shared lib /data/data/com.foo.test/lib/liba.so 0x40512640
    D/dalvikvm( 1022): No JNI_OnLoad found in /data/data/com.foo.test/lib/liba.so 0x40512640, skipping init
    D/LibTest ( 1022): Loading /data/data/com.foo.test/lib/libb.so…
    D/dalvikvm( 1022): Trying to load lib /data/data/com.foo.test/lib/libb.so 0x40512640
    D/dalvikvm( 1022): Added shared lib /data/data/com.foo.test/lib/libb.so 0x40512640
    D/dalvikvm( 1022): No JNI_OnLoad found in /data/data/com.foo.test/lib/libb.so 0x40512640, skipping init

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

Sidebar

Related Questions

I'm developing an open source project, and I use several open source libraries. These
Recently, I was going through an open-source project and although I have been developing
I have an open source project which I had been actively developing JStock -
I am developing an open source project for rendering HTML5 using ASP.NET. Here you
Are there any good open source frameworks for developing computer system emulators? I am
I am developing open source web framework, it's almost ready but I still do
I am developing an open source desktop twitter client. I would like to take
We are developing a closed-source proprietary product that uses quite a few open source
I'm developing a static library where i need to use the open source SBJson
I'm developing an open source C# application. For awhile now, I've been using a

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.