[Xiaomi Redmi 4a ROMs, Kernels, Recoveries, & Other] changlung:
hi [MENTION=9143744]nick00007[/MENTION]

I try flash back latest stock rom with MiFlash2018-5-28-0.zip, then patch the boot.img, then fastboot boot magisk_patched.img boot into the os, and in this step wifi is working.

then I run

adb shell
su
dd if=/dev/block/bootdevice/by-name/persist of=/sdcard/persist.img
exit
adb pull /sdcard/persist.img

Then I reboot to bootloader to flash twrp download from this toplic, then flash LOS rom and Magisk, then dd if=/sdcard/persist.img of=/dev/block/bootdevice/by-name/persist

after boot, the WIFI still not working.

I try dd if=/sdcard/persist.img of=/dev/block/bootdevice/by-name/persist from adb shell su -c , reboot still not working.

--------- beginning of main
10-14 17:21:06.554 1714 1735 W System : A resource failed to call end.
10-14 17:21:06.554 1714 1735 W System : A resource failed to call end.
10-14 17:21:06.555 1714 1735 W System : A resource failed to call close.
10-14 17:21:06.560 1714 1735 I chatty : uid=1001(radio) FinalizerDaemon identical 1 line
10-14 17:21:06.561 1714 1735 W System : A resource failed to call close.
10-14 17:21:06.811 2282 2282 E Sensors : sns_main.c(447):Timeout waiting for SMGR service. Exit sensors daemon!
10-14 17:21:06.811 2282 2282 W Sensors : sns_main.c(355):sns_main_exit called unlock daemon to exit
10-14 17:21:06.811 2282 2282 E Sensors : sns_main.c(561):Exiting! Err 0
10-14 17:21:06.845 3077 3077 W sensors.qti: type=1400 audit(0.0:100): avc: denied { getattr } for path="/mnt/vendor/persist" dev="mmcblk0p26" ino=2 scontext=u:r:sensors:s0 tcontext=u:object_r:persist_file:s0 tclass=dir permissive=0
10-14 17:21:06.857 3077 3080 E Sensors : sns_fsa_la.c(448):realpath failed for directory name13
10-14 17:21:06.857 3077 3080 E Sensors : sns_fsa_la.c(448):realpath failed for directory name13
10-14 17:21:06.858 3077 3080 E Sensors : sns_fsa_la.c(89):invalid directory path -128
10-14 17:21:06.858 3077 3080 E Sensors : sns_reg_la.c(296):Error creating registry file
10-14 17:21:06.858 3077 3080 W Sensors : sns_reg_mr.c(367):File init failed 5
10-14 17:21:06.845 3077 3077 W sensors.qti: type=1400 audit(0.0:101): avc: denied { getattr } for path="/mnt/vendor/persist" dev="mmcblk0p26" ino=2 scontext=u:r:sensors:s0 tcontext=u:object_r:persist_file:s0 tclass=dir permissive=0
10-14 17:21:09.547 1714 1714 D QtiCarrierConfigHelper: WARNING, no carrier configs on phone Id: 0
10-14 17:21:10.200 958 1400 E LightsService: Light requested not available on this device. 2
10-14 17:21:10.331 1743 1743 W SettingsMetricsFeature: action(Pair<Integer, Object>... taggedData) is deprecated, Use action(int, int, int, String, int) instead.
10-14 17:21:10.333 958 977 I WifiService: setWifiEnabled package=com.android.settings uid=1000 enable=true
10-14 17:21:10.333 958 1409 D WifiController: StaEnabledState.enter()
10-14 17:21:10.333 958 1410 D WifiActiveModeWarden: received a message in WifiDisabledState: { when=0 what=0 target=com.android.internal.util.StateMachine$SmHandler }
10-14 17:21:10.333 958 1410 D WifiActiveModeWarden: Switching from WifiDisabledState to ClientMode
10-14 17:21:10.333 958 1410 D WifiActiveModeWarden: Entering ClientModeActiveState
10-14 17:21:10.334 958 1410 D WifiClientModeManager: entering IdleState
10-14 17:21:10.334 958 1410 D WifiActiveModeWarden: State changed from client mode. state = 2
10-14 17:21:10.335 958 958 D WifiP2pService: Wifi enabled=false, P2P Interface availability=true
10-14 17:21:10.335 958 1410 I WifiVendorHal: Vendor Hal started successfully
10-14 17:21:10.336 958 1411 I WifiP2pNative: Registering for interface available listener
10-14 17:21:10.337 958 1410 I SupplicantStaIfaceHal: Starting supplicant using HIDL
10-14 17:21:10.340 958 1410 I android_os_HwBinder: HwBinder: Starting thread pool for getting: android.hardware.wifi.supplicant@1.0::ISupplicant/default
10-14 17:21:10.341 958 1410 E SupplicantStaIfaceHal: Death handler already present
10-14 17:21:11.237 384 384 D Zygote : Forked child process 3090
--------- beginning of system
10-14 17:21:11.239 958 1228 I ActivityManager: Start proc 3090:com.android.keychain/1000 for service {com.android.keychain/com.android.keychain.KeyChainService}
10-14 17:21:11.287 3090 3090 I ndroid.keychai: The ClassLoaderContext is a special shared library.
10-14 17:21:11.318 958 977 I ActivityManager: Killing 2747:com.android.dynsystem/1000 (adj 985): empty #17
10-14 17:21:11.412 384 384 I Zygote : Process 2747 exited due to signal 9 (Killed)
10-14 17:21:11.442 958 1229 I libprocessgroup: Successfully killed process cgroup uid 1000 pid 2747 in 123ms
10-14 17:21:14.025 3126 3126 W ueventd : type=1400 audit(0.0:102): avc: denied { search } for name="/" dev="mmcblk0p26" ino=2 scontext=u:r:ueventd:s0 tcontext=u:object_r:persist_file:s0 tclass=dir permissive=0
10-14 17:21:16.860 3077 3077 E Sensors : sns_debug_mr.c(366):Sensors DIAG Init: Waiting for diag service timed out
10-14 17:21:16.860 3077 3077 E Sensors : sns_debug_main.c(499):Sensors DIAG init: Can't register with debug
10-14 17:21:16.860 3077 3077 E Sensors : sns_init_la.c(165):Error 5 initializing sns_debug_test_init2
10-14 17:21:19.011 958 1243 E LightsService: Light requested not available on this device. 2
10-14 17:21:19.779 1714 1714 D QtiCarrierConfigHelper: WARNING, no carrier configs on phone Id: 0
10-14 17:21:20.730 478 478 E android.hardware.wifi@1.0-service: Failed to write wlan fw path param: No such device
10-14 17:21:20.730 478 478 E android.hardware.wifi@1.0-service: Failed to change firmware mode
10-14 17:21:20.731 958 1410 D HalDevMgr: updateRttController: no one is interested in RTT controllers
10-14 17:21:20.731 958 1410 E HalDevMgr: executeChipReconfiguration: configureChip error: 9 ()
10-14 17:21:20.731 958 1410 E WifiVendorHal: Failed to create STA iface
10-14 17:21:20.731 958 1410 E WifiNative: Failed to create STA iface in vendor HAL
10-14 17:21:20.731 958 1410 E WifiClientModeManager: Failed to create ClientInterface. Sit in Idle
10-14 17:21:20.731 958 1410 D WifiActiveModeWarden: State changed from client mode. state = 4
10-14 17:21:20.731 958 1410 D WifiClientModeManager: expected stop, not triggering callbacks: newState = 1
10-14 17:21:20.732 958 1410 E WifiNative: Could not get Iface object for interface null
10-14 17:21:20.732 958 1410 D WifiActiveModeWarden: ClientMode failed, return to WifiDisabledState.
10-14 17:21:20.732 958 1410 D WifiController: ClientMode unexpected failure: state unknown
10-14 17:21:20.732 958 958 D WifiP2pService: Wifi enabled=false, P2P Interface availability=true
10-14 17:21:20.732 958 1410 D WifiClientModeManager: currentstate: IdleState
10-14 17:21:20.732 958 1410 D WifiScanRequestProxy: Sending scan available broadcast: false
10-14 17:21:20.733 958 1412 I WifiScanningService: wifi driver unloaded
10-14 17:21:20.735 958 1410 I WifiScanRequestProxy: Scanning is disabled
10-14 17:21:20.738 958 1410 D WifiActiveModeWarden: Entering WifiDisabledState
10-14 17:21:20.739 958 1410 D WifiActiveModeWarden: received a message in WifiDisabledState: { when=-6ms what=3 target=com.android.internal.util.StateMachine$SmHandler }
10-14 17:21:20.739 958 1410 D WifiActiveModeWarden: Switching from WifiDisabledState to WifiDisabled
10-14 17:21:20.739 958 1410 D WifiActiveModeWarden: Entering WifiDisabledState
10-14 17:21:20.740 958 1410 E WifiNative: Could not get Iface object for interface null
10-14 17:21:21.547 1714 1714 D QtiCarrierConfigHelper: WARNING, no carrier configs on phone Id: 0