Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,771,463 Members 50,903 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
dami_cool
Old
(Last edited by original_ganjaman; 7th August 2012 at 05:17 PM.)
#1  
dami_cool's Avatar
Member - OP
Thanks Meter 47
Posts: 59
Join Date: Dec 2010
Location: Londores
Default [GUIDE]How to flash a stock rom on branded device

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
The Following 27 Users Say Thank You to dami_cool For This Useful Post: [ Click to Expand ]
 
dhingra_vinay_in
Old
#2  
Senior Member
Thanks Meter 16
Posts: 134
Join Date: Feb 2009
Quote:
Originally Posted by dami_cool View Post
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 ??
 
dami_cool
Old
#3  
dami_cool's Avatar
Member - OP
Thanks Meter 47
Posts: 59
Join Date: Dec 2010
Location: Londores
No, sim lock is completely different.

Sent from my HTC One S using XDA
The Following User Says Thank You to dami_cool For This Useful Post: [ Click to Expand ]
 
raikesy
Old
#4  
raikesy's Avatar
Senior Member
Thanks Meter 197
Posts: 707
Join Date: Mar 2009
Quote:
Originally Posted by dami_cool View Post
No, sim lock is completely different.

Sent from my HTC One S using XDA
Isn't 11111111 SuperCID?

Sent from my HTC One S using xda premium
 
dami_cool
Old
#5  
dami_cool's Avatar
Member - OP
Thanks Meter 47
Posts: 59
Join Date: Dec 2010
Location: Londores
Yup that's right

Sent from my HTC One S using XDA
 
Skyman1
Old
#6  
Skyman1's Avatar
Senior Member
Thanks Meter 17
Posts: 155
Join Date: Dec 2011
Location: Rome
That's nice thx!
But where I can dind all the original stock unbranded ROM?

Inviato dal mio GT-I9100 con Tapatalk 2
 
dami_cool
Old
#7  
dami_cool's Avatar
Member - OP
Thanks Meter 47
Posts: 59
Join Date: Dec 2010
Location: Londores
Quote:
Originally Posted by Skyman1 View Post
That's nice thx!
But where I can dind all the original stock unbranded ROM?

Inviato dal mio GT-I9100 con Tapatalk 2
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
The Following User Says Thank You to dami_cool For This Useful Post: [ Click to Expand ]
 
zgjbeta
Old
#8  
Member
Thanks Meter 12
Posts: 57
Join Date: Dec 2007

 
DONATE TO ME
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
Old
#9  
Senior Member
Thanks Meter 13
Posts: 332
Join Date: Sep 2011
Quote:
Originally Posted by dami_cool View Post
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?
 
nascio
Old
#10  
Member
Thanks Meter 2
Posts: 33
Join Date: Sep 2010
Location: Rome
does anyone try?

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

thanks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes