adb - How to view sqlite database in android application at run time -


I am trying to copy data from the DDBMS perspective - & gt; File explorer - & gt; Data - & gt; [My_app_package] then PULL is working when I'm running the application on the emulator, but when I'm running an application on mobile, nothing is shown under the data folder is.

I have also tried to do the same thing from ADB, but it is not working .. Can I locate any sqllite database created by my application without my phone? The way.

An Android device can programmatically retrieve the database .db is. I was putting another setting under my app named Developer Options , which was copying the .db file to sdcard .

Copy the following code from .db to sdcard . I want to do this with .db file name with backupDBPath and currentDBPath (the name that you have given your database name). .

  Public Zero Dev () {try {file sd = Environment.getExternalStorageDirectory ()} File Data = Environment GateData Directory (); If (sd.canWrite ()) {string currentDBPath = "/ data / data /" + getPackageName () + "/ database / ZnameDB"; String backup DBPath = "ZnameDB_Dev.db"; File currentDB = new file (current dbpath); File backupdb = new file (sd, backup dbipath); If (currentDB.exists ()) {FileChannel src = New FileInputStream (currentDB) .getChannel (); Filechannel dt = new file output stream (backup db) .getChannel (); Dst.transferFrom (src, 0, src.size ()); Src.close (); Dst.close (); Toast. Make Text (SettingsEquityWiki.This, "Database Transpended!", Toast. LNNHHHARAT). Show (); }}} Hold (exception e) {Log.e (tag, etstring ()); }}  

PlayStore is available in many applications with which you can view your .db file. I used the Android application to see the .db file.


Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -