Simple explanation is that you use emulator and scripts to automate battle.
Basically, if you have 10% chance to gain 0.1% progress towards TMR for every battle that the unit participate in. So, on
average, you need to fight 10,000 battles for a TMR. Of course, you will bring 5 units in your team, so if you have multiple copy of same unit, you can just fuse them once they get to certain percentage.
Anyway, the process of fighting 10K battles is kinda tedious so the easy way is to use emulator + script and repeat Earth Shrine.
Is this legal? Well, someone asked Gumi and the answer is that using built in macro like those provided by emulator is legal but using 3rd party macro is not.
Anyway, the steps are kinda easy. Just go to
this page and follow the instructions there. The steps below are just some general steps before I found that page.
1. Download either Nox or MEmu from their respective websites. ( I personally use MEmu )
2. Locate and launch the macro windows. In Memu, this is known as Operation Record.
3. Click record and maybe try to click around in the emulator a bit then click stop. This is just to create the file that you will overwrite later, so what you click doesn't really matters.
4. Locate the script file. In MEmu, this is in Program Files > Microvirt >MEmu > scripts. There should be a .mir file
5. Open it using notepad then replace all the contents with relevant scripts. I will copy those scripts here later.
Edit: Apparently,
this page is a thing and lists all the relevant steps and scripts. So, yeah, just follow the instruction there and ask if you got any questions. Cheers!