We study the near-threshold pion-induced production of ϕ mesons off nuclei in the kinematical conditions of the HADES experiment, recently performed at GSI. The calculations have been performed within a collision model based on the nuclear spectral function. The model accounts for both the primary π− meson–proton π−p → ϕn and the secondary pion–nucleon πN → ϕN ϕ production processes as well as the effects of the nuclear ϕ and nucleon mean-field potentials. We find that the primary reaction channel π−p → ϕn dominates in the ϕ production off 12C and 184W target nuclei in the HADES acceptance window at incident pion momentum of 1.7 GeV/c. We calculate the momentum dependence of the absolute and relative (transparency ratio) ϕ meson yields from the above direct channel. The calculations have been performed for this initial pion momentum allowing for different options for the ϕN absorption cross section σϕN and different scenarios for the in-medium mass shifts of the ϕ meson and secondary neutron, produced together with ϕ in this channel. We demonstrate that the transparency ratio for the ϕ mesons has, contrary to the absolute cross sections, an insignificant sensitivity to the ϕ meson and secondary neutron in-medium mass shifts at ϕ momenta studied in the HADES experiment. On the other hand, we show that there are measurable changes in the transparency ratio due to the ϕN absorption cross section, which means that such a relative observable can be useful to help determine this cross section from the data taken in the HADES experiment.