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.

  • Closely related: android.stackexchange.com/questions/5053/… – Andrew T. Sep 3 '15 at 5:42
  • @Andrew T, you refference me? the other question maybe look like same with me. but I'm not developed, I am pure user work in android not in PC. can you give me other refference? – ian cikal Sep 3 '15 at 6:01
  • Since you mentioned Android shell, some of answers from there should work. The main problem is, most of Android devices don't have sqlite3 binary installed. That's why you can't call sqlite3 myDb.db from Android. If sqlite3 binary for Android is installed correctly on the device, then there should be no problem. Refer to SQLite binary on XDA forum – Andrew T. Sep 3 '15 at 6:14
  • great, why these answers not in mind.. anyway thanks for answering my question.. – ian cikal Sep 3 '15 at 6:17
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
  • 1
    +1 There is also SQLite Installer for root that would install the binary for you. – Firelord Sep 3 '15 at 9:07
  • @Andrew thanks for advance. I'm going to try it. I'll report if find any trouble.. Firelord thanks too, I would not try apk anymore, one time I has try and the result I can't do more. that's only allow me to work with menu's inside apk. thank's a lot guy's.. – ian cikal Sep 7 '15 at 4:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.