[ONE Android Development] maxver0:
So I have found why it disconnects in both roms(Catlogs). But can't figure out how to fix it. I have found solutions for ubuntu only.

Some info: http://superuser.com/questions/152427/ubuntu-9-04-cannot-connect-to-visible-open-wifi-ap-reason-6

http://askubuntu.com/questions/454427/network-issues-since-trusty/471458#471458

12-25 18:12:53.583 W/dex2oat ( 8788): Verification of int[][] com.google.re2j.r.J() took 234.526ms
[B]12-25 18:16:39.996 I/wpa_supplicant( 1132): wlan0: CTRL-EVENT-DISCONNECTED bssid=00:aa:ab:02:54:00 reason=6[/B]
12-25 18:16:39.999 I/WifiHAL ( 829): Poll result = 1
12-25 18:16:39.999 I/WifiHAL ( 829): Found some events!!!
12-25 18:16:39.999 D/WifiHAL ( 829): no_seq_check received
12-25 18:16:39.999 I/WifiHAL ( 829): event received NL80211_CMD_DISCONNECT
12-25 18:16:39.999 I/WifiHAL ( 829): event received NL80211_CMD_DISCONNECT, vendor_id = 0x0
12-25 18:16:40.005 D/Tethering( 829): InitialState.processMessage what=4
12-25 18:16:39.999 I/WifiHAL ( 829): event ignored!!
12-25 18:16:40.006 D/Tethering( 829): sendTetherStateChangedBroadcast 0, 0, 0
[B]12-25 18:16:40.017 E/WifiConfigStore( 829): saveWifiConfigBSSID Setting BSSID for "11337799"WPA_PSK to any
12-25 18:16:40.019 E/native ( 829): do suspend true
12-25 18:16:40.026 D/CommandListener( 259): Clearing all IP addresses on wlan0[/B]
[B]12-25 18:16:40.084 E/WifiStateMachine( 829): WifiStateMachine: Leaving Connected state[/B]
12-25 18:16:40.084 E/WifiNative-wlan0( 829): doBoolean: enable
12-25 18:16:40.085 I/WifiHAL ( 829): Poll result = 1
12-25 18:16:40.085 I/WifiHAL ( 829): Found some events!!!
12-25 18:16:40.085 D/WifiHAL ( 829): no_seq_check received
12-25 18:16:40.085 I/WifiHAL ( 829): event received NL80211_CMD_START_SCHED_SCAN
12-25 18:16:40.085 I/WifiHAL ( 829): event received NL80211_CMD_START_SCHED_SCAN, vendor_id = 0x0
12-25 18:16:40.085 I/WifiHAL ( 829): event ignored!!
[B]12-25 18:16:40.089 D/ConnectivityService( 829): NetworkAgentInfo [WIFI () - 100] EVENT_NETWORK_INFO_CHANGED, going from CONNECTED to DISCONNECTED[/B]
12-25 18:16:40.089 D/ConnectivityService( 829): NetworkAgentInfo [WIFI () - 100] got DISCONNECTED, was satisfying 2
12-25 18:16:40.118 W/dex2oat ( 8788): Verification of int[][] com.google.re2j.r.l() took 308.582ms
12-25 18:16:40.119 D/WifiNetworkAgent( 829): NetworkAgent: NetworkAgent channel lost
12-25 18:16:40.120 D/LBSSystemMonitorService( 829): handleMessage what - 8
12-25 18:16:40.120 D/Wiper_jni( 829): Send Wifi Supplicant info
12-25 18:16:40.124 E/LocSvc_LBSApiV02( 829): E/virtual int lbs_core::LBSApiV02::wifiAttachmentStatusInject(const WifiSupplicantInfo&):515]: Error : st = 11, ind.status = 0
12-25 18:16:40.125 D/ConnectivityService( 829): reportBadNetwork(NetworkAgentInfo [WIFI () - 100]) by 10021
12-25 18:16:40.126 D/NetworkMonitorNetworkAgentInfo [WIFI () - null]( 829): ValidatedState{ when=0 what=532488 arg1=10021 target=com.android.internal.util.StateMachine$SmHandler }
12-25 18:16:40.126 D/NetworkMonitorNetworkAgentInfo [WIFI () - null]( 829): DefaultState{ when=-1ms what=532488 arg1=10021 target=com.android.internal.util.StateMachine$SmHandler }
12-25 18:16:40.126 D/NetworkMonitorNetworkAgentInfo [WIFI () - null]( 829): Forcing reevaluation
12-25 18:16:40.126 D/NetworkMonitorNetworkAgentInfo [WIFI () - null]( 829): EvaluatingState{ when=0 what=532486 arg1=4 target=com.android.internal.util.StateMachine$SmHandler }
12-25 18:16:40.126 D/NetworkMonitorNetworkAgentInfo [WIFI () - null]( 829): Checking http://clients3.google.com/generate_204 on <unknown ssid>
12-25 18:16:54.554 E/NetdConnector( 829): NDC Command {152 network destroy 100} took too long (14465ms)
12-25 18:16:54.554 W/dex2oat ( 8788): Verification of java.lang.String com.google.trix.ritz.shared.messages.W.d(int) took 201.365ms
12-25 18:16:54.556 D/ConnectivityService( 829): notifyType LOST for NetworkAgentInfo [WIFI () - 100]
12-25 18:16:54.556 D/Nat464Xlat( 829): requiresClat: netType=1, connected=false, hasIPv4Address=true
12-25 18:16:54.557 D/CSLegacyTypeTracker( 829): Sending disconnected broadcast for type 1 NetworkAgentInfo [WIFI () - 100] isDefaultNetwork=true
12-25 18:16:54.557 D/ConnectivityService( 829): sendStickyBroadcast: action=android.net.conn.CONNECTIVITY_CHANGE_IMMEDIATE
12-25 18:16:54.557 D/ConnectivityService( 829): sendStickyBroadcast: action=android.net.conn.CONNECTIVITY_CHANGE_IMMEDIATE
12-25 18:16:54.558 D/ConnectivityService( 829): Checking for replacement network to handle request NetworkRequest [ id=1, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ]
12-25 18:16:54.559 D/ConnectivityManager.CallbackHandler( 1181): CM callback handler got msg 524292
12-25 18:16:54.560 D/TelephonyNetworkFactory1( 1571): Cellular needs Network for NetworkRequest [ id=1, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ]
12-25 18:16:54.560 D/TelephonyNetworkFactory1( 1571): subController = com.android.internal.telephony.SubscriptionController@4563b0d
12-25 18:16:54.560 D/TelephonyNetworkFactory1( 1571): CurrentDds = 1
12-25 18:16:54.560 D/TelephonyNetworkFactory1( 1571): mySubId = 1
12-25 18:16:54.560 D/TelephonyNetworkFactory1( 1571): Requested networkSpecifier = -1000
12-25 18:16:54.560 D/TelephonyNetworkFactory1( 1571): my networkSpecifier = 1
12-25 18:16:54.560 D/TelephonyNetworkFactory1( 1571): Is the request for Internet = true
12-25 18:16:54.560 D/TelephonyNetworkFactory1( 1571): Activating internet request on subId = 1
12-25 18:16:54.560 D/TelephonyNetworkFactory1( 1571): Activating APN={mApnType=default mState=IDLE mWaitingApns={null} mWaitingApnsPermanentFailureCountDown=0 mApnSetting={null} mReason=nwTypeChanged mDataEnabled=false mDependencyMet=true}