[Galaxy S6 Edge+ Android Development] aerzjee:
It hangs on "Turning wifi on" and after a while it sets itself back to off. Took some part from adb logcat for you to check. Maybe it will give some more insight on what is happening here. Camera hangs on gray image with camera logo, doesn't go anywhere further.

Wifi logcat part:

10-26 02:27:28.550 19575 19575 W linker : Warning: "/odm/lib64" is not a directory (ignoring)
10-26 02:27:28.600 19578 19578 W linker : Warning: "/odm/lib64" is not a directory (ignoring)
10-26 02:27:28.635 19580 19580 W linker : Warning: "/odm/lib64" is not a directory (ignoring)
10-26 02:27:29.314 19581 19581 W linker : Warning: "/odm/lib64" is not a directory (ignoring)
10-26 02:27:30.221 19583 19583 W linker : Warning: "/odm/lib64" is not a directory (ignoring)
10-26 02:27:30.243 19583 19583 W linker : Warning: "/odm/lib64" is not a directory (ignoring)
10-26 02:27:32.677 19584 19584 W linker : Warning: "/odm/lib64" is not a directory (ignoring)
10-26 02:27:34.322 19586 19586 W linker : Warning: "/odm/lib64" is not a directory (ignoring)
10-26 02:27:39.333 19587 19587 W linker : Warning: "/odm/lib64" is not a directory (ignoring)
10-26 02:27:39.439 16986 16986 V zero-power-profiles: getProfileData: returning kPowerProfileBiasPerformance
10-26 02:27:39.442 16986 16986 V zero-power-profiles: getProfileData: returning kPowerProfileBiasPerformance
10-26 02:27:39.445 17813 17891 E LightsService: Light requested not available on this device. 2
10-26 02:27:39.453 19164 19164 I RenderThread: type=1400 audit(0.0:1158): avc: denied { ioctl } for path="/dev/mali0" dev="tmpfs" ino=3365 ioctlcmd=8217 scontext=u:r:system_app:s0 tcontext=u:object_r:device:s0 tclass=chr_file permissive=1
10-26 02:27:39.498 17813 17966 D WifiService: setWifiEnabled: true pid=19126, uid=1000, package=com.android.settings
10-26 02:27:39.499 17813 17966 I WifiService: setWifiEnabled package=com.android.settings uid=1000 enable=true
10-26 02:27:39.502 17813 17901 D WifiController: StaEnabledState.enter()
10-26 02:27:39.514 17813 17902 D WifiStateMachinePrime: received a message in WifiDisabledState: { when=-11ms what=0 target=com.android.internal.util.StateMachine$SmHandler }
10-26 02:27:39.515 17813 17902 D WifiStateMachinePrime: Switching from WifiDisabledState to ClientMode
10-26 02:27:39.515 17813 17902 D WifiStateMachinePrime: Entering ClientModeActiveState
10-26 02:27:39.516 17813 17902 D WifiClientModeManager: entering IdleState
10-26 02:27:39.516 17813 17902 D WifiStateMachinePrime: State changed from client mode. state = 2
10-26 02:27:39.518 17813 17813 D WifiP2pService: Wifi enabled=false, P2P Interface availability=true
10-26 02:27:39.522 17813 17902 I WifiVendorHal: Vendor Hal started successfully
10-26 02:27:39.525 17813 17905 I WifiP2pNative: Registering for interface available listener
10-26 02:27:39.544 19588 19588 W linker : Warning: "/odm/lib64" is not a directory (ignoring)
10-26 02:27:39.533 19588 19588 I init : type=1400 audit(0.0:1160): avc: denied { execute_no_trans } for path="/system/vendor/bin/hw/wpa_supplicant" dev="sda14" ino=3382 scontext=u:r:init:s0 tcontext=u:object_r:system_file:s0 tclass=file permissive=1
10-26 02:27:39.649 19588 19588 D wpa_supplicant: wpa_supplicant v2.7-devel-9
10-26 02:27:39.646 19588 19588 W wpa_supplicant: type=1400 audit(0.0:1161): avc: granted { open } for path="/dev/pmsg0" dev="tmpfs" ino=8356 scontext=u:r:init:s0 tcontext=u:object_r:pmsg_device:s0 tclass=chr_file
10-26 02:27:39.650 19588 19588 D wpa_supplicant: Global control interface '@android:wpa_wlan0'
10-26 02:27:39.650 19588 19588 D wpa_supplicant: Using Android control socket 'wpa_wlan0'
10-26 02:27:39.650 19588 19588 D wpa_supplicant: Initing hidl control
10-26 02:27:39.650 19588 19588 I wpa_supplicant: Processing hidl events on FD 5
10-26 02:27:39.654 19588 19588 I wpa_supplicant: Successfully initialized wpa_supplicant
10-26 02:27:39.654 19588 19588 D wpa_supplicant: Override interface parameter: ctrl_interface ('(null)' -> '/data/vendor/wifi/wpa/sockets')
10-26 02:27:39.654 19588 19588 D wpa_supplicant: Initializing interface 'wlan0' conf '/data/vendor/wifi/wpa/wpa_supplicant.conf' driver 'nl80211' ctrl_interface '/data/vendor/wifi/wpa/sockets' bridge 'N/A'
10-26 02:27:39.654 19588 19588 D wpa_supplicant: Configuration file '/data/vendor/wifi/wpa/wpa_supplicant.conf' -> '/data/vendor/wifi/wpa/wpa_supplicant.conf'
10-26 02:27:39.654 19588 19588 D wpa_supplicant: Reading configuration file '/data/vendor/wifi/wpa/wpa_supplicant.conf'
10-26 02:27:39.654 19588 19588 D wpa_supplicant: update_config=1
10-26 02:27:39.654 19588 19588 D wpa_supplicant: eapol_version=1
10-26 02:27:39.646 19588 19588 I wpa_supplicant: type=1400 audit(0.0:1162): avc: denied { write } for name="trace_marker" dev="debugfs" ino=2676 scontext=u:r:init:s0 tcontext=u:object_r:debugfs:s0 tclass=file permissive=1
10-26 02:27:39.646 19588 19588 I wpa_supplicant: type=1400 audit(0.0:1163): avc: denied { call } for scontext=u:r:init:s0 tcontext=u:r:hwservicemanager:s0 tclass=binder permissive=1
10-26 02:27:39.646 19588 19588 I wpa_supplicant: type=1400 audit(0.0:1164): avc: denied { transfer } for scontext=u:r:init:s0 tcontext=u:r:hwservicemanager:s0 tclass=binder permissive=1
10-26 02:27:39.654 19588 19588 D wpa_supplicant: ap_scan=1
10-26 02:27:39.654 19588 19588 D wpa_supplicant: fast_reauth=1
10-26 02:27:39.654 19588 19588 D wpa_supplicant: pmf=1
10-26 02:27:39.654 19588 19588 D wpa_supplicant: p2p_add_cli_chan=1
10-26 02:27:39.654 19588 19588 D wpa_supplicant: Reading configuration file '/vendor/etc/wifi/wpa_supplicant_overlay.conf'
10-26 02:27:39.654 19588 19588 D wpa_supplicant: p2p_disabled=1
10-26 02:27:39.654 19588 19588 D wpa_supplicant: autoscan='samsung_exponential:8:1024'
10-26 02:27:39.654 19588 19588 D wpa_supplicant: update_config=1
10-26 02:27:39.654 19588 19588 D wpa_supplicant: pmf=1
10-26 02:27:39.656 19588 19588 D wpa_supplicant: nl80211: TDLS supported
10-26 02:27:39.656 19588 19588 D wpa_supplicant: nl80211: Supported cipher 00-0f-ac:1
10-26 02:27:39.656 19588 19588 D wpa_supplicant: nl80211: Supported cipher 00-0f-ac:5
10-26 02:27:39.656 19588 19588 D wpa_supplicant: nl80211: Supported cipher 00-0f-ac:2
10-26 02:27:39.656 19588 19588 D wpa_supplicant: nl80211: Supported cipher 00-0f-ac:4
10-26 02:27:39.656 19588 19588 D wpa_supplicant: nl80211: Supported cipher 00-0f-ac:6
10-26 02:27:39.656 19588 19588 D wpa_supplicant: nl80211: Supported cipher 00-90-4c:0
10-26 02:27:39.656 19588 19588 D wpa_supplicant: nl80211: Using driver-based off-channel TX
10-26 02:27:39.656 19588 19588 D wpa_supplicant: nl80211: Supported vendor command: vendor_id=0x1018 subcmd=1
10-26 02:27:39.656 19588 19588 D wpa_supplicant: nl80211: Supported vendor command: vendor_id=0x1018 subcmd=2
10-26 02:27:39.656 19588 19588 D wpa_supplicant: nl80211: Supported vendor command: vendor_id=0x1a11 subcmd=5632
10-26 02:27:39.656 19588 19588 D wpa_supplicant: nl80211: Supported vendor command: vendor_id=0x1a11 subcmd=5633
10-26 02:27:39.656 19588 19588 D wpa_supplicant: nl80211: Supported vendor command: vendor_id=0x1a11 subcmd=4106
10-26 02:27:39.656 19588 19588 D wpa_supplicant: nl80211: Supported vendor command: vendor_id=0x1a11 subcmd=4107
10-26 02:27:39.656 19588 19588 D wpa_supplicant: nl80211: Supported vendor command: vendor_id=0x1a11 subcmd=4108
10-26 02:27:39.656 19588 19588 D wpa_supplicant: nl80211: Supported vendor command: vendor_id=0x1a11 subcmd=4110
10-26 02:27:39.656 19588 19588 D wpa_supplicant: nl80211: Supported vendor command: vendor_id=0x1a11 subcmd=4608
10-26 02:27:39.656 19588 19588 D wpa_supplicant: nl80211: Supported vendor command: vendor_id=0x1a11 subcmd=6144
10-26 02:27:39.656 19588 19588 D wpa_supplicant: nl80211: Supported vendor command: vendor_id=0x1a11 subcmd=6145
10-26 02:27:39.656 19588 19588 D wpa_supplicant: nl80211: Supported vendor event: vendor_id=0x1018 subcmd=0
10-26 02:27:39.656 19588 19588 D wpa_supplicant: nl80211: Supported vendor event: vendor_id=0x1018 subcmd=1
10-26 02:27:39.656 19588 19588 D wpa_supplicant: nl80211: Supported vendor event: vendor_id=0x1a11 subcmd=9
10-26 02:27:39.656 19588 19588 D wpa_supplicant: nl80211: Supported vendor event: vendor_id=0x1a11 subcmd=10
10-26 02:27:39.656 19588 19588 D wpa_supplicant: nl80211: Supported vendor event: vendor_id=0x1018 subcmd=11
10-26 02:27:39.656 19588 19588 D wpa_supplicant: nl80211: Use separate P2P group interface (driver advertised support)
10-26 02:27:39.656 19588 19588 D wpa_supplicant: nl80211: Enable multi-channel concurrent (driver advertised support)
10-26 02:27:39.656 19588 19588 D wpa_supplicant: nl80211: use P2P_DEVICE support
10-26 02:27:39.656 19588 19588 D wpa_supplicant: nl80211: interface wlan0 in phy phy0
10-26 02:27:39.646 15905 15905 I hwservicemanage: type=1400 audit(0.0:1165): avc: denied { search } for name="19588" dev="proc" ino=35733 scontext=u:r:hwservicemanager:s0 tcontext=u:r:init:s0 tclass=dir permissive=1
10-26 02:27:39.656 19588 19588 D wpa_supplicant: nl80211: Set mode ifindex 14 iftype 2 (STATION)
10-26 02:27:39.657 19588 19588 D wpa_supplicant: nl80211: Subscribe to mgmt frames with non-AP handle 0x7678631980
10-26 02:27:39.657 19588 19588 D wpa_supplicant: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7678631980 match=0104
10-26 02:27:39.657 19588 19588 D wpa_supplicant: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7678631980 match=040a
10-26 02:27:39.657 19588 19588 D wpa_supplicant: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7678631980 match=040b
10-26 02:27:39.657 19588 19588 D wpa_supplicant: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7678631980 match=040c
10-26 02:27:39.657 19588 19588 D wpa_supplicant: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7678631980 match=040d
10-26 02:27:39.657 19588 19588 D wpa_supplicant: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7678631980 match=090a
10-26 02:27:39.657 19588 19588 D wpa_supplicant: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7678631980 match=090b
10-26 02:27:39.657 19588 19588 D wpa_supplicant: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7678631980 match=090c
10-26 02:27:39.657 19588 19588 D wpa_supplicant: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7678631980 match=090d
10-26 02:27:39.657 19588 19588 D wpa_supplicant: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7678631980 match=0409506f9a09
10-26 02:27:39.657 19588 19588 D wpa_supplicant: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7678631980 match=7f506f9a09
10-26 02:27:39.657 19588 19588 D wpa_supplicant: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7678631980 match=0801
10-26 02:27:39.657 19588 19588 D wpa_supplicant: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7678631980 match=040e
10-26 02:27:39.657 19588 19588 D wpa_supplicant: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7678631980 match=06
10-26 02:27:39.657 19588 19588 D wpa_supplicant: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7678631980 match=0a07
10-26 02:27:39.657 19588 19588 D wpa_supplicant: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7678631980 match=0a11
10-26 02:27:39.657 19588 19588 D wpa_supplicant: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7678631980 match=0a1a
10-26 02:27:39.657 19588 19588 D wpa_supplicant: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7678631980 match=1101
10-26 02:27:39.658 19588 19588 D wpa_supplicant: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7678631980 match=1102
10-26 02:27:39.658 19588 19588 D wpa_supplicant: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7678631980 match=0505
10-26 02:27:39.658 19588 19588 D wpa_supplicant: nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION) nl_handle=0x7678631980 match=0500
10-26 02:27:39.658 19588 19588 I wpa_supplicant: rfkill: Cannot open RFKILL control device
10-26 02:27:39.658 19588 19588 D wpa_supplicant: nl80211: RFKILL status not available
10-26 02:27:43.406 19588 19588 E wpa_supplicant: Could not set interface wlan0 flags (UP): Operation not permitted
10-26 02:27:43.406 19588 19588 E wpa_supplicant: nl80211: Could not set interface 'wlan0' UP
10-26 02:27:43.406 19588 19588 I wpa_supplicant: nl80211: deinit ifname=wlan0 disabled_11b_rates=0
10-26 02:27:43.406 19588 19588 D wpa_supplicant: nl80211: Remove monitor interface: refcount=0
10-26 02:27:43.406 19588 19588 D wpa_supplicant: netlink: Operstate: ifindex=14 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP)
10-26 02:27:43.406 19588 19588 D wpa_supplicant: nl80211: Set mode ifindex 14 iftype 2 (STATION)
10-26 02:27:43.408 19588 19588 D wpa_supplicant: nl80211: Unsubscribe mgmt frames handle 0x888888fef0eb9109 (mode change)
10-26 02:27:43.409 19588 19588 E wpa_supplicant: wlan0: Failed to initialize driver interface
10-26 02:27:43.409 19588 19588 D wpa_supplicant: Failed to add interface wlan0
10-26 02:27:43.409 19588 19588 D wpa_supplicant: wlan0: Cancelling scan request
10-26 02:27:43.409 19588 19588 D wpa_supplicant: wlan0: Cancelling authentication timeout
10-26 02:27:43.409 19588 19588 D wpa_supplicant: Off-channel: Clear pending Action frame TX (pending_action_tx=0x0
10-26 02:27:43.409 19588 19588 D wpa_supplicant: Deiniting hidl control
10-26 02:27:43.413 17813 18139 W ServiceManagement: getService: found dead hwbinder service for android.hardware.wifi.supplicant@1.0::ISupplicant/default.
10-26 02:27:43.414 17813 18139 E SupplicantStaIfaceHal: Failed to get ISupplicant
10-26 02:27:43.414 17813 18139 E SupplicantStaIfaceHal: java.util.NoSuchElementException
10-26 02:27:43.414 17813 18139 E SupplicantStaIfaceHal: at android.os.HwBinder.getService(Native Method)
10-26 02:27:43.414 17813 18139 E SupplicantStaIfaceHal: at android.os.HwBinder.getService(HwBinder.java:91)
10-26 02:27:43.414 17813 18139 E SupplicantStaIfaceHal: at android.hardware.wifi.supplicant.V1_0.ISupplicant.getService(ISupplicant.java:48)
10-26 02:27:43.414 17813 18139 E SupplicantStaIfaceHal: at android.hardware.wifi.supplicant.V1_0.ISupplicant.getService(ISupplicant.java:52)
10-26 02:27:43.414 17813 18139 E SupplicantStaIfaceHal: at com.android.server.wifi.SupplicantStaIfaceHal.getSupplicantMockable(SupplicantStaIfaceHal.java:541)
10-26 02:27:43.414 17813 18139 E SupplicantStaIfaceHal: at com.android.server.wifi.SupplicantStaIfaceHal.initSupplicantService(SupplicantStaIfaceHal.java:244)
10-26 02:27:43.414 17813 18139 E SupplicantStaIfaceHal: at com.android.server.wifi.SupplicantStaIfaceHal.access$200(SupplicantStaIfaceHal.java:88)
10-26 02:27:43.414 17813 18139 E SupplicantStaIfaceHal: at com.android.server.wifi.SupplicantStaIfaceHal$1.onRegistration(SupplicantStaIfaceHal.java:120)
10-26 02:27:43.414 17813 18139 E SupplicantStaIfaceHal: at android.hidl.manager.V1_0.IServiceNotification$Stub.onTransact(IServiceNotification.java:389)
10-26 02:27:43.414 17813 18139 E SupplicantStaIfaceHal: Got null ISupplicant service. Stopping supplicant HIDL startup
10-26 02:27:43.415 17813 18139 E SupplicantStaIfaceHal: initalizing ISupplicant failed.
10-26 02:27:44.310 19590 19590 I init : type=1400 audit(0.0:1177): avc: denied { transition } for path="/system/xbin/su" dev="sda14" ino=4039 scontext=u:r:init:s0 tcontext=u:r:su:s0 tclass=process permissive=1
10-26 02:27:44.313 19590 19590 I su : type=1400 audit(0.0:1178): avc: denied { rlimitinh } for scontext=u:r:init:s0 tcontext=u:r:su:s0 tclass=process permissive=1
10-26 02:27:44.313 19590 19590 I su : type=1400 audit(0.0:1179): avc: denied { siginh } for scontext=u:r:init:s0 tcontext=u:r:su:s0 tclass=process permissive=1
10-26 02:27:44.313 19590 19590 I su : type=1400 audit(0.0:1180): avc: denied { noatsecure } for scontext=u:r:init:s0 tcontext=u:r:su:s0 tclass=process permissive=1
10-26 02:27:44.325 19590 19590 W linker : Warning: "/odm/lib64" is not a directory (ignoring)
10-26 02:27:44.447 17813 17839 E LightsService: Light requested not available on this device. 2
10-26 02:27:45.769 17813 17813 V SettingsProvider: Notifying for 0: content://settings/system/screen_brightness
10-26 02:27:47.828 17521 17521 D wrapperGPS: wrapperisConnected_RILD
10-26 02:27:47.828 17521 17521 D wrapperGPS: wrapperConnect_RILD
10-26 02:27:47.829 17521 17521 D wrapperGPS: wrapperisConnected_RILD
10-26 02:27:47.829 17521 17521 D gpsd : WakeLock(Release,GPSD)
10-26 02:27:47.830 17521 19595 D wrapperGPS: onError: error 4
10-26 02:27:47.830 17521 17521 D gpsd : WakeLock(Acquire,GPSD)
10-26 02:27:48.230 17813 17902 E WifiNative: Failed to connect to supplicant
10-26 02:27:48.230 17813 17902 E WifiNative: Failed to start supplicant
10-26 02:27:48.230 17813 17902 E WifiClientModeManager: Failed to create ClientInterface. Sit in Idle
10-26 02:27:48.230 17813 17902 D WifiStateMachinePrime: State changed from client mode. state = 4
10-26 02:27:48.230 17813 17902 D WifiClientModeManager: expected stop, not triggering callbacks: newState = 1
10-26 02:27:48.232 17813 17813 D WifiP2pService: Wifi enabled=false, P2P Interface availability=true
10-26 02:27:48.252 17813 17832 E BatteryExternalStatsWorker: no controller energy info supplied for wifi
10-26 02:27:48.260 17813 17902 D WifiStateMachinePrime: ClientMode failed, return to WifiDisabledState.
10-26 02:27:48.260 17813 17902 D WifiController: ClientMode unexpected failure: state unknown
10-26 02:27:48.261 17813 17902 D WifiClientModeManager: currentstate: IdleState
10-26 02:27:48.261 17813 17902 D WifiStateMachinePrime: Entering WifiDisabledState
10-26 02:27:48.262 17813 17902 D ActiveModeManager: sending scan available broadcast: false
10-26 02:27:48.263 17813 17902 D WifiStateMachinePrime: received a message in WifiDisabledState: { when=-2ms what=3 target=com.android.internal.util.StateMachine$SmHandler }
10-26 02:27:48.263 17813 17902 D WifiStateMachinePrime: Switching from WifiDisabledState to WifiDisabled
10-26 02:27:48.264 17813 17902 D WifiStateMachinePrime: Entering WifiDisabledState
10-26 02:27:48.264 17813 17902 D ActiveModeManager: sending scan available broadcast: false
10-26 02:27:48.264 17813 17904 I WifiScanningService: wifi driver unloaded
10-26 02:27:48.265 17813 17904 I WifiScanningService: wifi driver unloaded
10-26 02:27:49.339 19596 19596 W linker : Warning: "/odm/lib64" is not a directory (ignoring)
^C
130|zerofltexx:/ #

If I try to up interface manually it gets me operation not permitted

zerofltexx:/ # ifconfig wlan0 up
WARNING: linker: Warning: "/odm/lib64" is not a directory (ignoring)
ifconfig: ioctl 8914: Operation not permitted