Access denied writing files on USB

It sounds like you’re running into Android’s scoped storage restrictions, which got stricter starting from Android 10. Even if your USB drive mounts under /storage/XXXX-XXXX, Android often treats it as external storage, meaning standard permissions alone (READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE) aren’t enough.

I’d recommend looking at this repo UnitySimpleFileBrowser —it uses Storage Access Framework which should resolve the ‘access denied’ error you’re facing.