Crashes on Lollipop devices
Lots of feedback on crashes on Lollipop devices.
Stacktrace:
04-10 02:17:06.659 8928-8990/? E/AndroidRuntime: FATAL EXCEPTION: Thread-397
Process: com.google.android.sambadocumentsprovider, PID: 8928
java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "state_path" referenced by "libsmbregistry-samba4.so"...
at java.lang.Runtime.loadLibrary(Runtime.java:371)
at java.lang.System.loadLibrary(System.java:988)
at com.google.android.sambadocumentsprovider.nativefacade.NativeCredentialCache.<clinit>(NativeCredentialCache.java:23)
at com.google.android.sambadocumentsprovider.nativefacade.SambaMessageLooper.prepare(SambaMessageLooper.java:71)
at com.google.android.sambadocumentsprovider.nativefacade.SambaMessageLooper.access$000(SambaMessageLooper.java:24)
at com.google.android.sambadocumentsprovider.nativefacade.SambaMessageLooper$1.run(SambaMessageLooper.java:29)
at java.lang.Thread.run(Thread.java:818)
state_path is defined in libsmbconf.so, but it needs libsmbregsitry-samba4.so.
I am calling this bug fix infeasible.
I tried to untie the circular dependencies, only to reveal more circular dependencies.
I made samba3util subsystem which defines state_path a shared library. Then I found symbols in param subsystem depends on smbconf a library and smbconf depends on param.
Given that I am not an expert in Samba, I feel keep untying circular dependencies will lead to unexpected behaviors.
Lollipop users don't be too sad. Lollipop cannot benefit from this app much because the only thing their users could do with this app if it ran was to pick files in Samba servers while sending an email.
FWIW, configuring samba with
--with-static-modules=ALL \
--builtin-libraries=replace,ccan,samba-cluster-support,smbconf,smbregistry,secrets3 \
--bundled-libraries=talloc,tdb,pytdb,ldb,pyldb,tevent,pytevent
Seems to get rid of the circular dependencies. Tested with SPMC on FireTV (API22).
Thanks for the patch, BTW 👍
Thanks for @koying's effort and I believe you've tried several combinations before making it work.
Unlike SPMC this app is relying on Storage Access Framework. I believe releasing a patch for Lollipop users is not very useful as SAF was not very useful for L.
Actually, the most difficult part is to make any sense of these options... which I still don't, honestly. Purely empirical, I must admit, based only on the libs having the duplicate symbols the linker complained about ;)
Re usefulness, I guess, you're probably right for SAF, but could be useful for any app needing samba on droid, I suppose. I bet you'll see many file explorers upgraded to slb2/smb3 based on your work, soon, considering the based press smb1 git those last months...
#52 i meet the same question and i use ndk 12b to create the toolchain ,now it can run on android-l