Friday, August 24, 2012

How to unlock HTC Sensation 4G

The following is a step by step guide to unlock HTC Sensation 4G. It requires the phone to be rooted first. Please see my other guide
to root HTC Sensation 4G. 

  • Install Android Terminal Emulator from marketplace.
  • Install busybox from marketplace.
  • Start the emulator and enter "su". 
  • enter "strings -n 8 /dev/block/mmcblk0p6"
  • It should have the unlock code above the imei number in the last few lines. If it shows a date instead, go to next step.
  • Download PG58DIAG from here.
  • Copy the file PG58DIAG to SD card root folder.
  • Reboot to hboot. Place the phone horiziontally when asked to.
  • Press Power button to choose "Clean S58 Data".
  • Take out the SD card and reboot the phone. Delete the file PG58DIAG from SD card.


Did it work for you? Please leave a comment.


  1. Hi,
    You can unlock your iPhone 4 by remote unlocking, it is both simple and safe. A lot of websites offer this unlocking service. I unlocked my iPhone at, and found their service and support to be good. You can have a clear idea on how to unlock your iPhone using remote unlocking at…; this site gives you free instructions on how to unlock cell phones!!

    1. I have unlocked my iPhone by using Remote unlocking service. I got it from one of the online service provider to unlock it. Now, my iPhone is working properly.

  2. Thanks for sharing information.It really helpful for getting the unlock code.
    Htc Unlock Code

  3. Thanks for great information you write it very clean. I am very lucky to get this tips from you
    ipad repair plano

  4. unlock your iPhone with lowest price