com.package.name
is your app identifier, and the file path is relative to the app user's home directory, e.g. '/data/user/0/com.package.name
.
adb shell run-as com.package.name cp relative/path/file.ext /sdcard
adb pull /sdcard/file.ext
See long explanation below.