Giter Site home page Giter Site logo

sqlite3-android's Introduction

SQLite build scripts for Android

This build scripts generate the following SQLite artifacts for Android:

  • Statically Linked CLI

    • sqlite3-static
  • Static Library

    • libsqlite3.a
  • Dynamically Linked CLI

    • sqlite3-dynamic
  • Dynamically Linked Shared Object Library

    • libsqlite3.so

Configure your environment

  • Get Android NDK and configure your environment so the command ndk-build can be found in the PATH. This is a build dependency and is necessary to cross-compile and build Android Native Code Applications:

https://developer.android.com/ndk/downloads/index.html

Update SQLite version if needed

  • No download is necessary, Makefile will take care of that for you. Use the download link only to choose any sqlite-amalgamation version number and year:

http://www.sqlite.org/download.html

  • Update Makefile with desired SQLite version and corresponding year. This will be used to build the full download URL from SQLite site.
  vi Makefile

  ...
  SQLITE_VERSION ?= 3160100
  SQLITE_YEAR    ?= 2017
  ...

Build/Compile

  • Make CLI and Library
  make clean
  make

  * Expected output

  [armeabi] Compile thumb  : sqlite3-static-cli <= shell.c
  [armeabi] Compile thumb  : sqlite3-static-cli <= sqlite3.c
  [armeabi] Compile thumb  : sqlite3-a <= sqlite3.c
  [armeabi] StaticLibrary  : libsqlite3.a
  [armeabi] Executable     : sqlite3-static
  [armeabi] Install        : sqlite3-static => libs/armeabi/sqlite3-static

  [armeabi] Compile thumb  : sqlite3-dynamic-cli <= shell.c
  [armeabi] Compile thumb  : sqlite3-dynamic-cli <= sqlite3.c
  [armeabi] Compile thumb  : sqlite3-so <= sqlite3.c
  [armeabi] SharedLibrary  : libsqlite3.so
  [armeabi] Executable     : sqlite3-dynamic
  [armeabi] Install        : sqlite3-dynamic => libs/armeabi/sqlite3-dynamic
  [armeabi] Install        : libsqlite3.so => libs/armeabi/libsqlite3.so

Artifacts

  • CLI
  libs/armeabi/sqlite3-static
  libs/armeabi/sqlite3-dynamic
  • Library
  obj/local/armeabi/libsqlite3.a
  libs/armeabi/libsqlite3.so
  • You may now push SQLite to your Android device
  adb push libs/armeabi/sqlite3-static /sdcard/sqlite3
  adb shell
  mv /sdcard/sqlite3 /data/local/
  chmod 755 /data/local/sqlite3
  /data/local/sqlite3 -help

Note that paths and permissions may vary in your Android device or environment.

Happy hacking!

sqlite3-android's People

Contributors

codezjx avatar fabianfrank avatar stockrt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sqlite3-android's Issues

enable ICU support? [feature]

I'm trying to compile with -DSQLITE_ENABLE_ICU=1 -- it doesn't work straight away due to issues with includes. Any ideas?

SQLite source url changes according to sqlite version

The download url for SQLite has the year of the release as part of the path. The makefile is using 2014 in SQLITE_URL and thus, to download a recent version you have to change SQLITE_VERSION and the year inside SQLITE_URL.

I think the documentation should mention this, or, have a way to automatically know the year that should be used in the url according to the value in SQLITE_VERSION.

readline

Can you add readline support? To use Tab and arrow keys in the interactive shell...

License? :)

I'm simply concerned about that the project has no license set,
not that I can requite anything, but it seems you're trying to share it with the world :)

I'm a student and if you haven't set a license we can't include it in our project, not even by just mentioning you, as we under the current "no existing license" do not have permission to include the usage in our projects :(

I guess you already know it, but github have made this page for fast help of choosing a license
http://choosealicense.com/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.