Hello Caleb,

On 13-08-24 8:19 PM, Caleb wrote:
Hi all,

How would one go about including an additional native shared library in
the Firefox for Android package?

I've tried editing `toolkit/mozapps/installer/package.mk
<http://package.mk>` and placing the .so file in the output directory
`objdir-droid/dist/fennec/assets/`, but something is deleting the file
when I run `./mach package`. Seems like sensible precaution against
stray files getting into the package, but I haven't had any luck finding
the mechanism used to whitelist files for packaging.

There are (at least!) two parts to this.

1. At or around

http://mxr.mozilla.org/mozilla-central/source/mobile/android/installer/package-manifest.in#33

you'll need to add your new library. I think dist/fennec can get removed and re-created. This will ensure your .so actually makes it to dist/fennec/assets.

2. At or around

http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/installer/packager.mk#351

you should add your .so to the DIST_FILES (or SO_LIBARARIES) list. That will ensure we include the .so in the final APK file.

There is some trickiness around moving files between dist/fennec and dist/fennec/assets for unpackaging, but I don't think that will affect you.

Let me know how this works out.
Nick
_______________________________________________
mobile-firefox-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/mobile-firefox-dev

Reply via email to