5

Specifically, I was trying to use the sqlite3 command with the ADB shell to run some queries on the database of the Android application I'm building.

I kept getting "sqlite3: permission denied". I'm developing on a Nexus One that I purchased from Google. Does my phone need to be rooted or something?

$ sqlite3 /data/data/com.moodme.android/databases/moodme.db
sqlite3 /data/data/com.moodme.android/databases/moodme.db
sqlite3: permission denied
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Julian A.
  • 10,928
  • 16
  • 67
  • 107

1 Answers1

5

The files are read protected. You need to root your phone or use the emulator.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Nathan Schwermann
  • 31,285
  • 16
  • 80
  • 91
  • Thanks. Successfully rooted my nexus one. Now getting a different error. Opening new question for that at http://stackoverflow.com/questions/3645319/why-do-i-get-a-sqlite3-not-found-error-on-a-rooted-nexus-one-when-i-try-to-ope – Julian A. Sep 05 '10 at 07:30
  • 1
    seems like being able to look at database content is a part of software development. Why need to root the phone to do that? – xster Dec 15 '10 at 01:14
  • 1
    It's a protection mechanism. It helps keep developers from snooping at the details of other apps on their phone. Legitimate developers are expected to purchase a Dev phone from Google that is already unlocked, so you can use SQLite3 in this way, as well as explore the `/data` directory structure. – Jake Wilson Oct 31 '11 at 20:41