Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update so files to be compatible with android M (23) #39

Merged
merged 1 commit into from Apr 21, 2016
Merged

update so files to be compatible with android M (23) #39

merged 1 commit into from Apr 21, 2016

Conversation

BarTsouri
Copy link
Contributor

The plugin is not usable in Android M (23).
The so file libiconv.so cannot be loaded. The function System.loadLibrary("iconv") throws an exception libiconv.so has text relocations.

I had to replace the so files with new so files from the original zbar project (dm77/barcodescanner#123 (comment)).

The plugin works well now

@dcousens
Copy link
Contributor

@BarTsouri this is simply a permission change AFAIK?

@dcousens
Copy link
Contributor

@rubensayshi this may fix #35

@BarTsouri
Copy link
Contributor Author

This is a different compilation for the .so files that are not compatible with target 23

@BarTsouri
Copy link
Contributor Author

As far as I understand from #35 it will fix it.

@dcousens
Copy link
Contributor

If the binaries are different, then, NACK. Why would binaries be included in this package?

@BarTsouri
Copy link
Contributor Author

These are the barcode scanner logic files. Those that actually read and interpret the barcode

@dcousens
Copy link
Contributor

How do I know these aren't malicious?

@BarTsouri
Copy link
Contributor Author

Your concerns are authentic. I just downloaded the recompiled version and it worked. If you want to feel that the solution is viable be sure that we use it in Capriza. Look at www.capriza.com

@rubensayshi
Copy link

can you give the build instructions for this (I had issues trying) and maybe we can see if they're deterministic and have multiple people sign them?

@BarTsouri
Copy link
Contributor Author

I'm not sure that I understand the question.
The files are already compiled in my pull-request.

@rubensayshi
Copy link

@dcousens's point is that we have no guarantee that you didn't mess around with the code before compiling, so my suggestion is that multiple people compile and we compare the hash of the binary.

@rubensayshi
Copy link

paging @tjwoon since he's the owner of the repo ;)

@gnumbers
Copy link

@BarTsouri Does your fork work well on Android 6.0? If so, can you please give me the access?

@BarTsouri
Copy link
Contributor Author

You have access, just pull it from here:
https://github.com/capriza/csZBar

@gnumbers
Copy link

@BarTsouri Thanks, I will let you know after try.

@dcousens
Copy link
Contributor

/@jilt1015 how did you go?

@dcousens dcousens added the bug label Apr 13, 2016
@dcousens
Copy link
Contributor

@uniphonic did you have experience here?

@uniphonic
Copy link
Contributor

@dcousens I have not tried compiling the .so files my self, and have not yet looked up what the steps are for doing so. I've tried building my cordova project with the ones here though, and they seem to work fine. To get it working fully with Android 6 on my Nexus though, I had to follow the steps listed in #50 , which includes an additional .so file as well, which I pulled from another repo, as mentioned in #50 .

My fork contains both:
https://github.com/uniphonic/csZBar

@dcousens dcousens merged commit d5b78e1 into tjwoon:master Apr 21, 2016
@dcousens
Copy link
Contributor

dcousens commented Apr 21, 2016

I'm still yet to verify these deterministically, but, the change is solid. Merging.

@dcousens
Copy link
Contributor

dcousens commented May 8, 2017

In repository

for f in */*; do sha256sum $f; done
70669c2bebd0a00a32586ea47b2893cc7f1ab0a8ed24f933fa1bd6ecaa677bd0  arm64-v8a/libiconv.so
c9a7297359089c3f46e42dfa7842f1219a539956f79a992f1e924e42cc95ac3c  arm64-v8a/libzbarjni.so
e1d98d8a90432f4ef3121e963834fd60660e89fa4bc6ead340919a5a9411a0fe  armeabi/libiconv.so
f9dfa05f7fa272a460c5c6a7c1518594fb3673cae63970cf2646c99b0d56610c  armeabi/libzbarjni.so
e7caf98f8f20e1eb222f6207aa057d870c2fa86d8ce58bcf137410005fad38f1  armeabi-v7a/libiconv.so
d270942b433fddbd701c66bad7efba40f5d227b392806d995ce9fad3b53232f8  armeabi-v7a/libzbarjni.so
c70feca16f7619cfb320133037dc68b3d613849a336d64e7297218b223752ca6  x86/libiconv.so
d3d40cea7c422e8ee4cc0dd4a937d42b71a2a65b9beb3091f15e1025691478de  x86/libzbarjni.so

Downloaded from
https://github.com/dm77/barcodescanner/tree/master/zbar/src/main/jniLibs/x86
https://github.com/dm77/barcodescanner/tree/master/zbar/src/main/jniLibs/armeabi-v7a
https://github.com/dm77/barcodescanner/tree/master/zbar/src/main/jniLibs/armeabi

And my results

e7caf98f8f20e1eb222f6207aa057d870c2fa86d8ce58bcf137410005fad38f1  /home/daniel/Downloads/libiconv (armv7).so
d270942b433fddbd701c66bad7efba40f5d227b392806d995ce9fad3b53232f8  /home/daniel/Downloads/libzbarjni (armv7).so

c70feca16f7619cfb320133037dc68b3d613849a336d64e7297218b223752ca6  /home/daniel/Downloads/libiconv (x86).so
d3d40cea7c422e8ee4cc0dd4a937d42b71a2a65b9beb3091f15e1025691478de  /home/daniel/Downloads/libzbarjni (x86).so

e1d98d8a90432f4ef3121e963834fd60660e89fa4bc6ead340919a5a9411a0fe  /home/daniel/Downloads/libiconv (arm).so
f9dfa05f7fa272a460c5c6a7c1518594fb3673cae63970cf2646c99b0d56610c  /home/daniel/Downloads/libzbarjni (arm).so

Verified.
We should probably upgrade armv8 too...

@dcousens dcousens removed their assignment May 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants