It would be hard to get it from lm and aov. You would have to be better than most of us at calculating the expected mean squares for your design to be able to estimate the variances that you need to calculate heritability.
Use lme or asreml-r to estimate the genetic variance and interactions as random effects and extract the error variance.