Thanks everybody! Your´re right. I have root access on the device. The problem was solved, but something strange happened.
Using the shell directly on the device (Better Terminal), the next commands don´t show me the list of tables: >>>Open Better Terminal: # su # sqlite3 /data/data/my_package/databases/my_database sqlite>.tables sqlite> However, if I use a remote shell using adb, and I type the same commands, I can see the list of tables: >>>Remote shell with adb: # su # sqlite3 /data/data/my_package/databases/my_database sqlite>.tables sqlite> table1 table2 ... Thanks again for your replies! On 18 mayo, 15:27, Nikolay Elenkov <[email protected]> wrote: > On Wed, May 18, 2011 at 8:39 PM, am.fraga.led <[email protected]> wrote: > > Hi everybody. > > > I´ve a problem about sqlite3 testing my app on a device. > > In my app, I have created a simple database with 2 tables. > > When I run the app on the emulator, the app works fine: > > - The database exists in the rute: > > /data/data/my_package/databases/my_database > > - I´m able to query the databases and get the results fine. > > > The problem is when, after install my app on a device, I try to test > > it. > > The app throws the exception: > > >>> SQLiteException: no such table: TABLE_NAME: , while compiling: select * > >>> from TABLE_NAME > > > Just now, I don´t know why app works fine on the emulator but not on a > > device. > > Could you possibly help me with this problem? > > > Something, more: > > I access directly to the phone´s memory (the real device) with a > > terminal. > > I check the database exists in the specific rute: > > /data/data/my_package/databases/my_database > > > After this, I open a sqlite session on the terminal and I try to show > > the databases that > > exists on the device: > > > On the real device, open a terminal and write: > > #sqlite3 > > sqlite3 won't automagically open the database file. > Assuming you have root access on the device, > you need to execute > > # sqlite3 /data/data/my_package/databases/my_database > > to open the database. Then use .tables to list tables. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

