[GUIDE]How to flash a stock rom on branded device

dami_cool

Senior Member
Dec 10, 2010
74
47
0
Londores
You do this at your own risk!!! This could turn your new phone into a very expensive paperweight!!! If you don't know how to do it or are uncomfortable DON'T DO IT!!!


This is really not my work but came across while searching.
Tried on My htc one s worked flawlessly:

So to flash a stock rom we need to have a generic HTC cid follow the steps below:

Prerequistes:
Unlock bootloader.
Rooted
Working Adb.
Hex editor.

1. Fire up your command prompt and go to the directory that you have ADB installed to. Type "adb shell" and hit enter.

2. Type "su" and hit enter. You now have root privileges.

3. Next type "dd if=/dev/block/mmcblk0p4 of=/sdcard/mmcblk0p4" and hit enter. This will dump the partition to your sdcard.

4. Next type "exit", hit enter, type "exit", and hit enter again. This should take you back to a command prompt for your computer.

5. type "adb pull /sdcard/mmcblk0p4" and hit enter. NOTE THE SIZE OF THE FILE BEFORE THE NEXT STEP!

6. Open the file (mmcblk0p4) with your hex editor.

7. Look for offset 00000210 and you should see T-MOB005 with your IMEI number attached to it.
( MY CID WAS T-MOB005 YOUR MAT BE DIFFERENT)

8. Change T-MOB005 to HTC__001 and save the file as mmcblk0p4MOD. This will give you SuperCID as well but instead of HTC__001 you have to put 11111111.But I think supercid does not get OTA updates. So better stay with generic HTC cid.

MAKE SURE AT THIS POINT THAT THE FILE IS THE EXACT SIZE IT WAS BEFORE YOU HEX EDITED IT!

Remember change 8 numbers with 8 in your cid and do not delete the IMEI make sure you match it before going forward

9. Now go back to your command prompt and type "adb push mmcblk0p4MOD /sdcard/mmcblk0p4MOD" and hit enter.

10. Type "adb shell" and hit enter then type "su" and hit enter again. This will put you back into the android shell and give you root privileges.

11. Type "dd if=/sdcard/mmcblk0p4MOD of=/dev/block/mmcblk0p4" and hit enter.
To test if it worked restart the phone into fastboot (type "adb reboot bootloader" and hit enter) and once the bootloader screen comes up type "fastboot oem readcid" and hit enter. It should read "HTC__001".


Now flash a stock recovery and stock boot. Relock your bootloader.
Run a stock rom.
Enjoy.
Just rember to unlock your boot loader again you will need to run
fastboot oem get_identifier_token
again submit to HTCdev and get a new file
Do not use the previous one.

Hope you have all the files need if not look on the other post or let me know will upload them.

Enjoy
 
Last edited by a moderator:

dhingra_vinay_in

Senior Member
Feb 5, 2009
181
25
0
You do this at your own risk!!! This could turn your new phone into a very expensive paperweight!!! If you don't know how to do it or are uncomfortable DON'T DO IT!!!


This is really not my work but came across while searching.
Tried on My htc one s worked flawlessly:

So to flash a stock rom we need to have a generic HTC cid follow the steps below:

Prerequistes:
Unlock bootloader.
Rooted
Working Adb.
Hex editor.

1. Fire up your command prompt and go to the directory that you have ADB installed to. Type "adb shell" and hit enter.

2. Type "su" and hit enter. You now have root privileges.

3. Next type "dd if=/dev/block/mmcblk0p4 of=/sdcard/mmcblk0p4" and hit enter. This will dump the partition to your sdcard.

4. Next type "exit", hit enter, type "exit", and hit enter again. This should take you back to a command prompt for your computer.

5. type "adb pull /sdcard/mmcblk0p4" and hit enter. NOTE THE SIZE OF THE FILE BEFORE THE NEXT STEP!

6. Open the file (mmcblk0p4) with your hex editor.

7. Look for offset 00000210 and you should see T-MOB005 with your IMEI number attached to it.
( MY CID WAS T-MOB005 YOUR MAT BE DIFFERENT)

8. Change T-MOB005 to HTC__001 and save the file as mmcblk0p4MOD. This will give you SuperCID as well. MAKE SURE AT THIS POINT THAT THE FILE IS THE EXACT SIZE IT WAS BEFORE YOU HEX EDITED IT!

Remember change 8 numbers with 8 in your cid and do not delete the IMEI make sure you match it before going forward

9. Now go back to your command prompt and type "adb push mmcblk0p4MOD /sdcard/mmcblk0p4MOD" and hit enter.

10. Type "adb shell" and hit enter then type "su" and hit enter again. This will put you back into the android shell and give you root privileges.

11. Type "dd if=/sdcard/mmcblk0p4MOD of=/dev/block/mmcblk0p4" and hit enter.
To test if it worked restart the phone into fastboot (type "adb reboot bootloader" and hit enter) and once the bootloader screen comes up type "fastboot oem readcid" and hit enter. It should read "HTC__001".


Now flash a stock recovery and stock boot. Relock your bootloader.
Run a custom rom.
Enjoy.
Just rember to unlock your boot loader again you will need to run
fastboot oem get_identifier_token
again submit to HTCdev and get a new file
Do not use the previous one.

Hope you have all the files need if not look on the other post or let me know will upload them.

Enjoy
does this give sim unlock too on a branded device ??
 

zgjbeta

Senior Member
Dec 12, 2007
59
12
0
www.computercityservice.com
Hey guys I'm coming from a g2x never had to deal with any of this but can u explain what u mean by stock rom? Like nexus type Vanilla? And why would I need to do this if I'm already rooted n unlocked?

Sent from my HTC One S using xda premium
 

f10a

Senior Member
Sep 13, 2011
433
17
38
There are two in footballs thread. Try if you can download else let me will upload one.

Sent from my HTC One S using XDA
Im trying to download the TMOUS stock ROM but all download slots are full (it always says that). Is there another place I can download this?
 

dami_cool

Senior Member
Dec 10, 2010
74
47
0
Londores
does anyone try?

a question, but if i change the imei.. it will change one s imei?!?!?!?

thanks
I tried this myself as I had a t-mobile branded device. Now I flashed stock 1.78 Rom.
I am not sure about IMEI it but it is illegal to do so , so why take risk.

Sent from my HTC One S using XDA
 
  • Like
Reactions: whyfi

dami_cool

Senior Member
Dec 10, 2010
74
47
0
Londores
Hey guys I'm coming from a g2x never had to deal with any of this but can u explain what u mean by stock rom? Like nexus type Vanilla? And why would I need to do this if I'm already rooted n unlocked?

Sent from my HTC One S using xda premium
You will need this if you want your phone to be LIKE out of box with original HTC software..
Or if your carrier hasn't released an update for new baseband and you want that . With this you can run a latest stock Rom update . Root, and use custom Rom again.

Sent from my HTC One S using XDA
 
  • Like
Reactions: whyfi and zgjbeta

plocri

Senior Member
Jul 24, 2010
415
38
0
Naples
I've unlocked the bootloader, installed custom recovery, rooted my one s, followed all procedure from 1st post and changed CID to HTC__001 but when I want to install stock 1.70.401.2 ruu it gives my error 155 and cannot install... how can I solve?

EDIT: nevermind, I forgot to relock bootloader... I did and now I've stock debranded phone!

EDIT 2: just a question: I have a branded vodafone one s; now that I debranded it, relocked and installed stock ruu, am I on warranty?
 
Last edited:

benjamin.j.goodwin

Inactive Recognized Developer
Aug 28, 2011
3,073
4,999
263
Northampton
I've unlocked the bootloader, installed custom recovery, rooted my one s, followed all procedure from 1st post and changed CID to HTC__001 but when I want to install stock 1.70.401.2 ruu it gives my error 155 and cannot install... how can I solve?

EDIT: nevermind, I forgot to relock bootloader... I did and now I've stock debranded phone!

EDIT 2: just a question: I have a branded vodafone one s; now that I debranded it, relocked and installed stock ruu, am I on warranty?
Software wise you void your warranty as soon as you unblock your bootloader. However HTC have always taken the phone and fixed my issues when I've had them.

Sent from my HTC One S using xda premium