The MediaTek MT6582 is a legacy 32-bit SoC commonly found in budget Android devices from the KitKat and Lollipop eras. Because these devices are older, the most reliable way to flash them (install firmware) is using the on a Windows PC.
Specialized scatter files can be used to format specific sectors to bypass Google's Factory Reset Protection (FRP). How to Obtain the Scatter File