Force MarshMallow to keep a Wi-Fi without Internet access I'm associating a Nexus 5x running MarshMallow 6.0 to a Wi-Fi hotspot that has no Internet access. Android keeps dropping the connection every second and then won't even try to reconnect stating that there is no Internet access.

How can I force Android to keep this Wi-Fi connection even without Internet access?
This shell command works on marshmallow: 
type su to enter superuser mode.
Then type the following command: settings put global captive_portal_detection_enabled 0

^^ it disables the "drop wifi if no internet connection" functionality.