The behavior of the $\phi$ meson in nuclear matter has attracted renewed interest because
of (recent and future) experiments that aim to study its properties in nuclei [1-3]. Theoretically,
many works have however been conducted assuming infinite nuclear matter [4-5], which is
not realistic from an experimental point of view. To relate theoretical predictions with experimental
observables, a thorough understanding of the actual reaction, in which the $\phi$ meson is produced
in a nucleus, is required. For the past E325 experiment at KEK  and the future E16 experiment at
J-PARC, this is a pA reaction with initial proton energies between 10 and 30 GeV. To simulate such
a reaction, we make use of the PHSD transport code, which is based on a covariant microscopic
transport model . In this framework, the phi meson spectral function obtained theoretically as a function of density, can be used as an input, while the output of the simulation can be compared with experimentally observed spectra. In this presentation, I will give an overview of first results obtained in simulations of the reactions probed at the E325 and E16 experiments.
 R. Muto et al., Phys. Rev. Lett. 98, 042501 (2007).
 A. Polyanskiy et al., Phys. Lett. B 695, 74 (2011).
 K. Aoki (J-PARC E16 Collaboration), arXiv:1502.00703 [nucl-ex].
 P. Gubler and K. Ohtani, Phys. Rev. D 90, 094002 (2014).
 P. Gubler and W. Weise, Phys. Lett. B 751, 396 (2015).
 W. Cassing and E. Bratkovskaya, Phys. Rev. C 78, 034919 (2008).