WiFi direct on 5Ghz band? Can an Android device with a 5Ghz-capable Wi-Fi chip, such as the Nexus 5, use Wi-Fi direct on the 5Ghz band?

If so, how? Couldn't find anything of substance on the net.
You might or might not be able to depending on your device. I tested this on OnePlus 5 with Android 8.1 and 5GHz P2P GO works (channel = 48, i.e. freq = 5.240GHz). Only a few 5GHz channels however actually works though.

Basically you need to use a hidden (light greylist at the time of this post) API Landroid/net/wifi/p2p/WifiP2pManager;-&gt;setWifiP2pChannels(Landroid/net/wifi/p2p/WifiP2pManager$Channel;IILandroid/net/wifi/p2p/WifiP2pManager$ActionListener;)V. See here for example usage. You can also try out my app to test whether your phone supports it if you have root.

You might also need to remove an entry named p2p_no_go_freq in your p2p_supplicant_overlay.conf if there is one. It's located in /system/etc/wifi or /vendor/etc/wifi depending on your Android system version.