I managed to do go back to OEM firmware once while testing a few things.
Here are the instructions that worked for me.
IMPORTANT: Follow this at your own risk as the process bellow has been tested only on my device.
Requisites:
- OEM firmware image (OTA). Let's call it "oem_firmware.bin" from now on. I think there is a link to one on this thread
From a PC:
1: Identify position of rootfs ubi from OEM firmware image:
# dumpimage -l oem_firmware.bin
The one I tried was on position 0.
Image contained "askey-rootfs" (image 0), "wififw_v1-rt5010w" (image 1), "and wififw_v2-rt5010w" (image 2)
2: Extract rootfs ubi from OEM firmware image using the position obtained on previous step (used 0 as example here):
# dumpimage -T flat_dt -p 0 -o dynalink-dl-wrx36.oem.ubi oem_firmware.bin
Now, boot OpenWrt from initramfs.
This is required as both slots are going to be flashed.
From OpenWrt running from initramfs:
1: Transfer the OEM rootfs ubi
2: Flash OEM rootfs ubi to both slots
# ubiformat /dev/mtd18 -y -f dynalink-dl-wrx36.oem.ubi
# ubiformat /dev/mtd20 -y -f dynalink-dl-wrx36.oem.ubi
Only the active OEM slot is actually required, but flash it to both of them to simplify the process
3: Restore OEM boot command
# fw_setenv bootcmd 'bootipq'
4: Reboot device:
# reboot
After this the device should reboot into OEM firmware.