You can unlock your Android phone even if you've forgotten the passcode, but you'll usually need to factory reset the phone.
To unlock a T-Mobile phone, there are several requirements to meet for eligibility, and it can be a more involved process ...