1

So i downloaded DB Browser which is gui for viewing sqlite db. The question i have is when i debug my android emulator i have the following path to my db:

/data/user/0/com.HotelStash/files/.local/share/HotelStash.db3

The path is derived from following line of code:

 private static readonly string dbPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "HotelStash.db3");

So if i wanted to be able to open this from db browser or view in windows explorer how would i do that?

Note: I am using visual studio emulator for android.

2
  • That file is within the app's sandbox and you can not browse it unless you are using a emulator image that is root-able (the Google API image or Play image are not, the System Image ones are). Otherwise you can programmatically copy the file to a public directory (create a button/system setting/etc to do it on-demand) or create the file in a non-secure directory like your app's non-secure external dir, strictly for debugging sessions of course: stackoverflow.com/a/54127487/4984832 Commented Nov 13, 2020 at 19:12
  • Hi, it seems can not browse the file form app's sandbox in PC. You could use a remote online database, then all can visit it. Commented Nov 18, 2020 at 8:48

1 Answer 1

1

First you can download the db file from Android Studio itself.

Go to device file explorer , and look for your application package name inside data folder /data/data/{package_name}/databases/

You can save it to local folder and use any SQLite browser app to view the content.

There is another plugin available for Android Studio , with which you can browse your db content in same way.

http://www.idescout.com/download/

Sign up to request clarification or add additional context in comments.

2 Comments

I am not using Android studio hence xamarin tag on this post. I am using visual studio on windows 10
Sorry I did not notice that. With visual studio I don't know.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.