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

Sqlcipher is not run on oppo devices #438

Closed
mobeentharsol opened this issue Apr 26, 2019 · 14 comments
Closed

Sqlcipher is not run on oppo devices #438

mobeentharsol opened this issue Apr 26, 2019 · 14 comments
Labels
needs-details Needs additional details to proceed. stale This issue lacks recent activity.

Comments

@mobeentharsol
Copy link

Sqlcipher is not run on this company all devices. Please add support for this company devices.
https://www.oppo.com/pk/

native crash occurred on very start of application.

SQLCipher for Android version: 4.1.3

@developernotes
Copy link
Member

Hello @mobeentharsol,

Thank you for your report. Unfortunately, we do not have any of those devices on hand to test. Can you provide an error message from the SQLCipher for Android test suite when you attempt to run it on an Oppo device?

@developernotes developernotes added the needs-details Needs additional details to proceed. label Apr 26, 2019
@mobeentharsol
Copy link
Author

When I have run test on Oppo device then application suddenly close and logcat print below lines.

04-27 16:53:36.754 9919-9956/net.zetetic.sqlcipher.test I/Zetetic: Running test suite on arm64-v8a platform
04-27 16:53:36.794 9919-9956/net.zetetic.sqlcipher.test W/linker: /data/app/net.zetetic.sqlcipher.test-1/lib/arm64/libsqlcipher.so: unused DT entry: type 0x6ffffffe arg 0x7768
04-27 16:53:36.794 9919-9956/net.zetetic.sqlcipher.test W/linker: /data/app/net.zetetic.sqlcipher.test-1/lib/arm64/libsqlcipher.so: unused DT entry: type 0x6fffffff arg 0x3

@developernotes
Copy link
Member

Hi @mobeentharsol

Thank you for the logcat output, I can see the dynamic array tags within the binary. This post is helpful in providing some additional details regarding those messages. This may be an issue that can be resolved by an update to the Android NDK which is something we would like to investigate for a future release of SQLCipher (historically this has been problematic). That said, there could also be an issue with the compilation flags used for the ARM kernel on the host device.

In the interim, would you try the linked Android elf cleaner against the binaries and let us know if that addresses the issue for you?

toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-readelf --dynamic ~/src/android-database-sqlcipher/android-database-sqlcipher/build/intermediates/jniLibs/release/arm64-v8a/libsqlcipher.so

Dynamic section at offset 0x2e1d18 contains 29 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [liblog.so]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so]
 0x0000000000000001 (NEEDED)             Shared library: [libm.so]
 0x0000000000000001 (NEEDED)             Shared library: [libstdc++.so]
 0x0000000000000001 (NEEDED)             Shared library: [libdl.so]
 0x000000000000000e (SONAME)             Library soname: [libsqlcipher.so]
 0x0000000000000019 (INIT_ARRAY)         0x2cf008
 0x000000000000001b (INIT_ARRAYSZ)       32 (bytes)
 0x000000000000001a (FINI_ARRAY)         0x2cf028
 0x000000000000001c (FINI_ARRAYSZ)       16 (bytes)
 0x0000000000000004 (HASH)               0x1f0
 0x0000000000000005 (STRTAB)             0x44f8
 0x0000000000000006 (SYMTAB)             0x1288
 0x000000000000000a (STRSZ)              11831 (bytes)
 0x000000000000000b (SYMENT)             24 (bytes)
 0x0000000000000003 (PLTGOT)             0x2f1f28
 0x0000000000000002 (PLTRELSZ)           6360 (bytes)
 0x0000000000000014 (PLTREL)             RELA
 0x0000000000000017 (JMPREL)             0x41bc0
 0x0000000000000007 (RELA)               0x77c8
 0x0000000000000008 (RELASZ)             238584 (bytes)
 0x0000000000000009 (RELAENT)            24 (bytes)
 0x0000000000000018 (BIND_NOW)
 0x000000006ffffffb (FLAGS_1)            Flags: NOW
 0x000000006ffffffe (VERNEED)            0x7768
 0x000000006fffffff (VERNEEDNUM)         3
 0x000000006ffffff0 (VERSYM)             0x7330
 0x000000006ffffff9 (RELACOUNT)          9664
 0x0000000000000000 (NULL)               0x0

@mobeentharsol
Copy link
Author

I am using aar in gradle and link got from your site. Using community edition, I am unable execute above steps. Please guide me to further steps.

@developernotes
Copy link
Member

Hi @mobeentharsol

You can download the AAR file directly here. Once downloaded, you can rename the file as a zip, then unzip it. You would then want to run the elf cleaner on the libsqlcipher.so files located within the jni/arm64-v8a, and possibly for the other platforms. Finally, zip the folder back up and rename to an AAR.

@mobeentharsol
Copy link
Author

I am windows user. I have tried to work on ubuntu but did not successful. can you do above task and send to me AAR file?

@stale
Copy link

stale bot commented May 28, 2019

Hello, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "bug", "enhancement", or "security" and I will leave it open. Thank you for your contributions.

@stale stale bot added the stale This issue lacks recent activity. label May 28, 2019
@stale
Copy link

stale bot commented Jun 11, 2019

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to reopen with up-to-date information.

@stale stale bot closed this as completed Jun 11, 2019
@mittt
Copy link

mittt commented Jan 31, 2020

I’m having the same problem, running on BlueBird EF500 device. Can i help with debugging in any way?

BlueBird EF500 with Android version 5.1.1
SQLCipher 4.1.2

It's an existing problem, could you reopen the issue.

Those are the only relevant logs from the crash:
01-31 13:42:03.055 13883-13919/com.NEWmobiAudit W/linker: /data/app/com.example/lib/arm64/libsqlcipher.so: unused DT entry: type 0x6ffffffe arg 0x7810
01-31 13:42:03.056 13883-13919/com.NEWmobiAudit W/linker: /data/app/com.example/lib/arm64/libsqlcipher.so: unused DT entry: type 0x6fffffff arg 0x3
01-31 13:42:03.161 818-834/? I/WindowState: WIN DEATH: Window{2c25e24 u0 com.example/com.example.MainActivity}

@MarcusCwl
Copy link

W/linker: /data/app/a/lib/arm64/libsqlcipher.so: unused DT entry: type 0x6ffffffe arg 0x7810
W/linker: /data/app/a/lib/arm64/libsqlcipher.so: unused DT entry: type 0x6fffffff arg 0x3
WIN DEATH: Window{10656b82 u0

Actually I encounter same issue on OPPO Android 5 as well

@dbof10
Copy link

dbof10 commented Feb 12, 2020

@bembem1011
Copy link

I met same issue like others in oppo android 5 :( but I don't know how to run android-elf-cleaner to get more info

@bembem1011
Copy link

bembem1011 commented Apr 20, 2020

After following @developernotes guides, I get the below info. Hope it helps to fix in android 5 oppo
The logcat message:

04-20 04:47:28.845 29231-29231/? W/linker: /data/app/net.vinid.module.common.sample-2/lib/arm64/libcproxy.so: unused DT entry: type 0x6ffffffe arg 0x17328
04-20 04:47:28.845 29231-29231/? W/linker: /data/app/net.vinid.module.common.sample-2/lib/arm64/libcproxy.so: unused DT entry: type 0x6fffffff arg 0x3
04-20 04:47:28.875 29231-29274/? W/GooglePlayServicesUtil: Google Play services out of date. Requires 11925000 but found 8301240
04-20 04:47:28.885 29231-29231/? W/FirebaseRemoteConfig: No value of type 'String' exists for parameter key 'android_cert_pinning'.
04-20 04:47:28.905 975-975/? W/keystore: Could not read CACERT_ALIAS_ENCRYPTION_KEY
04-20 04:47:29.065 29231-29231/? W/linker: /data/app/net.vinid.module.common.sample-2/lib/arm64/libsqlcipher.so: unused DT entry: type 0x6ffffef5 arg 0x12d0
04-20 04:47:29.065 29231-29231/? W/linker: /data/app/net.vinid.module.common.sample-2/lib/arm64/libsqlcipher.so: unused DT entry: type 0x6ffffffe arg 0x8558
04-20 04:47:29.065 29231-29231/? W/linker: /data/app/net.vinid.module.common.sample-2/lib/arm64/libsqlcipher.so: unused DT entry: type 0x6fffffff arg 0x3

After running android elf cleaner, and run the command like @developernotes guides. I get below output

./prebuilt/darwin-x86_64/bin/arm-linux-androideabi-readelf --dynamic /Users/hiennt98/Desktop/libsqlcipher.so
Dynamic section at offset 0x333d10 contains 27 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [liblog.so]
0x0000000000000001 (NEEDED) Shared library: [libc.so]
0x0000000000000001 (NEEDED) Shared library: [libm.so]
0x0000000000000001 (NEEDED) Shared library: [libdl.so]
0x000000000000000e (SONAME) Library soname: [libsqlcipher.so]
0x0000000000000019 (INIT_ARRAY) 0x31eff0
0x000000000000001b (INIT_ARRAYSZ) 8 (bytes)
0x000000000000001a (FINI_ARRAY) 0x31eff8
0x000000000000001c (FINI_ARRAYSZ) 16 (bytes)
0x0000000000000004 (HASH) 0x228
0x000000006ffffef5 (GNU_HASH) 0x12d0
0x0000000000000005 (STRTAB) 0x5210
0x0000000000000006 (SYMTAB) 0x1f28
0x000000000000000a (STRSZ) 12036 (bytes)
0x000000000000000b (SYMENT) 24 (bytes)
0x0000000000000003 (PLTGOT) 0x343f20
0x0000000000000002 (PLTRELSZ) 6480 (bytes)
0x0000000000000014 (PLTREL) RELA
0x0000000000000017 (JMPREL) 0x483e0
0x0000000000000007 (RELA) 0x85b8
0x0000000000000008 (RELASZ) 261672 (bytes)
0x0000000000000009 (RELAENT) 24 (bytes)
0x000000000000001e (FLAGS) BIND_NOW
0x000000006ffffffb (FLAGS_1) Flags: NOW
0x000000006ffffff9 (RELACOUNT) 10625
0x000000006ffffff0 (VERSYM) 0x8114
0x0000000000000000 (NULL) 0x3

./prebuilt/darwin-x86_64/bin/arm-linux-androideabi-readelf --dynamic /Users/hiennt98/Desktop/libcproxy.so
Dynamic section at offset 0x195430 contains 27 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libm.so]
0x0000000000000001 (NEEDED) Shared library: [liblog.so]
0x0000000000000001 (NEEDED) Shared library: [libdl.so]
0x0000000000000001 (NEEDED) Shared library: [libc.so]
0x000000000000000e (SONAME) Library soname: [libcproxy.so]
0x0000000000000010 (SYMBOLIC) 0x0
0x0000000000000019 (INIT_ARRAY) 0x19ccc8
0x000000000000001b (INIT_ARRAYSZ) 8 (bytes)
0x000000000000001a (FINI_ARRAY) 0x19ccd0
0x000000000000001c (FINI_ARRAYSZ) 16 (bytes)
0x0000000000000004 (HASH) 0x190
0x0000000000000005 (STRTAB) 0xd510
0x0000000000000006 (SYMTAB) 0x2da0
0x000000000000000a (STRSZ) 36893 (bytes)
0x000000000000000b (SYMENT) 24 (bytes)
0x0000000000000003 (PLTGOT) 0x1a5640
0x0000000000000002 (PLTRELSZ) 3360 (bytes)
0x0000000000000014 (PLTREL) RELA
0x0000000000000017 (JMPREL) 0x20268
0x0000000000000007 (RELA) 0x17388
0x0000000000000008 (RELASZ) 36576 (bytes)
0x0000000000000009 (RELAENT) 24 (bytes)
0x0000000000000018 (BIND_NOW)
0x000000006ffffffb (FLAGS_1) Flags: NOW
0x000000006ffffff9 (RELACOUNT) 1522
0x000000006ffffff0 (VERSYM) 0x1652e
0x0000000000000000 (NULL) 0x3

I attached the libsqlcipher.so and http://libcproxy.so/ file, which has run with android elf cleaner

libcproxy.so.zip
libsqlcipher.so.zip

@bembem1011
Copy link

Hope this issue will reopen, and you can fix this :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-details Needs additional details to proceed. stale This issue lacks recent activity.
Projects
None yet
Development

No branches or pull requests

6 participants