Whenever you need to see the content of an Android application that is in debug mode and you want to do it over adb just do the following:
$ adb shell
$ run-as some.package.identifier
This will change your prompt to be authenticated into the app space and your cwd changed to the app’s , from there you can do the typical ls, cd, etc within the app’s domain space.
If you’ve installed the application on a work profile, you first need to obtain the user id of the work profile. To do that, run:
$ adb shell pm list users
This will give you an id , for example:
UserInfo{11:Work profile:30} running
The number 11 is the “user id”, we can now use this information on the run-as command and to something like:
$ run-as some.package.identifier --user 11
If you want to obtain the content of, say files directory, you can run:
$ adb exec-out run-as some.package.identifier --user 11 tar c files/ > files.tar