The following is a step by step guide to root the samsung Galaxy S 2 from T-Mobile. I have tried it and it worked for me on Android 2.3.6. It’s the fastest and safest method to root the phone as far as i know.
Download the root files from here. And extract it to desktop.Make sure there’s a micro-sd card in the phone.Connect the T-Mobile Galaxy S2 to PC via USB port. Mount it as USB mass storage. Copy the su-3.0.5-efgh-signed.zip to phone’s sd card.Reboot the phone into download mode (Hold both volume keys and then connect to PC with USB cable).Connect the phone to PC via USB. Start the included odin software, check PDA and choose the recovery-cwm-hercules.tar.Click Start. Now it will install the CWM Recovery and reboot the phone after it’s done.Reboot the phone into recovery mode.Go to CWM Recovery menu and choose install zip from sd card. Now select the su-3.0.5-efgh-signed.zip.Reboot the phone after it’s now. Congratulations! Now your phone is rooted!
Did it work for you? Please leave a comment if you run into any issues or this is helpful.