When igneous rocks form in the presence of water, they contain peroxy bonds with OH groups. Under great temperature and pressure, these bonds break down creating electron-holes pairs. The electrons become trapped at the site of the broken bonds but the holes are free to move through the crystal structure. The natural diffusion of these holes through the rock creates p and n regions just like those in doped semiconductors. And the boundary between these regions behaves like the p-n junction in a diode, allowing current to flow in one direction but not the other. At least not until the potential difference reaches a certain value when the boundary breaks down allowing a sudden increase in current. It is this sudden increase that generates a magnetic field. And the sheer scale of this process over a volume of hundreds of cubic meters ensures that these magnetic pulses have an extremely low frequency that can be detected on the surface. The new theory points to the possibility of predicting imminent earthquakes by triangulating the position of rocks under pressure by searching for the magnetic pulses they produce (although significantly more work needs to be done to characterize the process before then)."

...given that they really do react in advance to earthquakes. That lore has been in the "everybody knows" class for millennia, but the observations have an unpleasant habit of being reported after the quake. If my house started shaking right now, I could certainly think of something goofy our Jack Russell Terrorist did an hour ago.

IIRC, Caltech set up a hotline in the 1980's for people to report anomalous animal behavior, and got a null result...the line would start ringing after the tremor, and there was usually an excuse involving not being near the phone. Perhaps it's time for another try, now that we all have cellphones.