- Get the package name of the app. Use the below command to list all installed packages
adb shell pm list packages
- Grant WRITE_EXTERNAL_STORAGE permission: The app needs to have the WRITE_EXTERNAL_STORAGE permission to write files to its folder. You can grant this permission using adb:
# Grant WRITE_EXTERNAL_STORAGE permission
adb shell pm grant android.permission.WRITE_EXTERNAL_STORAGE