As described here (https://github.com/sufficientlysecure/document-viewer/issues/88) we're facing the problem that the JNI library that is part of the MuPdf Android demo is really large. In this case, this affects the size of the Document Viewer app (https://f-droid.org/repository/browse/?fdid=org.sufficientlysecure.viewer). The *.so files in the APK are more than 12 MB in size!
Before we updated MuPdf to the latest version a few months ago (i.e. version 2.5 and earlier of Document Viewer), the *.so files accounted for only 3,9 MB each.
Can you explain this increase of literally 300%? Is there anything we can change to compress our JNI libs further?
.apk
NDK support in AndroidStudio and choosing between Android Studio and Eclipse
It is absolutely essential you build the library from sources yourself and generate multiple .so
s based on platform (the sources contain strong hints on how to achieve this so I'll not go into details).
Then try adding
LOCAL_CFLAGS += -DNOCJK
in Core.mk
to exclude fonts from the .so
(that's right, the 9 MB worth of fonts from resources\fonts\droid
will now be stripped from the library).
Just went from 9266 kB to 2155 kB unpacked.
EDIT: Then again it depends what your target market is. You might need to keep those in. CJK = Chinese, Japanese, Korean
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With