In reply to improveonsilence: I had knee pain last year, also patellar tracking - I know your pain.
In my case it was a muscle imbalance between the different parts of the quadriceps muscles - the medial portion (called the VMO) was weak relative to the lateral section - causing the patellar to be pulled laterally and rub against the edge of the femoral groove, in which it usually slides up and down smoothly. Also needed to strengthen my glutes.
This was relatively easy to fix: I went to the physio and after doing the following programme twice a day for a few weeks it was problem solved:
Quads stretch 30s each leg
Hamstirng/glutes stretch 30s
20x squats
20s Bridge static hold
20x lunges
20x single leg squats, each leg
10s single leg bridge static hold, each leg
20x step downs, each leg
After this got easy I added in a dumbell and started doing single legged squat jumps - definitely targeted the VMO well.
Obviously I don't know precisely what's wrong in your case, but the majority of tracking problems are due to a muscle imbalance, so you just need to find out which areas are weak and build them up.