1

I want to do SQLite command like sqlite3 myDb.db, or do other SQLite command from Android shell, like Terminal Emulator or something else.

I have tried googling for these, but no luck. Is it possible to do that? If it is, how to do it?

I'm using locally-made Android phone in my country, based on Jelly Bean OS.

Andrew T.
  • 15,988
  • 10
  • 74
  • 123
ian cikal
  • 13
  • 1
  • 3
  • Closely related: http://android.stackexchange.com/questions/5053/where-can-i-obtain-an-sqlite3-command-line-binary-for-android-2-2-1 – Andrew T. Sep 03 '15 at 05:42

2 Answers2

1

Yes, it's possible if you have sqlite3 binary for Android installed. Most of Android devices don't have this binary. If your device doesn't have it, then you need to get the proper binary and install it (refer to Where can I obtain an SQLite 3 command line binary for Android?). Note that you need root access to do this.

After getting the sqlite3 binary, place it inside system/bin/ (or system/xbin/). After this, you just need to test if the terminal can access the binary by calling sqlite3 from there. If it shows sqlite> prompt and SQLite version, then you're done.

For usage hints, on sqlite3, write .help.

sqlite> .help
Andrew T.
  • 15,988
  • 10
  • 74
  • 123
0

You can use Termux for installing sqlite.

Type

$ pkg I sqlite

and there you go on Android.

Andrew T.
  • 15,988
  • 10
  • 74
  • 123
Ren Hiyama
  • 101
  • 1