Where is the SQLite DB I've created using Phonegap app - android

I am building my first Android app using Phonegap and the Phonegap app on my android tablet. It uses a SQLite DB. I want to be able to view some of the tables in the DB. I have rooted my tablet and installed several apps like SQLite Debugger, sqlite DB reader, file manager. None of them find the db. It is not listed under the Phonegap app or under the com.mydomain.app notation I set in the config.
Does anyone know where to find it?
Thanks

you can see in eclipse file explorer, com.mydomain.app then database folder.
Note:If you not inserted data,you can not see

I bought and installed SQLite Editor on to my tablet. It has a good search feature and found it. It was in:
/data/data/com.adobe.phonegap.app/app_database/http_192.168.1.117_3000/0000000000000001.db
The IP address is the local IP that phonegap server is running on.

Related

Getting Database Data Without Android Device Monitor

I have created an SQLite database in Android Studio and would like to view the data in a table form, for which I have installed the DB Browser for SQLite. Unfortunately, I am not able to open up Android Device Monitor to access the data file. I have tried running Android Studio as an admin, but that doesn't work either. It is my understanding that most components of the Android Device Monitor are deprecated, but I am not able to find out what else to use.
you can use stetho, using this you can view your DB from chrome
refer this links
https://code.tutsplus.com/tutorials/debugging-android-apps-with-facebooks-stetho--cms-24205
https://github.com/facebook/stetho

How to connect SQLite Studio to database via adb (emulator Android)

Do you know if there is a way to connected SQLite Studio (or similar) to the database via adb (emulator for Android), so I can see graphically my data via the laptop?
Thanks in advance
Actually you can use DbAndroid plugin (it's free, GPL'ed) that is shipped with SQLiteStudio (3.0.7). It will let you to connect to your android database without pulling or pushing the database file from/to an emulator or a device. It makes direct connection to the database in your application. Any changes to database made in SQLiteStudio will immediately be reflected in your running application.
Long story short - you add a jar file to your project as dependency, add few lines to inid/deinit the connector, then you add your database in SQLiteStudio and use it just as any other database.
There's a full manual on how to do it on SQLiteStudio's wiki page about this plugin: http://wiki.sqlitestudio.pl/index.php/DbAndroid
There's also a video demonstration on how to do it (also at that site). It's a bit too much to paste all of it here.
If you have any further problems with it, I'm happy to help (author here). You can also ask on SQLiteStudio's forum - I watch it often.
You can use Sqlite Studio to see your data: http://sqlitestudio.pl/
For internal storage you can get the database via adb:
adb pull /data/data/app_name/databases/db_name yourpath
If your database is in external just open it with Sqlite Studio.

Offline database inclusion in Android apk on real device

I have a question regarding creating an android application for travel guide. I am creating it offline. I am familiar with the problem that we access the database on the real device. I want an external database file in which the data is already filled. I just want to include this database in my apk and just want to access that database in my phone offline. I am using SLQite database. I had imported db file from assets folder. It works on emulator but not on a real device due to no access to system files.
I think this blog post does what you want to do. I am using this approach in my applications for a while and I am satisfied with it.
It is fast and relatively easy.
http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/
I have included the db in assets folder and the db file is copied in the path sdcard/Android/data/packagename/test.db on a real device..now I am accessing the db, it works fine on emulator but when I used it on a real device it get crashed.the db is still not working on real device.

Database created from SQLite Browser not working in device "Android"

My proble is I created a device in sqlite database browser and its work fine in emulator.
but when a try my application to my device it cause force close.
and when I remove the database and create a new one using eclipse it works fine even in my device. But inserting a lot of data in database 1 by 1 realy freakin me out so anyone know a sqlite database browser that also work for device??!
check out this tutorial for using database file in application.
Remember one thing that it only copy you DB file in application that's it.
On real device you don't have permissions to sqlite database. That's why you won't be able to browse database like you can on a emulator.
See this for a work around.
Tool to see android database, tables and data
If you want to create a pre-loaded DB outside of your app and use it in your app later, you will have to put it in your assets directory and then copy it to your apps storage space the first time your app is started.
This is due to the fact that as a security measure, on real (unrooted) devices nothing but your own app is allowed access to that apps databases directory (and certain other ones as well).
There is a good tutorial for creating/copying your own DB outside of the app and copying it to the apps databases directory here.

Can't access my android sqlite DB from windows

I have been using an SQLite database in the application I am developing for the android platform. I would like to explore the data from my PC and see the tables and entities. I don't think I have the proper security to access it when I try from the DDMS file explorer on eclipse. I can't open the data folder and when I copy it on my desktop it is empty. Does anyone know how to dump my mobile android SQLite database onto my PC?
You could use cellObject sqlite browser to browse directly from DDMS below is a link to the eclipse plugin: http://www.cellobject.net/Tools/CellObjectSQLiteXMLBrowser.aspx
Without rooting your phone you can get a copy of the DB by running the app on the emulator and then use the DDMS to pull it.from there. It will be the same as if you pulled it off your phone.
You can get DB file your application. Even if your device not rooted.
You must add debug action: copy from \databases\database.db to sdcard. Get database path by getDatabasePath.
From sdcard you can get file by adb pull or File Explorer.
Also you can process back operation: copy from sdcard to app. Of couse you app at device don't
be started.
Иut I have not had any problems, even when the application is running, but there is no access to the base.

Categories

Resources