Version of SQLite used in Android?

Eno picture Eno · Mar 10, 2010 · Viewed 98.6k times · Source

What is the version of SQLite used in Android?

Reason: I'm wondering how to handle schema migrations. The newer SQLite versions support an "ALTER TABLE" SQL command which would save me having to copy data, drop the table, recreate table and re-insert data.

Answer

Mark picture Mark · Dec 7, 2010

UPDATE OCT 2016: Here is a link to the updated official docs which includes the main points in this answer: android.database.sqlite package-level javadoc

Using the emulators:

adb shell sqlite3 --version   

UPDATE: Since SDK 29 (emulator revision 8), the adb shell command gives:

/system/bin/sh: sqlite3: inaccessible or not found

Any ideas why? Issue tracker here.

SQLite 3.28.0 (window functions!):

  • 30-11.0-R (Revision 7 in SDK Manager)

SQLite 3.22.0:

  • 29-10.0-Q (Revision 8 in SDK Manager)
  • 28-9.0-P

SQLite 3.19.4 (for some reason 3.19.4 does not exist in sqlite release notes! so linking to version control check-ins instead):

  • 27-8.1.0-O MR1

SQLite 3.18.2:

  • 26-8.0.0-O (note: O beta versions used 3.18.0)

SQLite 3.9.2:

  • 25-7.1.1-N MR1
  • 24-7.0-N

SQLite 3.8.10.2:

  • 23-6.0-M (note: M Preview 1 (SDK level 22) used 3.8.10)

SQLite 3.8.6.1 (SQLite link is for 3.8.6 because 3.8.6.1 does not exist for some reason):

  • 22-5.1.1-Lollipop

SQLite 3.8.6:

  • 21-5.0-Lollipop

SQLite (unknown):

  • 20-4.4W.2-Android Wear (no emulator available, but probably either 3.7.11 or 3.8.4.3)

SQLite 3.7.11:

  • 19-4.4-KitKat
  • 18-4.3-Jelly Bean
  • 17-4.2-Jelly Bean
  • 16-4.1-Jelly Bean (broken link, see here)

SQLite 3.7.4:

  • 15-4.0.3-Ice Cream Sandwich
  • 14-4.0-Ice Cream Sandwich (broken link, see here)
  • 13-3.2-Honeycomb
  • 12-3.1-Honeycomb
  • 11-3.0-Honeycomb (broken link, see here)

SQLite 3.6.22:

  • 10-2.3.3-Gingerbread
  • 9-2.3.1-Gingerbread
  • 8-2.2-Froyo (broken link, see here)

SQLite 3.5.9:

  • 7-2.1-Eclair
  • 4-1.6-Donut
  • 3-1.5-Cupcake (broken link, see here)

Note: Android SDK level links show where the android.database.sqlite package has changed. Where there is no link (e.g. SDK level 17), indicates no changes to that package.

Note: adb command to get SQLite version only works on emulators and on devices with sqlite3 available: https://stackoverflow.com/a/3645800/444761

For other devices, see Juri's answer.

I have added an Issue #58909 to the Android Issue Tracker. Please star this if you would like to support it.

Note: if you want your app to use the same version of SQLite across all Android versions, consider using this 3rd party SQLite support library.