Hi, on the AqaraGateway github, for some models (like the M1S) there is a non flash nethod (the one you used and described) and a flash method.

In the end do they give the same result? Meaning that the gateway can be integrated to Home Assistant with HACS​ whichever you choose.

It seems that the flash method will flash the latest version of the custom firmware while the non flash method will enable the integration without changing firmware version.