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

Trying to build for 3.0 #2

Closed
jcarlson23 opened this issue Jul 6, 2011 · 9 comments
Closed

Trying to build for 3.0 #2

jcarlson23 opened this issue Jul 6, 2011 · 9 comments

Comments

@jcarlson23
Copy link

I've grabbed the latest git repo - https://github.com/guardianproject/android-database-sqlcipher.git

Then I went in, grabbed some SO's from a 3.0 device, (I'm sure I got the majority of them but might be missing an stlport.so as I couldn't find that...).

ls external/android-3.0/
libcrypto.so libicui18n.so liblog.so libssl.so libutils.so
libcutils.so libicuuc.so libnativehelper.so libstlport.so

But when I go to build from Eclipse, I get a bunch of Cursor errors... along the lines of:

The type BulkCursorToCursorAdaptor must implement the inherited abstract method Cursor.getType(int)

This happens in BulkCursorToCursorAdpator.java, and similar issues about base classes in a few other cursor-related files...

So what am I doing wrong here? I went into the external and I can rebuild the libcrypto.so as well as the libssl.so but that doesn't seem like the right thing to do, it seems
that I need to align my so with the java via the jni but I must be missing a step...

Any thoughts??

@n8fr8
Copy link
Collaborator

n8fr8 commented Jul 6, 2011

Hi Jared. We haven't looked at 3.0 yet, but obviously we should. I am a little rusty at the moment on our build process, so let me review our notes from when we produced the 2.x build, and get back to you shorlty.

@jcarlson23
Copy link
Author

no sweat - the JNI makefiles looked like they were missing a few things - a target was one :). I was able to build the openssl, not sure if I needed to, and the other thing that looked a little fishy was the stl_port.so vs a sharedstl_port.so (or something along those lines) in the external... Maybe that helps... maybe it doesn't :)

@n8fr8
Copy link
Collaborator

n8fr8 commented Jul 7, 2011

Here is a bit more background on how this all works, just so you can get an idea of what we need to do, in order to add 3.x support:
https://github.com/guardianproject/notepadbot

This has the entire "r1" sdk in it, with the sqlcipher.jar and the lib files. You will notice in the lib/armeabi there are a number of libsqlcipher_android .so files with -# extensions. These represent the versioned .so files for each Android platform (8,9,10, with 10 = 2.3 i believe). When you call " SQLiteDatabase.loadLibs(this);" in your app, we go through and figure out which .so to load.

In short, we have to build the version 11 and 12 .so files, linked against the Android 3.x OS SDK. All of the rest of the .so files can remain the same.

@n8fr8
Copy link
Collaborator

n8fr8 commented Jul 7, 2011

Just to be clear, we do not need to rebuild sqlcipher.so, only the libsqlcipher_android.so which is what powers our API.

sqlcipher.so is fully cross-platform/API level.

@n8fr8
Copy link
Collaborator

n8fr8 commented Jul 7, 2011

I've taken a shot at updating our library support for 3.0 and 3.1 within the notepadbot sample project:

In the libs/armeabi folder, you can now see we have -11 and -12 platform .so's for libsqlcipher_android:
https://github.com/guardianproject/notepadbot/tree/master/libs/armeabi

You can download a test APK here:
https://github.com/guardianproject/notepadbot/Notepadbot-0.0.1d-dev.apk/qr_code

Let me know if it works on your tablet device.

@jcarlson23
Copy link
Author

Sorry for the late reply... just need to charge up my device to give this a shot... got caught up on other work today

@jcarlson23
Copy link
Author

So it looks like it's running... Going to pull the db off the device and verify encryption and then might want to put in a quick patch for UI for the tablet. I'll send a patch but this looks like it's going down the road to goodness...

@n8fr8
Copy link
Collaborator

n8fr8 commented Jul 8, 2011

Great news.

Sent from my Android phone with K-9 Mail. Please excuse my brevity.

jcarlson23 reply@reply.github.com wrote:

So it looks like it's running... Going to pull the db off the device and verify encryption and then might want to put in a quick patch for UI for the tablet. I'll send a patch but this looks like it's going down the road to goodness...

Reply to this email directly or view it on GitHub:
https://github.com/guardianproject/android-database-sqlcipher/issues/2#issuecomment-1528149

@n8fr8
Copy link
Collaborator

n8fr8 commented Jul 8, 2011

UI updated for tablet, and new build here:
https://github.com/guardianproject/notepadbot/NoteCipher-0.0.2-dev.apk/qr_code

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

2 participants