Recent experiments indicate that frictional sliding occurs by nucleation of detachment fronts at the contact interface that may appear well before the onset of global sliding. This intriguing precursory activity is not accounted for by traditional friction theories but is extremely important for friction dominated geophysical phenomena as earthquakes, landslides or avalanches. Here we simulate the onset of slip of a three dimensional elastic body resting on a surface and show that experimentally observed frictional precursors depend in a complex non-universal way on the sample geometry and loading conditions. Our model satisfies Archard's law and Amontons' first and second laws, reproducing with remarkable precision the real contact area dynamics, the precursors' envelope dynamics prior to sliding, and the normal and shear internal stress distributions close to the interfacial surface. Moreover, it allows to assess which features can be attributed to the elastic equilibrium, and which are attributed to the out-of-equilibrium dynamics, suggesting that precursory activity is an intrinsically quasi-static physical process. A direct calculation of the evolution of the Coulomb stress before and during precursors nucleation shows large variations across the sample, explaining why earthquake forecasting methods based only on accumulated slip and Coulomb stress monitoring are often ineffective.