The app must be debuggable.
Another approach using adb backup
is shown on http://blog.shvetsov.com/2013/02/access-android-app-data-without-root.html
the command for Android 5.0+ to save /data/data/package.name/databases/file would be:
adb exec-out run-as package.name cat databases/file > file