It is not difficult at all to patch a heat-seeking missile into an airframe. The British added the AIM-9L to their Harriers in a matter of a couple of weeks prior to the Falklands combat. The missile is set to boresight, the audio patched into the headset, and when the distinct tone is heard, the missile can be launched. Once away, nothing else need be done.
It is very, very much more difficult to add a radar-guided missile into an airframe not designed for it. The entire system is highly integrated. The radar must be capable of providing the correct guidance signals to the missile, all at very high speed, and with accuracy. It CAN be done, such as the SD-10 to the JF-17, but it is going to take a bit of time, access to source codes and very specific technical data, and some talented engineers. If China provides engineers to help, it'd be done in 1/10th of the time compared to a solo effort. I'm assuming that if China sells the missile in quantity to Pakistan, part of that sale would be technical assistance to do just that.
The differences between infrared (passive) and radar (active) detection schemes should
NEVER EVER be underestimated.
In a passive detection scheme, the target has control over its character emissions. The target is in dominance of the medium and if we are talking about infrared then the medium is infrared signals. The receiver is absolutely dependent upon that target for information.
For example...In an infrared array, there would be a group of pixels that would be 'activated' upon detection of IR signals. In the center of this group there would be a smaller group of pixels that will record the highest strength of an IR source. If the data processing -- in real time -- pick up a decrease of 'activated' pixels and a decrease in IR intensity, how is the missile to know that the aircraft is moving away from it, or if the engine(s) has a decreased output of IR emissions? Conversely...If the data processing pick up an increase of 'activated' pixels and a corresponding increase in IR intensity in the center of said 'activated' pixels, how is the missile to know that it is closing in on the victim aircraft or that the aircraft had just increase its engine(s) into the afterburner region to escape? Which is better for the decision making process, the uncertainty or the assured? But if we totally dependent upon the target to provide information about itself, do we need to have a complex decision making process, especially if the information is as simple as infrared intensity? This is why infrared missiles are simpler to design, manufactured, or integrate from an external supplier into a currently deployed aircraft.
Contrast this with the radar detection scheme, which is an active method. If we have 100 pulses in a pulse train and if there are 80 returns, we can process the time gaps between
EACH echo pulse in relation to its previous and successive pulses to know with near absolute certainty that the aircraft is moving away from us or that we are closing upon it. Below an arbitrarily set threshold of returned pulses -- or echoes -- we would ignore everything but that is another data processing issue. If the time gaps increases between each echo we can say that the aircraft is moving away from us. If the time gaps compresses, we can say that the aircraft is closing upon us, or that the missile is closing in, depends on one's perspective. Even 'stealth' aircrafts are not exempt from this law of physics. The advantage that 'stealth' aircrafts has is that it can influence the behaviors of those echoes but that is another discussion altogether.
Compound this with the fact that in a single pulse train, the radar detection scheme provide us with three axes of target information in the case of an airborne target:
Each axis out of 80 echoes in a 100-pulses pulse train will give us rate of changes of that target -- in real time. Infrared simply cannot match as far as data stream goes. Which lead us up to the next difficulty...Who is better to give young Helio Castroneves guidance, ten high school level driving instructors or a single F1 champion? There is a certain point where we cannot 'dumb down' the AMRAAM any further where the radar information required by the AMRAAM is insufficient for this missile to operate. The source of that guidance must contain 3-axes target velocity, acceleration, and heading of their changes. If the data processing hardware is not sophisticated enough to process 80 echoes out of 100 pulses to give to this sophisticated missile, then the integration of an external source will fail and that failure will show just on paper.
Access to the source codes that governs the entire weapon system will help only to a certain level of 'dumbing' down the AMRAAM where one might as well design and build one's own missile to match one's own radar technology. It would be cheaper and one would be in total possession of this weapon system. Why would you want to pay full price for an AMRAAM when you are able to exploit merely %50 of its capabilities because your current radar system cannot give the AMRAAM what it demand? This is why infrared missiles are best against stationary targets, or if the target's 3-axes rate of changes can be out accelerated by the missile's own velocity, which would make an IR-only missile best for within visual range fights.