Location of SQLite Database when application is executed on real device
I have trouble with finding my SQLite Database.
As we can access the SQLite databases on a running emulator like below:
adb -s emula开发者_如何学Pythontor-5554 shell
sqlite3 /data/data/package_name/databases/database_name
But what if I am testing my application on real device(HTC Here-Android) ? where does i find my database?
Usually, it will be in the same directory. For example, in my HTC Tattoo:
Of course, if you want to access that directory, you will have to have a rooted handset. Also, keep in mind most of the production handsets does not include the sqlite3
tool.
It will be present in the same location that is present in the emulator .If it is in /data/data//databases/ , it usually is in the same place in the real device also.
You should access it with root privileges .. :)
It's at the same location on the device as on the emulator. Although you can only see it with root access (su).
精彩评论