Wednesday 23 January 2013

How To Downgrade Unbrick HTC One S Vile S4 Only

HTC One S S4 Unbrick Downgrade
This should work on the S4 version of the HTC One S. I do not recommend trying this on the S3 version.. 
Nobody is responsible for the outcome of your phone except you. You know the possible risks and you took them
 DO NOT ATTEMPT TO DOWNGRADE IF YOU TOOK THE JB OTA. IT HAS BEEN REPORTED TO PERMANENTLY BRICK PHONES ON THE EVITA SIDE.


DO NOT ATTEMPT UNLESS YOU HAVE LINUX INSTALLED.. Ubuntu 12.04 or higher preferred - 32/64 bit!
You can use a livecd or wubi. No virtualbox

This guide assumes your Bootloader is unlocked, You have Recovery Installed, and USB Debugging is ENABLED. Please enable USB debugging before continuing.

Creating the brick


Prerequisites: killp4.. included in the unbrick package
unbrick package: http://dl.dropbox.com/u/40181085/ville.zip
A backed up p4!


*MAKING A NANDROID BACKUP WILL DO NOTHING FOR YOU.. BUT I DO RECOMMEND HAVING ONE AT ALL TIMES*

1. Place killp4 on your /sdcard

2. Download adb and enable USB debugging (adb is in the android SDK, or search Google for a download)

3. Open your command line and type the following
Code:
$ adb shell
$ su
# dd if=/dev/block/mmcblk0p4 of=/sdcard/bakp4
# exit
$ exit
COPY bakp4 to a SAFE location ON YOUR COMPUTER and UNMOUNT your USB storage

4. Kill your phone
Code:
$ adb shell
$ su
# dd if=/sdcard/killp4 of=/dev/block/mmcblk0p4
# exit
$ exit
5. Reboot your phone. The charging light will no longer be on, and you should be stuck on a black screen.


Enumerating your partitions

Q: What does enumerate mean?
A:
Code:
enumerate - to specify one after another.
Synonym: list
Prerequisites: Ubuntu 12.04 or higher. 32/64 bit
unbrick package: http://dl.dropbox.com/u/40181085/ville.zip
A null p4 or the bakp4 you acquired earlier.
a null p4 is included in the unbrick package if you didn't save your backup.. you will need to hex edit your IMEI into this file. the offset is 0x21c, it's after 11111111, which is the SuperCID


1. Open up 3 terminal windows

2. On your first window, type
Code:
$ watch -n 1 lsusb
3. Now, hold power down on your phone for about 10 seconds*,OR until you see (QDL mode) disappear and let go, Then go to your second window and repeatedly run the following command
*On the HTC One X you have to hold power for 10 seconds, on the EVO 4G LTE it is ~30 seconds. This number may vary
Code:
$ ls /dev/sd*
You should go from seeing this..


to seeing this...


4. Make note of the following.
for me, my devices was listed as /dev/sdb, yours may be listed as /dev/sdc or even /dev/sdd.
make note of /dev/sd*4 and /dev/sd*12

5. Make sure Linux sees the phone
Code:
$ sudo dmesg | grep "qcserial"
You should see "Qualcomm USB modem converter detected" as the last line of the output. If not, you can unplug and replug the USB cable or run...

Code:
$ sudo modprobe qcserial
to reload the driver

6. Reset the driver
Code:
$ sudo modprobe -r qcserial
7. create the block device
Code:
$ sudo mknod /dev/ttyUSB0 c 188 0
8. Open a third Terminal window and navigate to where you stored the ville folder. I saved it to my desktop, so my code is
Code:
$ cd Desktop/ville
$ chmod +x emmc_recover
9. Now we restore the hboot.. replace /sdc12 with your device location that we discovered in step 3 and 4
Code:
$ sudo ./emmc_recover -f ./hboot.nb0 -d /dev/sdc12 -c 24576
You can hit enter at all of the prompts here. If it stalls at "Waiting for /dev/sdc12, hold the power button down on your phone about 10 seconds,or until your see "Qualcomm. Inc. Gobi Wireless Modem (QDL mode) disappear from your terminal window, then release it. 10 seconds or less after you do this, emmc_recovery will see your phone and proceed. Flashing Hboot will take several minutes, as it has to load data in ~23K chunks followed by a reset after each.

or you can open a new terminal window and run the following command IF AND ONLY IF the phone doesn't reset out of QDL mode
Code:
$ sudo ./emmc_recover -r
10. Once that is finished. We have to reset the qcserial driver again.
Code:
$ sudo modprobe -r qcserial
11. And then recreate the block device
Code:
$ sudo mknod /dev/ttyUSB0 c 188 0
12. Now we restore the original mmcblk0p4 that you should have saved as "bakp4"
Code:
$ sudo ./emmc_recover -f ./bakp4 -d /dev/sdc4 -c 24576
13. Again, if it hangs, hold your phone's power button for about 10 seconds, then release. This file will flash very quickly (it's only 1K) and once it completes, you'll immediately notice that your charging light turns back on. You should see "Qualcomm, Inc." or "Qualcomm, Inc. Gobi Wireless modem (QDL mode) disappear from your terminal screen.

Download   ville.zip - (720.3 KB, 210 views)