How to disable captive portal detection on Android 6.0?
<p>Before, I just execute the command in terminal:</p>

<pre><code>settings put global captive_portal_server 127.0.0.1 &amp;&amp; settings put global captive_portal_detection_enabled 0
</code></pre>

<p>And everything worked fine. But now the captive portal window "Join Wifi" appears again, giving error:</p>

<blockquote>
  <p>Not Found for page 127.0.0.1/generate_204.</p>
</blockquote>

<p>I use Samsung Galaxy A5 2016 Android 6, if it matters. How to disable this terrible awful detection?</p>