Android Question B4A ShellAsync - LD_LIBRARY_PATH

Rich Blackmore

Member
Licensed User
Longtime User
I am running xmrig android binary in the background but for this to work I uses shared library.

I need to set the LD_LIBRARY_PATH

in Java this is easily set with:

// run xmrig using the config
String[] args = {"./xmrig"};
ProcessBuilder pb = new ProcessBuilder(args);
// in our directory
pb.directory(getApplicationContext().getFilesDir());
// with the directory as ld path so xmrig finds the libs
pb.environment().put("LD_LIBRARY_PATH", privatePath);
// in case of errors, read them
pb.redirectErrorStream();
accepted = 0;
// run it!
process = pb.start();



How would I go about this in B4A so I can launch the binary loading the shared library folder
 
Last edited:
Top