Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sqlite3: not found

Tags:

I am trying to reach the sqlite database on my device using the procedure described here: How can i see SQLite Database (No emulator)?

However, I keep on getting sqlite3 not found. I assume I am meant to be entering the commands with the hash (#) sign at the start of the line. I tried with it and got nothing. Without it I get the error message.

The sqlite3.exe file is definitely there and in the path.

Do I have to install something?

like image 711
theblitz Avatar asked Oct 24 '11 15:10

theblitz


People also ask

How do I run SQLite?

Open a command prompt (cmd.exe) and 'cd' to the folder location of the SQL_SAFI. sqlite database file. run the command 'sqlite3' This should open the SQLite shell and present a screen similar to that below.

Does SQLite need to be installed?

SQLite does not need to be "installed" before it is used. There is no "setup" procedure. There is no server process that needs to be started, stopped, or configured. There is no need for an administrator to create a new database instance or assign access permissions to users.


2 Answers

Some manufacturers deliver the devices without sqlite being installed on them. You can copy the sqlite program though from a emulator to your device if the device has an arm processor.

  1. Start the emulator and use the adb command from the platform-tools in android-sdk

    adb pull /system/xbin/sqlite3

  2. Mount the system partition of your device read/write after this tutorial:

    http://android-tricks.blogspot.com/2009/01/mount-filesystem-read-write.html

  3. Use the adb command to copy the sqlite3 file to your device

    adb push sqlite3 /system/xbin/

After you reboot your device the sqlite3 command should work.

Edit (copy from linked page - in the case link becomes invalid). The instructions for step 2 are:

adb shell su mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system 

"Replace /dev/block/mtdblock3 & /system with appropriate device path and mount point, as obtained from cat /proc/mounts"

like image 198
Dyonisos Avatar answered Sep 16 '22 20:09

Dyonisos


  1. Go to Play store --> search for Titanium Backup & install it
  2. adb shell
  3. su
  4. cp /data/data/com.keramidas.TitaniumBackup/files/sqlite3 /system/xbin/
  5. cd /system/xbin/
  6. chmod 755 sqlite3
  7. adbd reboot (just in case)
  8. Enjoy the result
like image 41
Ender Avatar answered Sep 18 '22 20:09

Ender