简体   繁体   中英

Android Room database pull

I use Room database to build my app. After i create my database how i pull the database file with the following adb command:

adb exec-out run-as ---.---.--- cat /data/data/---.---.---/database/user-database.db > MyDB.db

Then when i try to oped that MyDB.db file with sqlitebrowser i see the message " Invalid file format ".

Why i can not open that file?

Is there an other better way to pull and examine the database file created by Android Room ??

Thank you

In Android Studio 3, there is Device File Explorer at the right side (for me). DeviceFileExplorer photo Click it and go to your database file. for me, data> data> myPackageName> databases> location of database file

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM