Skip to content

no such function: sqlcipher_export #54

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

Closed
Alexander-Campbell opened this issue May 10, 2012 · 9 comments
Closed

no such function: sqlcipher_export #54

Alexander-Campbell opened this issue May 10, 2012 · 9 comments

Comments

@Alexander-Campbell
Copy link

Hello,

I was trying to run this code (Android/Java/Eclipse)

private SQLiteDatabase vgpdb;

    SQLiteDatabase.loadLibs(appcontext);

vgpdb = SQLiteDatabase.openOrCreateDatabase(database1, "Test1234, null);
vgpdb.execSQL("ATTACH DATABASE '/mnt/sdcard/Empty.sqlite' AS plaintext KEY '';");
vgpdb.execSQL("SELECT sqlcipher_export('plaintext');"); 
    vgpdb.execSQL("DETACH DATABASE plaintext;");
vgpdb.close();

When it gets to the sqlcipher_export line I get an exception, "05-10 10:13:35.420: E/Database(13730): Failure 1 (no such function: sqlcipher_export) on 0x1b8c030 when preparing 'SELECT sqlcipher_export('plaintext');'."

I am using the Anrdroid 1.1.0 package with the assets zip file icudt46l.zip, any advice would be helpfull.

thanks

@developernotes
Copy link
Member

Hi Alexander-Campbell,

The sqlcipher_export convenience function became available in the 2.0 RC builds of SQLCipher for Android. You would need to grab the latest build and update your application to use the new binaries. You can find prepackaged binaries here:

https://github.com/downloads/sqlcipher/android-database-sqlcipher/SQLCipher%20for%20Android%202.0.0-RC5.zip

@Alexander-Campbell
Copy link
Author

Hello,
I feel like its my lucky day, finally got this to work, in fact the main sticking point is in my App I am using the 1.x version and in the RC version 2.x I had to call the upgradeDatabaseFormatFromVersion1To2 function before it could work.

For looking further down the line, I think the best would be if I upgraded my core App to use the SqlCipher version 2.0.5, this is now an official release, do you agree ?

thanks for your help
Alexander


De : Nick Parker [email protected]
À : Alexander-Campbell [email protected]
Envoyé le : Mercredi 16 mai 2012 20h22
Objet : Re: [android-database-sqlcipher] no such function: sqlcipher_export (#54)

Hi Alexander-Campbell,

The sqlcipher_export convenience function became available in the 2.0 RC builds of SQLCipher for Android.  You would need to grab the latest build and update your application to use the new binaries.  You can find prepackaged binaries here:

https://github.com/downloads/sqlcipher/android-database-sqlcipher/SQLCipher%20for%20Android%202.0.0-RC5.zip


Reply to this email directly or view it on GitHub:
#54 (comment)

@developernotes
Copy link
Member

Hi Alexander-Campbell,

Glad to hear things are working well for you. I would suggest upgrading to the latest, to which we've patched the version I previously linked to above. The latest version you should grab when upgrading is 2.0.8, which can be found here:

https://github.com/downloads/sqlcipher/android-database-sqlcipher/SQLCipher%20for%20Android%202.0.8.zip

@Alexander-Campbell
Copy link
Author

Hello,
I am currently perfecting my Anrdroid App for Encryption/Decryption, I had a thought to publish it on Google play, just in the spirit of helping the development community. On the other hand I don't want to step on anybody's toes either, what is your take on this ? 

Kind Regards
Alexander


De : Nick Parker [email protected]
À : Alexander-Campbell [email protected]
Envoyé le : Mardi 19 juin 2012 17h44
Objet : Re: [android-database-sqlcipher] no such function: sqlcipher_export (#54)

Hi Alexander-Campbell,

Glad to hear things are working well for you.  I would suggest upgrading to the latest, to which we've patched the version I previously linked to above.  The latest version you should grab when upgrading is 2.0.8, which can be found here:

https://github.com/downloads/sqlcipher/android-database-sqlcipher/SQLCipher%20for%20Android%202.0.8.zip


Reply to this email directly or view it on GitHub:
#54 (comment)

@developernotes
Copy link
Member

Hi Alexander-Campbell,

We love seeing applications built using SQLCipher - let us know when you get it published!

@Alexander-Campbell
Copy link
Author

Hello,

In fact I published this to the Amazon Android AppStore as I am not registered with Google, see this link
http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Dmobile-apps&field-keywords=sqlcipher

If you have a look, let me know if you have any suggestions.

Regards
Alexander


De : Nick Parker [email protected]
À : Alexander-Campbell [email protected]
Envoyé le : Mercredi 20 juin 2012 6h30
Objet : Re: [android-database-sqlcipher] no such function: sqlcipher_export (#54)

Hi Alexander-Campbell,

We love seeing applications built using SQLCipher - let us know when you get it published!


Reply to this email directly or view it on GitHub:
#54 (comment)

@developernotes
Copy link
Member

Hi Alexander-Campbell,

Thanks for sharing!

@PulkitSethi1984
Copy link

I am using the same code as above however in the attach query i get exception 26 that its not a database file or is encrypted. I am using mono android. i am sure that key that i provide is correct as I am able to read data correctly.

@Alexander-Campbell
Copy link
Author

Hello,

Just in passing it may be better to create a new ticket as this one is actually closed...

Two points about your issue

In my app I use "rawExecSQL" rather than "execSQL" in the code sample above, you could try this.

If you try the same action with my SQLCipher encrpyt/decrypt app does this work or do you have the same error ?
(you can get the app from Google play, just search for SQLCipher)

Also could you provide more information about the version of SQLCipher, Android ...

thanks
Alexander

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