Latest SQLite binary for June 2015

Search This thread

tech128

Senior Member
Oct 14, 2012
177
118
@ReneLeonhardt

Thank you so much for providing the binaries to include the latest and much faster SQLite into Android apps!

  1. Would it be possible to add binaries for the Intel platform to your build process in order to allow testing apps in the accelerated "Intel x86 Atom System Image"? Since Android 5 there also are Atom_64 images...
    Sure I can compile x86 and x86-64 binaries if you want...
  2. Are the release builds optimized for space to minimize the resulting APK size?
    No they are optimized for speed, that's mostly a personal preference. I want everything blazing fast.
    I think if I optimized for space, it wouldn't be too much smaller anyway. I can do a test run if you want to know...
  3. Would it be possible to cooperate with Zetetic.net /sqlcipher/sqlcipher-for-android/ to create encrypted databases with the latest SQLite driver?
    Well I checked into that, and it looks like quite a lot of work. I don't feel that having encryption built into sqlite is really that important.
    If you need it, you can just run a kernel module or fuse mount to encrypted container / filesystem.
    Or you can use openssl or similar to encrypt / decrypt the sql file.
Thank you and keep up the good work, greetings from Germany!
 
Last edited:

ReneLeonhardt

New member
Oct 6, 2015
3
0
SQLite 3.9.0 released with JSON and FTS5 awesomeness!

  1. Sure I can compile x86 and x86-64 binaries if you want...
  2. No they are optimized for speed, that's mostly a personal preference. I want everything blazing fast.
    I think if I optimized for space, it wouldn't be too much smaller anyway. I can do a test run if you want to know...
  3. Well I checked into that, and it looks like quite a lot of work. I don't feel that having encryption built into sqlite is really that important.
    If you need it, you can just run a kernel module or fuse mount to encrypted container / filesystem.
    Or you can use openssl or similar to encrypt / decrypt the sql file.
  1. Thank you, x86 and x86-64 binaries would be very helpful for debugging apps in the emulator!
  2. If you could make a quick space check for ARM would be nice to know, to keep the APK download size as small as possible.
    But you are right, in the end it will be not much smaller anyway, and the resulting APK is ZIP compressed...
    I can understand you, the performance optimizations are huge, twice as fast as SQLite 3.8.0, that's good! :)
  3. Thanks for checking it out! But how could an Android app load a kernel module or mount an encrypted container?
    (En- and) Decrypting would be another use case, not connecting/reading/writing many times inside a started/paused/resumed app...
Today 3.9.0 has been released with even more goodies, JSON functions, the awesome new FTS5 (still experimental), indexes on expressions, ...!
sqlite.org /releaselog/3_9_0.html
Maybe you can check if you can compile in the Encryption Extension, then at least paying developers could transparently en-/decrypt their files:
sqlite.org /see/doc/trunk/www/readme.wiki
 

frwerewolf

Senior Member
Jan 12, 2013
127
19
I have a galaxy s6 edge plus on lollipop 5.11 rooted and exposed. I wanted to install whatsappX module but sqlite installer is requested. The apk ones i found on the web don't work. So i read your posts but didnt understand everything. Could someone tell me which one to install and get it from where ? Thanks a lot.
 

amplatfus

Senior Member
Sep 26, 2009
321
48
OnePlus 8T
sqlite3 64bits

I'll attach one that I have working for me. You'll need to extract the zip and then place sqlite3 in /system/xbin and then you should be able to call your sqlite3 similar (if not the same) as you did before.
Thank you so much.
Please where from you have it? Because I will be looking for the 64bits version.

BR,
amplatfus
 

tech128

Senior Member
Oct 14, 2012
177
118
@hansmoon

Not nice, you should ask for permission before posting your binaries in other people's threads..

@gopi.g

Well the htc pico is armv7, so I would go with either armv7 or armv7-pie
@ReneLeonhardt

I tried to compile an x86 and x86_64 version for you, but there was an issue.

I re-worked the compile.sh and got it to compile x86 and x86_64 code, but there are several functions needed that aren't present in the ndk.

I was able to find them for arm, but I'd have to go looking for x86 and x86_64 versions.

Also, this last weekend, my server decided to fall on its face.

Which of course has all of my dev stuff.

Luckily I was able to convince the hard drive to spin back up once more and back everything up.

But I've since spent the entire week rebuilding it from scratch (I kind of wanted to do that anyway..)

I'll try to include the encryption extension when I can get back to dev stuff.
@Rydah

I'll look into armv8-pie when I can get everything back to normal (or close to it)

Still got a lot do before that can happen.
@vrgolin

Not sure what mods you are referring to?
@osygen

I would use the armv7-pie one. That would work the best for the S4.

@frwerewolf

Yeah I should probably make a flashable zip or something along those lines.

I'll check into that too when I can get back to work on sqlite3.

All you need to do to install it currently is use es file explorer.

Swipe from the left and go down to root explorer.

Turn it on, then click on root explorer itself.

Click on mount rw, then click rw on /system.

Click ok.

Now go to where you downloaded and extracted sqlite3 to.

Long press on it and click the rename button at the top.

Rename it to sqlite3 and click ok.

Long press on it and click the copy icon at the top.

Navigate to /system/xbin

Paste the file into the directory.

Long press on the sqlite3 file you just pasted.

Click the 3 dots at the top right.

Go down to properties.

Go to where it says permissions and click change.

Change it to: owner - read, write, execute / group - read, execute / other - read, execute

Then click ok.

You have installed sqlite3 into your phone.

@amplatfus

No 64bit version atm, will be considering that when I can get back to work on sqlite3.

For now, use the armv7 or armv7-pie version.

They are still very fast even though they're not totally optimized for your cpu.
 

ReneLeonhardt

New member
Oct 6, 2015
3
0
@tech128
Thank you very much for the infos and your hard work, I hope x86 will not be a too big pain in the ass, but maybe it's a good thing if the NDK becomes more useful in the end...
Good luck with your new dev server!
I'm looking forward to your new releases, maybe you can release arm first, that's the most important platform, if it's not too much extra work to split the release.
 

Mlessir

Member
Aug 20, 2015
16
2
plus.google.com
Hi again tech128.

I can see you have new downloads and i want to know to be secure which version i must install. So if i understand right armv-7 its for android versions older than 5.0 or lollipop, and armv-7 pie for 5.0 lollipop or above, isnt it?

Thanks in advanced and happy new year.
 

bendiss

New member
Apr 5, 2010
4
0
@toby12188

I decided not to include fts3 support since I didn't think it was anything important to include.

The SMS databases really need it? Last time I tried (awhile ago) it didn't need fts3 to dump the SMS databases.

I could look into putting it in there, but it might take a little while since it wasn't super easy to include it.

Any update on that? also can't delet rows in the sms table because of missing FTS3 module.
 

yingjai

Senior Member
Feb 4, 2009
136
10
I have the Nexus 6P with an ARM64 processor. I tried using armv-7-pie in /system/bin, but it returns an error when run:

CANNOT LINK EXECUTABLE: "/system/lib64/libc.so" is 64-bit instead of 32-bit
page record for 0xf6fad03c was not found (block_size=16)

I would try to pull it off an emulator myself, but for some reason it no longer runs on my PC.

Edit: got the emulator to run. Pulled sqlite3 from Android 6.0 armv7, but same error.
 
Last edited:

bdanders

Member
May 5, 2011
32
6
I have the Nexus 6P with an ARM64 processor. I tried using armv-7-pie in /system/bin, but it returns an error when run:

CANNOT LINK EXECUTABLE: "/system/lib64/libc.so" is 64-bit instead of 32-bit
page record for 0xf6fad03c was not found (block_size=16)

I would try to pull it off an emulator myself, but for some reason it no longer runs on my PC.

Edit: got the emulator to run. Pulled sqlite3 from Android 6.0 armv7, but same error.

I'm having the same problem on my Moto X Pure running 6.0. If you've been able to find a working binary, I'd love to know where.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 33
    Well I went through quite a few threads to find an updated, decent sqlite3 binary. Didn't find any that met that criteria.

    So I compiled one.

    Here's SQLite 3.8.11.1 combined into a single source file (the amalgamation) for ARM v6 and v7.

    These binaries are built with optimized armv6 and armv7 flags.

    Should work on Android 2.x and up.

    I have attached 2 versions to this thread, compressed and uncompressed.
    I had to change the extension to xap otherwise I can't upload it.
    Just remove the extension.

    Just download and run the uncompressed file, whereas compressed you have to uncompress it first.

    Here's 2 alternative download links:

    Compressed:


    armv6

    http://d-h.st/58Nn

    armv6-nofpu

    http://d-h.st/2ruo

    armv7

    http://d-h.st/UyJD

    armv7-pie

    http://d-h.st/xY2U



    Uncompressed:


    armv6

    http://d-h.st/P5Im

    armv6-nofpu

    http://d-h.st/z0Ca

    armv7

    http://d-h.st/iiuF

    armv7-pie

    http://d-h.st/0Kp9

    I now run 4 tests on the built binary.
    1. I import the chinook test database using -init and dump it.
    2. I open the already created sqlite database and dump it.
    3. I vacuum the chinook database.
    4. I reindex the chinook database.

    Added 64bit file support, but it has not been fully tested.

    Hopefully someone can do some tests with large five gigabyte data bases,
    otherwise I'll get to it eventually.

    Also, since I've actually made changes to the sqlite3 code since the update in January, I've created a github.
    http://github.com/tech128/sqlite3
    9
    My current sqlite3 binary won't work on Lollipop because it needs to be a PIE (position independent executable) and so far I haven't been able to find one compiled that way. Is yours?

    Thanks

    I'll attach one that I have working for me. You'll need to extract the zip and then place sqlite3 in /system/xbin and then you should be able to call your sqlite3 similar (if not the same) as you did before.
    8
    Hi all, here is the archive of compiled binaries of the latest snapshot 201606031859 of SQLite for the next architectures:
    1. armeabi
    2. armeabi-v7a
    3. arm64-v8a
    4. mips
    5. mips64
    6. x86
    7. x86_64
    All binaries was compiled with PIE support. Archive includes:
    • sqlite3-static
    • sqlite3-dynamic
    • libsqlite3.so
    for each architecture.

    You can download it here - sqlite-snapshot-201606031859-binaries-all-abi.7z. Also i was write a small guide how to compile SQLite using Windows PC and Android NDK, it's here. Initially it's in russian, but you can use Google Translate to read it.
    6
    New binary!

    UPDATE: Just compiled this using latest stable source (3.21.0). Compiled static, includes readline support.

    Command line used, if anyone's interested (on a Debian 9 box):
    Code:
    arm-linux-gnueabihf-gcc-6 -march=armv7 -pipe -pie -I. -DSQLITE_THREADSAFE=0 -DSQLITE_ENABLE_EXPLAIN_COMMENTS=1 -DYYSTACKDEPTH=0 -DHAVE_READLINE=1 $( ncursesw5-config --cflags ) -fno-strict-aliasing -O3 -L. -Wl,--no-as-needed -Wl,--no-dynamic-linker *.c -static -ldl -lreadline -lhistory $( ncursesw5-config --cflags ) -s -o sqlite3-3.21.0-armv7
    6
    So I finally managed to update Sqlite after 5 months.

    I am the busiest person I know, always trying to do a million things.

    I rarely will drop a project, and when I do, I always leave some kind of explanation ( Just in case people wonder if the project is dead, etc )