WiFi hotspot with hidden SSID on LineageOS

If you want to hide the SSID of your AP, one way to do that is to patch frameworks/opt/net/wifi/service/java/com/android/server/wifi/SoftApManager.java file in LineageOS sources:

diff --git a/service/java/com/android/server/wifi/SoftApManager.java b/service/java/com/android/server/wifi/SoftApManager.java
index d4a1ea508..8083481a1 100644
--- a/service/java/com/android/server/wifi/SoftApManager.java
+++ b/service/java/com/android/server/wifi/SoftApManager.java
@@ -138,6 +138,9 @@ public class SoftApManager implements ActiveModeManager {

         // Make a copy of configuration for updating AP band and channel.
         WifiConfiguration localConfig = new WifiConfiguration(config);
+
+       // Hide SSID
+       localConfig.hiddenSSID = true;

         int result = ApConfigUtil.updateApChannelConfig(
                 mWifiNative, mCountryCode,

Then rebuild LineageOS for your device and flash update from recovery.

If you have any comments, contact me by email.
Powered by OpenBSD
© ch1p 2019