Secret code not working on my phone when it is working on others? There is an app that allows you to enter a secret code in the format *#*#(code)#*#*, however it is not working on my phone (Samsung Galaxy SII GT-I9100) running CyanogenMod 10 (Android 4.1.1).

I have managed to confirm that it is working on other devices, so why isn't it working on mine? Logcat reveals nothing.
A lot of the secret codes are either carrier specific or ROM specific. An example, I bought my son an HTC EVO 4G (from swappa) and called sprint to activate it. They had me enter one of the secret codes and it should have launched a window that would ask for a PIN. But it did not.

The reason was because the phone that I bought was running CM7. In order to activate I had to enter this code. But in order to enter the code, I had to have the Stock HTC Sense ROM installed on the device. 

I found a flashable version of the Sense ROM, flashed it, called back Sprint and entered the Secret Code. Everything worked as expected. Then after the device was registered with Sprint I flashed CM7 back on the device.