Run on Oculus not available SDK, JDK, NDK modules not adding properly from Hub

Trying to run vr set ups on my Oculus Quest 2. When I go to Build Settings. Run Device is greyed out, I can not select my Oculus, I can not select any run device. It says Android SDK/JDK directory not set.
Why???

I have been trying different Unity versions 2020. 2, .3. .4, even going back to 2019.2 because people on other Unity forums said that fixed it for them, but that didnt work, and I sort of need 2020 or 2021 for vr.

I turned off my firewalls/antivirus/I manually set allow the connection for all my unity versions in advanced security settings
I set my API up to 29

I have been trying to manually set the pathways for SDK, JDK and NDK but haven’t successfully done so.

Someone help



This solved for me in Linux (don’t know if the case happens in Windows)

chmod -R 777 ~/Unity

This command set all privileges for all files/directories/subdirectories for the user.

Getting the error of this topic, for curiosity I tried to run the “java” executable inside the directory

~/Unity/Hub/Editor/2021.3.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/OpenJDK/bin/

And got: bash: ./java: Permission Denied

This explains why set the privileges.