The present invention provides intermediates useful for the synthesis of an aminopyrimidine derivative or pharmaceutically acceptable salt thereof having a selective inhibitory activity against protein kinases, especially against the protein kinases for mutant epidermal growth factor receptors; and processes for preparing the same. And also, the present invention provides novel intermediates useful for said process and processes for preparing the same.