# Latest SQLite binary for June 2015



## tech128 (Apr 25, 2014)

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


----------



## soreaga (Apr 26, 2014)

is this will work on other device ?

my device is sony xperia C JB 4.2.2


----------



## juejiang (May 3, 2014)

*usefult app*

usefult app,Thanks for sharing


----------



## tech128 (May 3, 2014)

soreaga said:


> is this will work on other device ?
> 
> my device is sony xperia C JB 4.2.2

Click to collapse



Yes this will work on any android device that has android 2.0 or higher.

So it will work fine on your sony xperia C JB 4.2.2


----------



## E:V:A (May 27, 2014)

Did someone test this on a Samsung? I'm asking because this binary is dynamically linked and thus dependent on libraries not being non-standard...


----------



## joluke (May 27, 2014)

Does this app:

*[Play Google] SQLite Installer for Root*

Do the same? But this one is dated from 1 of March of 2014... don't know if it does include the up to date binary

*Edit:* Only includes the following versions:
3.7.16
3.7.15.1
3.7.15
3.7.14
3.7.11

So yours is up to date


----------



## E:V:A (May 31, 2014)

@tech128 If you want your _sqlite3 _to be device independent you have to make it *statically* linked. You current version does not work on my 4.2.2.
(It runs, but crashes as soon as you specify a db file, because of unmatched .so files.)


----------



## tech128 (Jun 1, 2014)

E:V:A said:


> @tech128 If you want your _sqlite3 _to be device independent you have to make it *statically* linked. You current version does not work on my 4.2.2.
> (It runs, but crashes as soon as you specify a db file, because of unmatched .so files.)

Click to collapse


 @E:V:A

It is a honor to have you post in my thread.  Thank you for letting me know it does not work on your system.

I have read many of your threads, extremely informative.  One day I hope to memorize all of what you have written.

I compiled sqlite3 dynamically because it is a little easier on the memory subsystem and has a smaller output filesize.

I tested it on several android 2.3 / 4.3 / 4.4 systems and they all seemed to work fine so I thought it would be ok.

Especially since all that is dynamically referenced is libc and libdl.

I have just compiled a static version but I need to test it before posting it.

I will update the op soon.


----------



## kien_vip (Aug 14, 2014)

your sqlite3 can reindex, but it can not vaccum. u can re-check it


----------



## tech128 (Aug 31, 2014)

kien_vip said:


> your sqlite3 can reindex, but it can not vaccum. u can re-check it

Click to collapse


 @kien_vip

Thank you for letting me know about this issue.

I test sqlite before I release it, but there are no test suites for it, barring one which requires tcl, which I have no desire to compile since there's no other use for it.

The current sqlite can probably only reliably work with databases up to 2 or 4 GB

Which usually isn't a problem since most sqlite databases are well under that amount.

I've been trying to compile an updated sqlite with proper 64 bit file support.

Since 64 bit file support is a bit wonky on android, this has been a bit tough.

Also, I've been rather busy since I last released the binary, so I haven't had much time to think about compiling in general.

I'll do my best to get a new binary out soon-ish.


----------



## phangs23 (Sep 29, 2014)

How do I use this? please help, I'm doing a research on how to speed up an application that uses sqlite database.  Right now, this is one option.


----------



## fr3quency (Oct 11, 2014)

Armv6 flags? So it's useless on Nexus 4/5 etc with armv7 CPUs? Can we find one which is optimised for high end devices?


----------



## tech128 (Nov 11, 2014)

fr3quency said:


> Armv6 flags? So it's useless on Nexus 4/5 etc with armv7 CPUs? Can we find one which is optimised for high end devices?

Click to collapse



No not useless, just less than optimal.  Not really sure of the speedup, since I don't do benchmarks.  I try to optimize it as much as possible without breaking it x_X

I was initially planning to put out both armv6 and armv7 ports at the same time, but then I realized most android utilities aren't compiled with proper 64bit file support.

So I've been trying to figure that out first.  And also, most people don't use sqlite for anything earth-shattering anyway, mostly vacuum, reindex, create database from sql statements, etc.

Oooooo just saw this while searching for sqlite performance enhancements.  https://sqlite.org/src4/doc/trunk/www/design.wiki

Very nice.

I'd also like to try to switch to musl as the standard library since alireza7991 has said it makes things smaller and faster.  Not sure how feasible that will end up for me though...

It doesn't look like sqlite can parallelized at all though.  See here: http://blogs.perl.org/users/timm_murray/2013/02/sqlite-and-writes.html

There is a fork/variant of sqlite called paralite that uses threading, but I don't think it retains the same file format compatibility and it looks like it introduces some bugs.

Unfortunately real life stuff takes precedence so things will progress slower than I would like.  But at least I know there's lots to look forward to even just for sqlite lol.


----------



## nanobrain (Nov 20, 2014)

*Will it work on L?*

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


----------



## maττ (Nov 30, 2014)

nanobrain said:


> 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

Click to collapse



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.


----------



## nanobrain (Nov 30, 2014)

maττ said:


> 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.

Click to collapse



Mahalo


----------



## tdunham (Dec 11, 2014)

maττ said:


> 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.

Click to collapse



This SQLite seems to be Android L (5.0) compatible on the Galaxy S5.
I appreciate the upload as well.  I was getting the PIE errors too when trying to verify sql scripts were running.


----------



## maττ (Dec 11, 2014)

nanobrain said:


> Mahalo

Click to collapse





tdunham said:


> This SQLite seems to be Android L (5.0) compatible on the Galaxy S5.
> I appreciate the upload as well.  I was getting the PIE errors too when trying to verify sql scripts were running.

Click to collapse



Awesome! Glad to hear this helped you out. I was in a pickle with that one when it first came out as well because a lot of my Tasker stuff depends on sqlite.


----------



## eyesfortech (Dec 12, 2014)

Thanks for this, I am one of those enthusiasts who focuses on tweaking my phone and I am currently testing your version of sqlite3 on my MT6582 devices.

On my script, your version of sqlite3 is working like a charm... I will still observe.

Here's a snippet of my defrag script.



> Database /data/data/com.android.dialer/databases/dialer.db:  VACUUM=SUCCESS  REINDEX=SUCCESS
> Database /data/data/com.android.providers.downloads/databases/downloads.db:  VACUUM=SUCCESS  REINDEX=SUCCESS
> Database /data/data/com.google.android.gms/databases/upload_queue.db:  VACUUM=SUCCESS  REINDEX=SUCCESS
> Database /data/data/com.google.android.gms/databases/google_analytics.db:  VACUUM=SUCCESS  REINDEX=SUCCESS
> ...

Click to collapse


----------



## eng.ahmed.android (Dec 12, 2014)

*What is sqlite binary?*

I am an android developer and using sqlite database but i didn't hear before about sqlite binary!
Could you please explain me what is this ?

Thanks in advance


----------



## eyesfortech (Dec 12, 2014)

maττ said:


> 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.

Click to collapse



Thanks for this, I've tried this also on my Android 4.4 MTK6582 defrag and VACUUM scripts and it worked


----------



## simoneluconi (Dec 28, 2014)

Thanks! Working in my xioami mi3!


----------



## sabret00the (Dec 29, 2014)

maττ said:


> 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.

Click to collapse



Thanks.


----------



## tech128 (Jan 2, 2015)

Alright guys, enough with the posts for other sqlite binaries. 

I've just released the latest sqlite v3.8.7.4 with 64bit file support (untested as of yet), Android 5.0 support, and optimized arm v6 and v7 binaries.

As soon as the 64bit file support is tested and the musl library is integrated, it should be just about perfect.


----------



## gazzacbr (Jan 7, 2015)

nice.
working just fine on my HTC M8 with MaximusHD ROM.
I assume the version already in /system/xbin was out of date.


----------



## stockrt (Jan 12, 2015)

*How to build the sqlite3 binary and library yourself.*

For those looking how to hack using SQLite CLI (Command Line Interface) with adb shell in any Android device:

How to build the sqlite3 binary and library yourself.

I have put together some build scripts to compile SQLite for Android Native Code using the Android NDK. It builds the SQLite CLI in two versions: Statically and Dynamically Linked, as well as it's Static and Shared Libraries. You may get the scripts from my GitHub and build the binaries yourself:

http github/stockrt/sqlite3-android

Hope this will be useful for someone.


----------



## Mlesir (Jan 23, 2015)

Hi tech128!

I have maked an app with tasker. This app use sql3 to write and read in whatsapp.
But to one user that have lollipop my app dont works because sql3 binaries of my app are for older android versions. Sql3 system dont works too, it seems my app can not use sql3 system.
So i ask you if i can in my app link to this post to users could download your binaries.
You hace any problem with this?
And what about include binaries un my app?

Anyway and with any respond to my question thanks for your work.
Sorry forma my bad english.


----------



## Bonoboo (Jan 26, 2015)

tech128 said:


> Here's SQLite 3.8.7.4 combined into a single source file

Click to collapse



Huge thanks for sharing!
This is only binary I found that include all needed for me:

1. Fresh – contains required new features
2. Standalone – not depends from system _libsqlite.so_
3. Lollipop compatible – no "PIE problem"


----------



## tech128 (Jan 27, 2015)

Mlesir said:


> Hi tech128!
> 
> I have maked an app with tasker. This app use sql3 to write and read in whatsapp.
> But to one user that have lollipop my app dont works because sql3 binaries of my app are for older android versions. Sql3 system dont works too, it seems my app can not use sql3 system.
> ...

Click to collapse



No problem, you can use my compiled apps any way you wish.  I'm just happy to be of service to the community. :highfive:


----------



## Mlesir (Jan 27, 2015)

Lot of thanks tech128!


----------



## IgnitusBoyone (Jan 28, 2015)

Everything seems to be working as intended.


----------



## Mlesir (Jan 28, 2015)

It works: for user of my app in android 5.0 but for me too with android 4.4.4 OnePlus one and cyanogen. I test to put your binaries in /system/xbin in my phone and it works.
One question: i believe your binaries works too to phones that have an android versión but have a version of sqlite3 that no correspond  with android isn't it?


----------



## toby12188 (Jan 29, 2015)

any chance this could be recompiled with support for FTS3? I have an m8 running lolllipop and when i try to delete something from my sms database i get "Error: No such module: FTS3"


----------



## Bonoboo (Feb 6, 2015)

@tech128
Again thanks for this fresh binary.

I have some issues with converting UNIX-time compared to built-in binary.
At example command:

```
sqlite3 <here_file> "select datetime('now','localtime');"
```

– Built-in: returns correct time with timezone offset (preferred, data ready for use).
– Your: returns UTC time without using phone's offset.

This causes problems with my use-case.
Same version (3.8.7.4) Windows EXE from official site returns correct time with timezone offset.

Please, can you comment this?
Maybe this is due wrong linked libs or something else?

*UPD:* ok, took binary from WhatsTasker APK (nevermind), it have 3.8.8 version.
And it returns correct local time!
So something wrong in this compiled version.

If some one will have those issues, I attached that binary, it's Lollipop-compatible too.


----------



## tech128 (Feb 7, 2015)

@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.

@Bonoboo

Thanks for letting me know of this issue.  I'll look into what is causing this and correct it.

*Update*

Trying to figure out issues with google's new ndk, having a lot of issues with static library linking.

I might have to downgrade to gcc 4.8.

I don't particularly want to do that however.


----------



## killoid (Mar 17, 2015)

@tech128 can u update it to v3.8.8.3 plz? specifically the armv6 one. thanks in advance.


----------



## tech128 (Mar 19, 2015)

killoid said:


> @tech128 can u update it to v3.8.8.3 plz? specifically the armv6 one. thanks in advance.

Click to collapse



Working on it right now, finally had some time yesterday at my dad's office to work on it.  Trying to find the issue with the datetime function and utc time.

None of the easy solutions have gotten anywhere, so I'm debugging it now.


----------



## edgarf28 (May 9, 2015)

tech128 said:


> Working on it right now, finally had some time yesterday at my dad's office to work on it.  Trying to find the issue with the datetime function and utc time.
> 
> None of the easy solutions have gotten anywhere, so I'm debugging it now.

Click to collapse



Any update on this @tech128 ?


----------



## Rydah (May 9, 2015)

edgarf28 said:


> Any update on this @tech128 ?

Click to collapse



+1

*Sent From My HTC One (M9)*


----------



## tech128 (May 9, 2015)

Thanks guys, I was actually going to just post an update this weekend, but I've got some errands to run first.

I figured out what was causing the problem.

Apparently when binaries are statically linked, they are unable to properly use certain android functionality.

One of which being the localtime() function.

So now I'm switching back to dynamically linked binaries because of this.

Like eva said previously, some non-standard android versions will have issues with this.

But there's currently nothing I can do about that.

It has to be dynamically linked to work properly.


----------



## tech128 (May 17, 2015)

Well I got a little too busy this week to do much of anything, but I was able to get the armv6 versions compiled.

The armv7 versions work, but have pie-related issues.

Basically from now on there will be four sqlite3 versions.

1. armv6 w/ floating point support (this will be referred to as armv6)
2. armv6 w/o floating point support (this will be referred to as armv6-nofpu)
3. armv7 w/ pie support (this will be referred to as armv7-pie)
4. armv7 w/o pie support (this will be referred to as armv7)

That way it will work on all androids (with the exception of non-standard android environments)

It won't work on armv6 devices that have lollipop, but I couldn't find any of those, just kitkat.

We'll see if I can get the pie issues resolved tomorrow so I can release it, but I'm still pretty busy so who knows exactly atm.


----------



## steadfasterX (May 28, 2015)

thanks very much. you saved my day! :good::good:


----------



## glumetu (Jun 2, 2015)

Hi all, a small question from my side.

I am running a Tasker shell script using sqlite3 commands on my rooted Note 3 with Lollipop 5.0 and have downloaded the corresponding sqlite-armv7 from here and pasted it (with proper rights) to the /system/xbin folder.

However when I run the task in Tasker I get the following error:
SQLite header and source version mismatch (one of the dates is in 2014 and the other one is in 2012!)

Any idea how to fix this - I'd really appreciate it!


----------



## tech128 (Jun 11, 2015)

@xdajog

No problem, happy to help!

@glumetu

Well I'm not 100% positive, but I think the problem is caused by sqlite-armv7.

Since I just created pie-compatible versions today, which is what lollipop and later need to work properly.


----------



## tech128 (Jun 11, 2015)

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 )


----------



## Kionei (Jun 11, 2015)

I just tried the sqlite3.armv7-pie.apk on my Moto X (2014), but I get a *Parse error* on install - *There was a problem parsing the package*.  Any ideas?


----------



## andrew.mackew (Jun 13, 2015)

I wonder, which one is the one for Note 3 (N9005) and Note 4 (N910C)? Just paste it to the correct directory and done? Do I have to run any script? What about the apk file? Should I need to install it too? Thanks


----------



## tech128 (Jun 19, 2015)

@Kionei and @andrew.mackew

Yes, you just rename the binary to sqlite3 and place it into /system/xbin and change the permissions to 755 or rwxr-xr-x

It is not really an apk, I had to name it like that because the forum system doesn't let me upload programs without an extension.

I'll use the pdf extension next time like Zepplinrox does, probably should make it a little less confusing.


----------



## Kionei (Jun 19, 2015)

That I understand, and it works fine.  I'm not sure how I glossed over it.  It's a shame you can't upload without an extension.  As stupid as it sounds, I would put something like this your OP:


Download appropriate file
Rename to /system/xbin/sqlite3
Change permissions to 755

Maybe it'll save you from having to answer some foolish posts .


----------



## edgarf28 (Jul 30, 2015)

@tech128 any change that we can get an updated SQLite 3.8.11.1 binary?


----------



## tech128 (Jul 31, 2015)

edgarf28 said:


> @tech128 any change that we can get an updated SQLite 3.8.11.1 binary?

Click to collapse



Sure, not a problem.

I haven't checked the sqlite homepage recently, so I didn't notice they updated it again.

I'd like to put a web page watcher on it, but all of them make you register or sign up.

For such a simple thing, I don't feel that should be necessary.

I'll see if I can find some time tomorrow to update it hopefully.

If not, then it will have to be on Sunday because I will be very busy on Saturday.


----------



## tech128 (Aug 3, 2015)

Ok, the binaries are updated to the latest again.

I can't seem to edit the title like I used to be able to though.

I tried 4 different browsers, same result.

I don't know any mods, so I guess it's stuck that way for now :x

On a brighter note, I did manage to find a web page watcher that looks very nice and was exactly what I was looking for.

It's called changemon


----------



## tech128 (Aug 6, 2015)

Well I just tried to compile SQLite v4, but they use a custom parser, so it doesn't work too well to try and cross-compile it atm.

Hopefully they're only doing that for dev purposes atm.

I'll keep trying every once in awhile to see if it'll compile...


----------



## Rydah (Aug 28, 2015)

tech128 said:


> Ok, the binaries are updated to the latest again.
> 
> I can't seem to edit the title like I used to be able to though.
> 
> ...

Click to collapse



Thanks, appreciate the update!



tech128 said:


> Well I just tried to compile SQLite v4, but they use a custom parser, so it doesn't work too well to try and cross-compile it atm.
> 
> Hopefully they're only doing that for dev purposes atm.
> 
> I'll keep trying every once in awhile to see if it'll compile...

Click to collapse



Looking forward to it!

---------- Post added at 10:55 AM ---------- Previous post was at 10:39 AM ----------

which would work on an arm64 v8? (LG G4)


----------



## tech128 (Aug 29, 2015)

@Rydah805

I'm not really sure.  I don't have any access to arm64 capable hardware, so let me know.

I would think that only the armv7-pie version would work since arm64 is pretty new-ish and everything since lollipop requires pie.

I mean there are have arm64 emulators, but I don't have the time to play with that atm...


----------



## Rydah (Aug 29, 2015)

tech128 said:


> @Rydah805
> 
> I'm not really sure.  I don't have any access to arm64 capable hardware, so let me know.
> 
> ...

Click to collapse



Will try. Do I remove the file extension?

*Sent From My LG G4*


----------



## tech128 (Aug 29, 2015)

@Rydah805

Generally yes, but it's not required.

Android is not like windows where the file extension needs to be exe com scr

What matters most are the permissions.  Usually I do chmod 755 file


----------



## Rydah (Aug 29, 2015)

tech128 said:


> @Rydah805
> 
> Generally yes, but it's not required.
> 
> ...

Click to collapse



The armv7-pie worked well on my LG G4. ???

Thanks! Appreciate your work.

*Sent From My LG G4*


----------



## ReneLeonhardt (Oct 6, 2015)

*Binaries for Intel x86 and SQLCipher (encrypted databases)*

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


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...

Are the release builds optimized for space to minimize the resulting APK size?

Would it be possible to cooperate with Zetetic.net /sqlcipher/sqlcipher-for-android/ to create encrypted databases with the latest SQLite driver?
Thank you and keep up the good work, greetings from Germany!


----------



## Miche1asso (Oct 12, 2015)

I installed the armv7-pie version in my Xperia M2 with Lollipop 5.1.1. So far it works great. It was exactly what i was looking for. thanks.


----------



## tech128 (Oct 14, 2015)

@ReneLeonhardt

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


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...

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...

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!


----------



## ReneLeonhardt (Oct 14, 2015)

*SQLite 3.9.0 released with JSON and FTS5 awesomeness!*



tech128 said:


> Sure I can compile x86 and x86-64 binaries if you want...
> 
> 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...
> ...

Click to collapse



 Thank you, x86 and x86-64 binaries would be very helpful for debugging apps in the emulator!
 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! 
 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


----------



## MichaelEdevag (Oct 14, 2015)

need to get 10 posts for developer forum


----------



## hansmoon (Oct 17, 2015)

deleted


----------



## gopi.g (Oct 21, 2015)

How can binary file supported to htc pico


----------



## Rydah (Oct 21, 2015)

hansmoon said:


> http://www.mediafire.com/download/hfqw8v3snz0hgbn/sqlite3
> 
> i compiled sqlite3 arm 3.9.0 with FTS5.
> not x86.
> ...

Click to collapse



armv8-pie support would be nice.


----------



## hansmoon (Oct 22, 2015)

deleted


----------



## Rydah (Oct 22, 2015)

hansmoon said:


> https://github.com/stockrt/sqlite3-android
> 
> You Can Compile SQLITE3 Excutable Binary... Also...

Click to collapse



What's the process? I didn't understand it. LOL


----------



## hansmoon (Oct 23, 2015)

deleted


----------



## vrgolin (Oct 25, 2015)

gys , where can i find SQLite mods?


----------



## osygen (Oct 27, 2015)

Just confused, how do I know which one works with galaxy s4.


----------



## frwerewolf (Oct 29, 2015)

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 (Nov 6, 2015)

*sqlite3 64bits*



maττ said:


> 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.

Click to collapse



Thank you so much.
Please where from you have it? Because I will be looking for the 64bits version.

BR,
amplatfus


----------



## tech128 (Dec 12, 2015)

@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.


----------



## hansmoon (Dec 13, 2015)

@tech128

Sorry, My mistake ...

Sent from my SHV-E210S using XDA Free mobile app


----------



## ReneLeonhardt (Dec 14, 2015)

@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 (Dec 30, 2015)

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 (Dec 30, 2015)

tech128 said:


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

Click to collapse



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


----------



## yingjai (Jan 6, 2016)

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.


----------



## bdanders (Jan 20, 2016)

yingjai said:


> 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)
> ...

Click to collapse



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.


----------



## yingjai (Jan 21, 2016)

bdanders said:


> 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.

Click to collapse



Your X Pure is ARM64 like the Nexus 6P. The sqlite3 binaries I've found are all for 32 bit processors. None of them worked.


----------



## bdanders (Jan 21, 2016)

yingjai said:


> Your X Pure is ARM64 like the Nexus 6P. The sqlite3 binaries I've found are all for 32 bit processors. None of them worked.

Click to collapse



That's what I figured. Keep me in mind if you find something that works. I guess I'll keep searching.


----------



## yingjai (Jan 21, 2016)

bdanders said:


> That's what I figured. Keep me in mind if you find something that works. I guess I'll keep searching.

Click to collapse



Same to you please and thanks.


----------



## ultrasound1991 (Jan 25, 2016)

Hi, how to do a statement in WAL mode?
I get often error: database is locked.
I need that select statement work always while delete or insert statement is in progress.


----------



## hansmoon (Jan 29, 2016)

*Sqlite3 android binary*

deleted


----------



## yingjai (Jan 29, 2016)

hansmoon said:


> extract sqlite3 zip
> put into /system/bin (or /system/xbin)
> permission 755
> 
> ...

Click to collapse



I got this on the Nexus 6P after placing in /system/bin:

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

At least the executable that's causing an error is different than before...?


----------



## hansmoon (Jan 29, 2016)

Sorry. I Can't Build arm64 version.

Sent from my SHV-E210S using XDA Free mobile app


----------



## -tsubakurou- (Feb 10, 2016)

Could you upload again ?(3.10.2)
We apologize for your trouble , but thank you


----------



## lars1525 (Feb 20, 2016)

Maybe a solution:
h**ps://play.google.com/store/apps/details?id=com.jordanhotmann.taskersqliteplugin

It doesn't work for me yet but it's a beginning.


Edit: 
Finally working with 64 bit exec from here and normal Tasker shell action. Just enter this before (return after and then normal sqlite3 command): *su -cn u:r:system_app:s0*

h**ps://groups.google.com/forum/?fromgroups#!topic/tasker/CQ1zoxisluo
h**ps://groups.google.com/forum/?fromgroups=#!topic/tasker/_XBxvx5nww8


----------



## Sachiru (Apr 15, 2016)

How about SQLite 3.12?


----------



## chtioui_khaled (Apr 28, 2016)

Rydah805 said:


> The armv7-pie worked well on my LG G4.
> 
> Thanks! Appreciate your work.
> 
> *Sent From My LG G4*

Click to collapse



How to install it on LG G4 ?


----------



## jacomail95 (May 19, 2016)

SQLite 3.13.0 has been released yesterday, can anyone compile it for Android with PIE support? Thanks
http://www.sqlite.org/releaselog/3_13_0.html
Inviato dal mio Nexus 4 con Tapatalk 2


----------



## jibijose (May 31, 2016)

*sqlite3 xiaomi mi4 marshamallow working*

http stackoverflow com/questions/3645319/why-do-i-get-a-sqlite3-not-found-error-on-a-rooted-nexus-one-when-i-try-to-op and PIE armv7 version of sqlite3 worked for me. Thanks.

Came in here to automate 3G to 2G switching


----------



## ravilov (Jun 15, 2016)

Hello,

Any chance of readline support statically linked in? Need it for ARMv7 with PIE.


----------



## DeckerSU (Jun 27, 2016)

Hi all, here is the archive of compiled binaries of the latest snapshot *201606031859* of SQLite for the next architectures:

armeabi
armeabi-v7a
arm64-v8a
mips
mips64
x86
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.


----------



## ashatter (Jul 14, 2016)

DeckerSU said:


> Hi all, here is the archive of compiled binaries of the latest snapshot *201606031859* of SQLite for the next architectures:
> 
> armeabi
> armeabi-v7a
> ...

Click to collapse



I understand that it may be a stupid question. I'm using CM 13. I would like to know which file I should put at what location

Thanks a lot!


----------



## d_borghi (Aug 5, 2016)

Sorry,
In my thl t11 it works well. But in my new xiaomi redmi 3 pro (miui8) i can't install script. 
Why?
I must use it combined with tasker to read whatsapp messagges.
Tnx


----------



## Shripal17 (Sep 9, 2016)

Thanks a lot for adding 64 bit support! It works well!

---------- Post added at 02:08 PM ---------- Previous post was at 02:00 PM ----------

can you also make pie version for zipalign? it doesnt seem to work in marshmallow


----------



## RFrancis (Oct 16, 2016)

Upon reboot I loose the SQLite package from xbin... Any ideas ?


----------



## Asahui (Oct 23, 2016)

Can someone compile a version that with readline support in Android?


----------



## mctiew (Oct 29, 2016)

Tried running it in terminal emulator and adb, works.

Tried running it in TWRP terminal, says not found. 

Is there any version I should be using ?

Tested based on the static version with arm64-v8a and armeabi-v7a.

I wanted to use it in TWRP to edit something when the system isn't working.


----------



## jacomail95 (Oct 29, 2016)

New version online it seems, i hope someone can adapt and build it for android
https://sqlite.org

Inviato dal mio Nexus 5 con Tapatalk 2


----------



## TripCode (Nov 3, 2016)

jacomail95 said:


> New version online it seems, i hope someone can adapt and build it for android
> https://sqlite.org
> 
> Inviato dal mio Nexus 5 con Tapatalk 2

Click to collapse



I was looking for the same. I had to build my own.  SQLite 3.15.0 attached.


----------



## jacomail95 (Nov 3, 2016)

TripCode said:


> I was looking for the same. I had to build my own. SQLite 3.15.0 attached.

Click to collapse



Thank you so much, you've been kind to post it also here. Can you point me to instructions on how to build the SQLite for Android exclusively?


----------



## ultrasound1991 (Nov 4, 2016)

Hi, i am able to get notifications count from facebook app with this statement:

sqlite 3 /data/data/com.facebook.katana/databases/notifications_db "SELECT COUNT(seen_state) FROM gql_notifications WHERE seen_state = 'UNSEEN_AND_UNREAD';"

Do someone know how to get friend request number?


----------



## TripCode (Nov 4, 2016)

jacomail95 said:


> Thank you so much, you've been kind to post it also here. Can you point me to instructions on how to build the SQLite for Android exclusively?

Click to collapse



You're welcome.

See: https://github.com/stockrt/sqlite3-android

1.) Edit Makefile

```
# http://www.sqlite.org/download.html
SQLITE_VERSION  ?= 3150000
SQLITE_BASENAME := sqlite-amalgamation-$(SQLITE_VERSION)
SQLITE_URL      := http://www.sqlite.org/2016/$(SQLITE_BASENAME).zip
```

2.) Install Android NDK: https://developer.android.com/ndk/downloads/index.html (if not already installed and set the paths)

3.) Run make

Simple. 

If you want Android specific mods you can find the sources here: https://android.googlesource.com/platform/external/sqlite/


----------



## ultrasound1991 (Nov 4, 2016)

TripCode said:


> You're welcome.
> 
> See: https://github.com/stockrt/sqlite3-android

Click to collapse



How to change device architecture target?


----------



## TripCode (Nov 4, 2016)

ultrasound1991 said:


> How to change device architecture target?

Click to collapse



The following cpu architecture targets are automatically generated by default:

armeabi(6)
armeabi-v7a
arm64-v8a
mips
mips64
x86
x86_64

What other cpu architectures could you possibly need for Android?


----------



## TripCode (Nov 8, 2016)

SQLite Release 3.15.1 On 2016-11-04


----------



## BlackHoleOS Dev (Nov 11, 2016)

Will this work on moto e 2015 with Android 7.1 cm14.1 and what one do I use

---------- Post added at 06:20 PM ---------- Previous post was at 06:19 PM ----------




TripCode said:


> SQLite Release 3.15.1 On 2016-11-04

Click to collapse



Can I flash that on moto e 2015 with Android 7.1 cm14.1


----------



## khyr (Nov 13, 2016)

How to install?
Sorry about my noobie question ?
In system/xbin 
The 3 or in system/lib
Giving it 755 permission 
I dont know 
How can I check if is working
Thanks in advance


----------



## lars1525 (Nov 14, 2016)

Well, it seems Tasker is going to add native support for SQL queries, good news.
http://tasker.dinglisch.net/changes/nextversion.html

* action File / SQL Query: local DB file queries


----------



## xdaheaven (Dec 28, 2016)

thanks you ..


----------



## Hoothoot (Feb 19, 2017)

Are those compatible with ARMv8-A 64-bit devices? Really need help here^^

edit: nevermind used tasker plugin instead


----------



## Paz9 (Apr 16, 2017)

Hoothoot said:


> Are those compatible with ARMv8-A 64-bit devices? Really need help here^^
> 
> edit: nevermind used tasker plugin instead

Click to collapse



can you explain?
im trying to find a sqlite3 binary for armv8-a 64bit devices i cant find anything

edit: nevermind found it ^_^


----------



## idcrisis (Apr 17, 2017)

32-bit armv5 binaries run on everything 32-bit.

It is difficult to fathom why on earth for some induced obsolescence people actually use those extra instructions after thumb.

Breaks all sorts of backward portability. Almost assuredly at any optimisation level, the v7 instructions can offer zero speedup.

Instead they should use CLANG so the binary doesn't change even if the CPU is changed to open source.

And hand optimise the underlying C virtual machine if at all. Or machine optimise that keeping the API intact.

And the 64-bit ecosystem is 100 times more expensive because scale has been achieved with the 5 dollar Allwinner board. For again zero speedups.

And the heap size of 256 mb is just wrong when 64mb has proven quick startup and run and cohabitation. Thus halving the effective cost of RAM.

Therefore proving once and for all, that there is an intentional induced obsolescence in all of these devices.

What can developers do, discard 64-bit, reduce heap to 64-bit, and hone in on the perfect set of compiler flags for eg Entware ( their v5 binaries as base not even their v7) to run on all Android. And ART. 

Even the JVM flags standardised across all Android. Possibly investigate if the java native compiler can or is in ART so that the JVM is not used at all.

That's a start.


----------



## d_borghi (Apr 17, 2017)

Hi all,
Anyone know why i can't install sql3 and relative binaries in my xiaomi redmi 3, miui?


----------



## myionzolo (May 15, 2017)

*Ftse support*

Please add FTSE support for arm8 ?



DeckerSU said:


> Hi all, here is the archive of compiled binaries of the latest snapshot *201606031859* of SQLite for the next architectures:
> 
> armeabi
> armeabi-v7a
> ...

Click to collapse


----------



## ravilov (Jan 5, 2018)

*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):

```
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
```


----------



## cheveguerra (Jan 24, 2018)

virtyx said:


> can you explain?
> im trying to find a sqlite3 binary for armv8-a 64bit devices i cant find anything
> 
> edit: nevermind found it ^_^

Click to collapse



Hi virtyx,

With the sqlite3 from this post:

https://forum.xda-developers.com/showpost.php?p=69448101&postcount=103

you *don't need* an extra plugin.

Regards


----------



## TThunder (Mar 23, 2018)

TripCode, is there a way to contact you off line? I need support with your WhatsApp-Key-DB-Extractor.


----------



## ravilov (Aug 12, 2019)

New version, using SQLite 3.29.0 source. Don't have access to my previous build box so this was compiled using Android NDK and with a command line that is kinda hacked together...


----------



## galaxys (Aug 13, 2019)

Good to see new version! Cheers


----------



## DiamondJohn (May 6, 2021)

I did a new build, for ARM devices








						New SQLite3 Binary v3.40.0 for ALL devices
					

I built the latest stable SQLite3 binary for ARM devices. I built it as I have an app that I requires it, and distribute it with my app TeMeFI , as a lot of people asked to not have to install it as a separate step. TeMeFI app does a LOOOOOT of...




					forum.xda-developers.com


----------

