ideas for library loading for gpgme on Android

Hans-Christoph Steiner hans at guardianproject.info
Fri Aug 31 15:47:24 CEST 2012



On 08/31/2012 09:08 AM, Marcus Brinkmann wrote:
> On 08/31/2012 03:52 AM, Hans-Christoph Steiner wrote:
>>
>> So Android has a very limited linker, and the _only_ way to specify load
>> paths for shared libraries is with the LD_LIBRARY_PATH env var.  By
>> default, LD_LIBRARY_PATH is set to:
>>
>> LD_LIBRARY_PATH=/vendor/lib:/system/lib
> 
> That's the canonical way.  Normally, the environment is inherited by
> child processes, so it will just propagate through GPGME.
> 
> Or is this different on Android?

The difference on Android is that there are no built-in paths and rpath
is not supported.  On all the GNU/Linux systems I've used, I've never
seen LD_LIBRARY_PATH set by the system.

The environment is inherited in Android as well, but since Android apps
are Java, there isn't a way that I know to set LD_LIBRARY_PATH for the
current process in Java, only child processes.

I think that Android does look in the app-local lib/ folder when loading
JNI libs, but that doesn't seem to set LD_LIBRARY_PATH so that's not
inherited by the gpg child process.

I'll investigate more today...

.hc



More information about the Gnupg-devel mailing list