1

I am trying to exploring Android embedded SQLite database in the command line.

My Android emulator already created with a database named "notebase2" (see the screen shot), but the results in the command line does not reflect that.

The screen shot shows part of my Ubuntu terminal placed on the File Explorer view of my Exclipse DDMS perspective.

enter image description here

1 Answer 1

4

.databases lists the attached databases. You haven't opened or attached any databases. Try this instead:

sqlite3 /data/data/your.applications.package/databases/notebase2
Sign up to request clarification or add additional context in comments.

6 Comments

Still, it lists "main" as the (only) database and "~/notebase2.db" as the file (and further SQL commands fails)
Is the database file called notebase2 or notebase2.db?
File name is displayed exactly as this: /data/data/com.me.main/databases/notebase2.db
@DUKE: Not according to your screenshot it isn't. Your filename is notebase2. Android does not automatically add file extensions to databases you create.
I added the .db extension in my answer without thinking. Try without.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.