In underlay cognitive radios, the primary-channel gain from a primary transmitter (PU-Tx) to a primary receiver (PU-Rx) and the cross-channel gain from a cognitive transmitter (SU-Tx) to the PU-Rx are crucial for the SU-Tx in controlling its transmit power when sharing spectrum with primary users (PUs). However, the non-cooperation between PUs and secondary users (SUs) makes it difficult for the SU-Tx to acquire the primary-channel and cross-channel gains, in particular when the channel reciprocity is not applicable. Most existing works focus on cross-channel gain estimation and are often based on the channel reciprocity. In this work, we propose a scheme where the SU-Tx relays primary signals and transmits its own signals to the secondary receiver (SU-Rx) during the phase of channel gain estimation. Then, an estimation method is developed, which enables the SU-Tx to acquire the primary-channel and cross-channel gains simultaneously. The performance of the proposed estimator is analyzed. Numerical simulations are provided to validate the theoretical analysis and demonstrate the superior performance of the proposed method compared to state-of-the-art methods.