I created json files on the internal (private) storage of the app I write for my
Google Nexus 5
Note: I also was told that I should try to useinstead of writing into the private app space. But when I try to write to
Environment.getExternalStorageState()it just won't work either.
This did the job:
adb shell run-as PACKAGE.NAME chmod 771 files cp files/*.json /sdcard/<SOME_DIR> adb pull /sdcard/<SOME_DIR> <SOME_LOCAL_DIR>
other possible solution that also worked for me:
adb backup -noapk PACKAGE.NAME dd if=backup.ab bs=24 skip=1|openssl zlib -d > backup.tar tar -zxvf backup.tar