0

In my Android project I use Realm. Sometimes I need to extract db file from device. To do this I follow the next steps:

  1. Open console
  2. adb shell
  3. run-as my_project_name_space
  4. cd files
  5. cp my_db_file.realm /sdcard
  6. exit
  7. exit
  8. adb pull sdcard/my_db_file.realm d:\Temp\my_db_file.realm

As result in folder d:\Temp I get db file: my_db_file.realm

Nice. It's work fine. But when I need again to extract db file I must again do all of this 8 steps. Has any faster approach? Something like start script that execute all of this 8 steps. Or or something similar.

Thanks.

Alexei
  • 14,350
  • 37
  • 121
  • 240

1 Answers1

1

In debug apk you can use android studio's device explorer
goto path
/data/data/your-package-name/files/your-db.realm
and by right clicking you can save it without running any kind of code.