I used to be able to pull file from my app's files directory this way:
adb shell "run-as $PACKAGE chmod 777 /data/data/$PACKAGE/files/"
adb shell "run-as $PACKAGE chmod 666 /data/data/$PACKAGE/files/$FILENAME"
adb pull /data/data/$PACKAGE/files/$FILENAME .
adb shell "run-as $PACKAGE chmod 700 /data/data/$PACKAGE/files/"
adb shell "run-as $PACKAGE chmod 600 /data/data/$PACKAGE/files/$FILENAME"
It worked well on pre-L devices. When I try to get files the same way at L and further, I get "permission denied" error.
I found workaround, but question is: what change in Android L causes this error?