Less than 24 hours after the launch of the iPhone 4, the infamous Dev Team has released an updated version of its PwnageTool v4.01 which allows users to unlock their iPhone OS 4 devices.
However, the upgrade process doesn't work on iPhone 2G, iPod Touch and iPod Touch 3G since iOS4 is not compatible with these. You will be able to create your own custom .psw firmware to upgrade to iOS4 without upgrading the baseband.
Furthermore, you won't be able to remove the carrier lock which won't matter for those who purchased the handset SIM Free direct from Apple. However, there's another unlock software called Ultrasn0w v0.93 which unlocks the said devices.
The Dev-team had to issue a second upgrade shortly after PwnageTool 4.0 was released and they added that "Each supported device has few different scenarios that users need to consider when performing the upgrades".
Obviously, such procedures are not condoned in any way by Apple and ou will be carrying them at your own risks. This means that you run the risk of having a bricked iPhone or iPod Touch should there be any issues arising; definitely not for the faint hearted.
A comprehensive, step-by-step tutorial has been put together by Redmondpie here.