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

0.5 version crash on older / 32-bit devices #12

Open
n8fr8 opened this issue Jan 24, 2020 · 5 comments
Open

0.5 version crash on older / 32-bit devices #12

n8fr8 opened this issue Jan 24, 2020 · 5 comments

Comments

@n8fr8
Copy link
Member

n8fr8 commented Jan 24, 2020

01-24 10:21:38.967 194-194/? A/DEBUG: #00 pc 000156e6 /data/app/app.tantiao-1/lib/arm/libiocipher.so (sqlfs_proc_write+597)
01-24 10:21:38.967 194-194/? A/DEBUG: #1 pc 0000ef41 /data/app/app.tantiao-1/lib/arm/libiocipher.so
01-24 10:21:38.968 194-194/? A/DEBUG: #2 pc 040aa96b /data/app/app.tantiao-1/oat/arm/base.odex (offset 0x289d000) (int info.guardianproject.libcore.io.Posix.pwriteBytes(info.guardianproject.iocipher.FileDescriptor, java.lang.Object, int, int, long, int)+158)
01-24 10:21:38.968 194-194/? A/DEBUG: #3 pc 040add4f /data/app/app.tantiao-1/oat/arm/base.odex (offset 0x289d000) (int info.guardianproject.libcore.io.Posix.write(info.guardianproject.iocipher.FileDescriptor, byte[], int, int, int)+170)
01-24 10:21:38.968 194-194/? A/DEBUG: #4 pc 03c592c3 /data/app/app.tantiao-1/oat/arm/base.odex (offset 0x289d000) (void info.guardianproject.libcore.io.IoBridge.write(info.guardianproject.iocipher.FileDescriptor, byte[], int, int, int)+246)
01-24 10:21:38.968 194-194/? A/DEBUG: #5 pc 03c516e1 /data/app/app.tantiao-1/oat/arm/base.odex (offset 0x289d000) (void info.guardianproject.iocipher.FileOutputStream.write(byte[], int, int)+132)
01-24 10:21:38.968 194-194/? A/DEBUG: #6 pc 739fa66f /data/dalvik-cache/arm/system@[email protected] (offset 0x1ec9000)
Let me know what I can do to help test/debug!

@n8fr8
Copy link
Member Author

n8fr8 commented Jul 13, 2020

confirmed on Nexus 7 still with latest 0.4.1 build:

07-13 17:01:21.169 25599 25599 F libc : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x242 in tid 25599 (m.zom.messenger)
07-13 17:01:21.225 193 193 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
07-13 17:01:21.225 193 193 F DEBUG : Build fingerprint: 'google/razor/flo:6.0.1/MOB30X/3036618:user/release-keys'
07-13 17:01:21.225 193 193 F DEBUG : Revision: '0'
07-13 17:01:21.225 193 193 F DEBUG : ABI: 'arm'
07-13 17:01:21.226 193 193 F DEBUG : pid: 25599, tid: 25599, name: m.zom.messenger >>> im.zom.messenger <<<
07-13 17:01:21.226 193 193 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x242
07-13 17:01:21.265 193 193 F DEBUG : r0 00000241 r1 00000000 r2 b6f5fbe4 r3 b6f5fb34
07-13 17:01:21.265 193 193 F DEBUG : r4 00000000 r5 9db34160 r6 00000000 r7 befa2e50
07-13 17:01:21.265 193 193 F DEBUG : r8 00000198 r9 9db78000 sl 00000241 fp b6d08ec0
07-13 17:01:21.265 193 193 F DEBUG : ip b377ce1c sp befa2de8 lr b3761cbf pc b3764740 cpsr 60070030
07-13 17:01:21.269 193 193 F DEBUG :
07-13 17:01:21.269 193 193 F DEBUG : backtrace:
07-13 17:01:21.269 193 193 F DEBUG : #00 pc 00015740 /data/app/im.zom.messenger-1/lib/arm/libiocipher.so (sqlfs_proc_write+279)
07-13 17:01:21.269 193 193 F DEBUG : #1 pc 00012187 /data/app/im.zom.messenger-1/lib/arm/libiocipher.so
07-13 17:01:21.270 193 193 F DEBUG : #2 pc 0374567b /data/app/im.zom.messenger-1/oat/arm/base.odex (offset 0x28a0000)

@n8fr8
Copy link
Member Author

n8fr8 commented Jul 13, 2020

7-13 18:08:26.549 8376-8480/im.zom.messenger A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x201 in tid 8480 (pool-2-thread-3)
07-13 18:08:26.651 26315-26315/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
07-13 18:08:26.652 26315-26315/? A/DEBUG: Build fingerprint: 'google/razor/flo:6.0.1/MOB30X/3036618:user/release-keys'
07-13 18:08:26.652 26315-26315/? A/DEBUG: Revision: '0'
07-13 18:08:26.652 26315-26315/? A/DEBUG: ABI: 'arm'
07-13 18:08:26.652 26315-26315/? A/DEBUG: pid: 8376, tid: 8480, name: pool-2-thread-3 >>> im.zom.messenger <<<
07-13 18:08:26.652 26315-26315/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x201
07-13 18:08:26.694 26315-26315/? A/DEBUG: r0 00000200 r1 a1a84b6f r2 a1a84b6f r3 92a75930
07-13 18:08:26.694 26315-26315/? A/DEBUG: r4 00000200 r5 a1a84b6f r6 00000000 r7 92a75270
07-13 18:08:26.694 26315-26315/? A/DEBUG: r8 705a0a70 r9 9370e500 sl 97fe2000 fp 134c8000
07-13 18:08:26.695 26315-26315/? A/DEBUG: ip b367ce48 sp 92a751d8 lr b365f113 pc b366391e cpsr 20010030
07-13 18:08:26.720 26315-26315/? A/DEBUG: backtrace:
07-13 18:08:26.721 26315-26315/? A/DEBUG: #00 pc 0001f91e /data/app/im.zom.messenger-2/lib/arm/libiocipher.so (sqlfs_proc_write+441)
07-13 18:08:26.723 26315-26315/? A/DEBUG: #1 pc 00019dc9 /data/app/im.zom.messenger-2/lib/arm/libiocipher.so
07-13 18:08:26.723 26315-26315/? A/DEBUG: #2 pc 0476815b /data/app/im.zom.messenger-2/oat/arm/base.odex (offset 0x2db2000) (int info.guardianproject.libcore.io.Posix.pwriteBytes(info.guardianproject.iocipher.FileDescriptor, java.lang.Object, int, int, long, int)+158)
07-13 18:08:26.723 26315-26315/? A/DEBUG: #3 pc 0476b53f /data/app/im.zom.messenger-2/oat/arm/base.odex (offset 0x2db2000) (int info.guardianproject.libcore.io.Posix.write(info.guardianproject.iocipher.FileDescriptor, byte[], int, int, int)+170)
07-13 18:08:26.723 26315-26315/? A/DEBUG: #4 pc 0421ac93 /data/app/im.zom.messenger-2/oat/arm/base.odex (offset 0x2db2000) (void info.guardianproject.libcore.io.IoBridge.write(info.guardianproject.iocipher.FileDescriptor, byte[], int, int, int)+246)
07-13 18:08:26.724 26315-26315/? A/DEBUG: #5 pc 041a8589 /data/app/im.zom.messenger-2/oat/arm/base.odex (offset 0x2db2000) (void info.guardianproject.iocipher.FileOutputStream.write(byte[], int, int)+132)
07-13 18:08:26.724 26315-26315/? A/DEBUG: #6 pc 73059da3 /data/dalvik-cache/arm/system@[email protected] (offset 0x1ec9000)
07-13 18:08:28.743 589-687/? E/NativeCrashListener: Exception dealing with report
android.system.ErrnoException: read failed: EAGAIN (Try again)
at libcore.io.Posix.readBytes(Native Method)
at libcore.io.Posix.read(Posix.java:169)
at libcore.io.BlockGuardOs.read(BlockGuardOs.java:230)
at android.system.Os.read(Os.java:367)
at com.android.server.am.NativeCrashListener.consumeNativeCrashData(NativeCrashListener.java:240)
at com.android.server.am.NativeCrashListener.run(NativeCrashListener.java:138)

@zoff99
Copy link

zoff99 commented Jan 15, 2021

@n8fr8 the bug is back now with sqlcipher 4.x and IOCipher 0.5

zoff99/ToxAndroidRefImpl#217

@erengms
Copy link

erengms commented Oct 6, 2023

I found a solution myself. I cloned the project and took it for myself. Since it is old, I tried to make it as up to date as possible by updating the gradle dependencies. There is an "external" folder in the project, I started by deleting it. Later, I managed to create the external folder by compiling it myself. "I deleted the "libsqlfs" folder in the external folder and put the library I downloaded from here.

https://github.com/guardianproject/libsqlfs

There is "Android.mk" file in the "jni" folder in IOCipher. I changed 64bit to 32bit in this line.

sqlfs_DEFS := -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DFUSE_USE_VERSION=25 -DHAVE_LIBSQLCIPHER -DSQLITE_HAS_CODEC=1 -D_GNU_SOURCE=1

sqlfs_DEFS := -D_FILE_OFFSET_BITS=32 -D_REENTRANT -DFUSE_USE_VERSION=25 -DHAVE_LIBSQLCIPHER -DSQLITE_HAS_CODEC=1 -D_GNU_SOURCE=1

Then, I compiled the project, extracted it as .arr, and added it as a library to my own project. It currently works on 32bit and 64bit devices. My tests continue.

When bringing this project up to date, pay attention to this. You will need to update the following line in the "Application.mk" file in "jni".

APP_ABI := armeabi-v7a arm64-v8a x86 x86_64
APP_PROJECT_PATH := $(shell pwd)
APP_BUILD_SCRIPT := $(APP_PROJECT_PATH)/jni/Android.mk
APP_STL := stlport_static
#
EXTERNAL_PATH := $(APP_PROJECT_PATH)/external

APP_STL := stlport_static replace this line with APP_STL := c++_static

@zoff99
Copy link

zoff99 commented Oct 7, 2023

@erengms i have started updates here: https://github.com/zoff99/IOCipher
maybe you can join me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants