Mine is HTC One X and I am going to buy a mhl to hdmi adapter in our local store. Can I expect samsung or other random mhl adapters to work on my HTC One X in case Stock adapters are out of stock or too expensive?
Samsung has two types of MHL cable: an 11-pin one for their more recent phones, and a 5-pin one for their older phones. The 5-pin one is standard and will work on non-Samsung phones. The 11-pin one only works on newer Samsung phones.
Third-party manufacturers tend to also sell both kinds, so look at which phones the cable says it is for. If it says it's for Samsung Galaxy S4, or if it's Y-shaped with a second USB output, then it's an 11-pin one and won't work with your phone.
See my other answer on How does MHL work? to learn more about the difference.