scientiffic
scientiffic

Reputation: 9415

Android SQLite Database: Cannot View Data Folder Contents

I am following the example in the Learning Android book for creating a database, and it looks like I am successfully creating the database (in my SQLiteOpenHelper, it is not re-running onCreate). But when I try to use the Eclipse file explorer to view the database file in data/data/, no files appear.

I also tried to open the sqlite file through the adb shell, but when I attempt to list the files in the directory data/data/, it tells me "opendir failed, Permission denied"

My question is do I need to root my phone in order to view the database files?

Thanks for your help!

Upvotes: 0

Views: 2415

Answers (4)

scientiffic
scientiffic

Reputation: 9415

thanks for your help, everyone. I ended up rooting my phone, but I can't view any of my files in the Eclipse File Explorer:

Android: No files appearing in File Explorer

If you know how to fix this, please let me know!

Upvotes: 1

Jade Byfield
Jade Byfield

Reputation: 4816

There's a neat little plugin for Eclipse called CellObject SQLite Browser that allows you to view the sqlite database and it's contents(not modify). Try launching an emulator and then navigating to the File Explorer tab, find your app's package name, data folder, and open the db file by clicking the plugin icon(it will automatically include an icon right next to the DDMS option)

Upvotes: 0

DcodeChef
DcodeChef

Reputation: 1550

Use emulator to view database files. Look for file explorer in eclipse.

Upvotes: 0

Gabe Sechan
Gabe Sechan

Reputation: 93726

Yes. Unless you root your phone, you can't see the data/data folder for any app.

Upvotes: 1

Related Questions