tags:

views:

39

answers:

1

Hi, I am new to android. I created a data base named as example.db with some tables in SqlLite. It worked fine. It was also created in data/data/com.mypackage.myapp/databases/example.db.

Now, I need to open that database and see the content in the database. How can I do this?

A: 

The Following only works on the Emulator or on a rooted phone.

Open your Command prompt (or Terminal)

1) Traverse to `\android-sdk-XXX\tools`
2) Type in `adb shell`
3) cd /data/data/com.mypackage.myapp/databases/
4) sqlite3 example.db

Now you have an SQL Interface for your Database.

Select * from TableName;
st0le
it shows permission denied
MaheshBabu
Are you using a Phone? I was under the impression you were talking about the emulator. You can't access the DB of a phone, unless you have a `rooted` phone.
st0le