I have a rooted Nexus One and when I issue the following commands on the terminal I'm able to view the database of the app I'm developing.
adb shell
su
cd data/data/.../databases/
sqlite3 events.db
Now this works fine but I want to be able to pull the file and view it with a gui SQLITE application/browser (for example the Firefox plugin)
I used to be able to access the data folder from Eclipse using FileExplorer but it suddenly stopped working and I'm just wondering if there's a way to be able to do that again..
Thank you
After much research through Google, I simplified accessing a SQLite database in Eclipse. I'll compile my research in an answer here for accessing a SQLite database on a connected or emulated Android phone for viewing within Eclipse.
To browse files from a specific app on your device, grant read and access privileges of each folder in the path to the app.
After this you should be able to browse the files on the device.
A very useful Eclipse plugin for browsing a SQLite database on an Android phone from within Eclipse is the, seemingly no longer supported, Questoid browser plugin
In Eclipse, in the File Explorer, there is a blue 3-layer pancake-like cylinder icon in the upper-right corner of the File Explorer Window that you click.
Click blue 3-layer pancake-like cylinder icon in the upper-right corner of the File Explorer Window http://www.tylerfrankenstein.com/sites/default/files/styles/large/public/questoid.png
This opens the database file in a Questoid tab in the same window as LogCat.
Hope you guys find this post more specifically useful as a step-by-step for viewing your database.
References
Right now it appears that your device is set up so that the adb shell is not by default root, and you have to use su to get a root shell. The DDMS file explorer in eclipse would not do so, so it would only have root access if adbd is set to run as root and provide root access to clients by default.
You could check this out from an adb shell with
ps
(and see if the 'ps' process is running as root or shell) or
getprop ro.secure
Using an su root shell, you could remount the root filesystem and change ro.secure to 0 in default.prop - amongst other things, this would result in adbd running as root and by default granting root shells. However, this has security implications and you may not want to leave it that way. You would need to do a web search for the exact shell remount command for your particular device (since the adb convenience one wouldn't work in the case where adbd was not yet root).
You could also see if the 'adb root' command would work to put the adbd into root mode.
It may be that your system is not 'rooted' in the sense of having any configuration changes made, but instead only in the sense that there's a custom su binary present which will allow unprivileged users who know about the possibility to get a root shell - the stock tools wouldn't know about that possibility and so would not be able.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With