The WRITE_EXTERNAL_STORAGE permission must only grant write access to the primary external
storage on a device. Apps must not be allowed to write to secondary external storage
devices, except in their package-specific directories as allowed by synthesized
permissions. Restricting writes in this way ensures the system can clean up files
when applications are uninstalled.
However i've seen that it is possible to gain write priviledges at runtime (Proof of concept: Total Commander) using the System File Explorer to select a folder for which write is allowed after the folder selection is complete. However I can't seem to find an example of how to implement this. Any help with that? A screenshot of the folder selection that I'm reffering to is shown below.