You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Is there a way to reduce the size of the library being used in geckoview? like the libxul.so? #244
I was wndering if I can reduce the size of the library used by geckoview,
One of the biggest lib file is libxul.so, is there a way to reduce the size during building of the gecko binaries?
I tried some options in mozconfig like the following:
Great! Your solution looks very geek ,however for most of us application developer, we don't wanna re-complie geckoview source, inadequate knowledge....
I tried below solution, wirte here for your information.
1.use abiFilters only package target device arch lib can reduce large size:
(not filter)666MB -> (abiFilters "armeabi-v7a",) 143MB
but it still huge for a web app. My app need implement auto-update and cannot use googel play bundle, it means lib will be download every time, it's such a waste.
2.extract all geckoview lib and download and extract to app private dir and use system.load() to load all library. (failed, don't know reason yet)
I extract all abi lib from geckoview.arr, zip these libs and upload to my static resource server. here I got a url for my app to download lib: https://myserver/geckoview/{abi}.zip.
when app start, I do these steps:
1.check if lib exsists in extract dir. 2.download lib zip and extract if not exists. 3.use system.load all libs 4.start geckoview after all task done.
I thought I'll sucess, but fail to get an error: java.lang.RuntimeException: Could not find mozglue path. at org.mozilla.gecko.mozglue.GeckoLoader.getLibraryPath(GeckoLoader.java:204) at org.mozilla.gecko.mozglue.GeckoLoader.doLoadLibrary(GeckoLoader.java:367) at org.mozilla.gecko.mozglue.GeckoLoader.loadMozGlue(GeckoLoader.java:387) at org.mozilla.gecko.GeckoThread.run(GeckoThread.java:477)
anyone know what happens? seems geckoview hardcore lib load path, not use dynamic load lib.
It would be very helpful if the official could provide a method to dynamically load lib.
Activity
PSilverQ commentedon Sep 23, 2025
Great! Your solution looks very geek ,however for most of us application developer, we don't wanna re-complie geckoview source, inadequate knowledge....
I tried below solution, wirte here for your information.
1.use abiFilters only package target device arch lib can reduce large size:
(not filter)666MB -> (abiFilters "armeabi-v7a",) 143MB
but it still huge for a web app. My app need implement auto-update and cannot use googel play bundle, it means lib will be download every time, it's such a waste.
2.extract all geckoview lib and download and extract to app private dir and use system.load() to load all library. (failed, don't know reason yet)
I extract all abi lib from geckoview.arr, zip these libs and upload to my static resource server. here I got a url for my app to download lib: https://myserver/geckoview/{abi}.zip.
when app start, I do these steps:
1.check if lib exsists in extract dir. 2.download lib zip and extract if not exists. 3.use system.load all libs 4.start geckoview after all task done.
I thought I'll sucess, but fail to get an error:
java.lang.RuntimeException: Could not find mozglue path. at org.mozilla.gecko.mozglue.GeckoLoader.getLibraryPath(GeckoLoader.java:204) at org.mozilla.gecko.mozglue.GeckoLoader.doLoadLibrary(GeckoLoader.java:367) at org.mozilla.gecko.mozglue.GeckoLoader.loadMozGlue(GeckoLoader.java:387) at org.mozilla.gecko.GeckoThread.run(GeckoThread.java:477)anyone know what happens? seems geckoview hardcore lib load path, not use dynamic load lib.
It would be very helpful if the official could provide a method to dynamically load lib.