Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
DooMLoRD
Old
(Last edited by DooMLoRD; 18th June 2011 at 09:45 PM.)
#1  
DooMLoRD's Avatar
Recognized Developer - OP
Thanks Meter 20608
Posts: 10,084
Join Date: Jul 2010
Location: Indian Institute of Management, Ahmedabad (IIMA)
Angry [How-To] Safely test custom kernels / custom ROMs and get back to stock SE 2.3 ROM

hey guys since jerpelea has already got the custom kernels working, it will just be a matter of time before we see custom ROMs...

i am making this thread so as to answer the many questions that users are having on how to get back to stock when testing custom kernels / custom roms...



[--> WARNING <--]

PLEASE READ THE COMPLETE POST (1ST & 2ND) BEFORE U DO ANYTHING

I AM NOT RESPONSIBLE IF UR DEVICE GETS BRICKED BECAUSE U DID NOT READ THE WHOLE THING PROPERLY / U HAD SOME TYPO WHILE EXECUTING THE COMMANDS

MAKE SURE THAT UR PHONE BATTERY IS FAIRLY CHARGED (> 50%) BEFORE DOING ANY FLASHING AND THAT UR PC HAS A UPS BACKUP (BECAUSE IF FLASHING IS INTERRUPTED THEN IT CAN HAVE SERIOUS CONSEQUENCES)




[ BEFORE U BEGIN ]


Requirements:
  1. Flashtool (it is advisable to use latest version)
  2. Fastboot files
  3. Stock Firmware FTF package
  4. [OPTIONAL] PreRooted system.img files
  5. 7zip



How to use FlashTool:

FLASHTOOL GUIDE - HOW TO for n00bies
this was posted in X10 section but is even relevant for Arc/Play/Neo users



How to use FastBoot:

[Newbie Guide] adb/fastboot/bootloader/android 101




[ FLASHING CUSTOM KERNEL/ROM ]


Flashing Custom Kernel (boot.img):
  1. this WILL NOT WIPE ur data
  2. the custom kernel will be provided as boot.img file
  3. just copy this file to fastboot folder
  4. just power down device and get into FASTBOOT MODE (LED notification turns BLUE) with usb-cable connected to PC
  5. once u are in fastboot mode open command prompt and navigate to the folder containing fastboot files then just use the following command to flash custom kernel:
    Code:
    fastboot flash boot boot.img
  6. once flashing is complete you will get a prompt on pc saying that everything is ok
  7. now just unplug ur device and u are on the custom kernel



Flashing Custom ROM/SYSTEM (system.img):
  1. this WILL NOT WIPE ur data, it will only wipe ur /system partition
  2. the custom ROM/system will be provided as system.img file
  3. just copy this file to fastboot folder
  4. just power down device and get into FASTBOOT MODE (LED notification turns BLUE) with usb-cable connected to PC
  5. once u are in fastboot mode open command prompt and navigate to the folder containing fastboot files then just use the following command to flash custom ROM/system:
    Code:
    fastboot flash system system.img
  6. once flashing is complete you will get a prompt on pc saying that everything is ok
  7. now just unplug ur device and u on custom rom/system




[ GET BACK TO STOCK ]


jerpelea has posted an unbrick (softbrick) package in the FreeXperia project thread... details on how to use it can be found in Post #2 of this thread...


Following is much more generic information which can be applicable to any FW/ROM/Kernel


How to get back to Stock Firmware (FW):
  1. this will get u back to COMPLETE STOCK SETTINGS
    • ALL ur data WILL BE WIPED
    • u will get back to stock kernel
    • u will get back to stock ROM/system
    • ur SDCARD data WILL NOT BE affected
  2. you will need stock FTF package
  3. get ur device into FLASH MODE (LED notification turns Green)
  4. use flashtool to flash stock FTF package
  5. for details refer to the above FlashTool guide



How to get back to Stock Kernel (boot.img / kernel.sin):
  1. this WILL NOT WIPE ur data
  2. using 7zip extract the FTF package to some directory
  3. you will get many files with extension .sin
  4. we are interested in the kernel.sin file, which is the stock kernel
  5. just copy this file to fastboot folder
  6. now for getting back to stock kernel just power down device and get into FASTBOOT MODE (LED notification turns BLUE) with usb-cable connected to PC
  7. once u are in fastboot mode open command prompt and navigate to the folder containing fastboot files then just use the following command to flash stock kernel:
    Code:
    fastboot flash boot kernel.sin
  8. once flashing is complete you will get a prompt on pc saying that everything is ok
  9. now just unplug ur device and u are back to stock kernel



How to get back to Stock ROM (system.img / system.sin):

OPTION - 1 : stock unrooted system
  1. this WILL NOT WIPE ur data, it will only wipe ur /system partition
  2. using 7zip extract the FTF package to some directory
  3. you will get many files with extension .sin
  4. we are interested in the system.sin file, which is the stock rom/system
  5. just copy this file to fastboot folder
  6. now for getting back to stock system/ROM just power down device and get into FASTBOOT MODE (LED notification turns BLUE) with usb-cable connected to PC
  7. once u are in fastboot mode open command prompt and navigate to the folder containing fastboot files then just use the following command to flash stock ROM/system:
    Code:
    fastboot flash system system.sin
  8. once flashing is complete you will get a prompt on pc saying that everything is ok
  9. now just unplug ur device and u are back to stock rom/system

OPTION - 2 : stock PreRooted system
  1. this WILL NOT WIPE ur data, it will only wipe ur /system partition
  2. use the prerooted system.img u downloaded from above links
  3. just copy this file to fastboot folder
  4. now for getting back to stock prerooted system/ROM just power down device and get into FASTBOOT MODE (LED notification turns BLUE) with usb-cable connected to PC
  5. once u are in fastboot mode open command prompt and navigate to the folder containing fastboot files then just use the following command to flash stock ROM/system:
    Code:
    fastboot flash system system.img
  6. once flashing is complete you will get a prompt on pc saying that everything is ok
  7. now just unplug ur device and u are back to stock rom/system




[ TROUBLESHOOTING ]

  • sometimes u may run into problems after flashing back from custom system.img to stock system.img, like apps & core system crashes/force closes
  • if u face such problems then it is advisable to WIPE ur /data parition
  • this WILL WIPE ur data (apps, settings), ur SDCARD DATA WONT BE AFFECTED
  • just power down device and get into FASTBOOT MODE (LED notification turns BLUE) with usb-cable connected to PC
  • once u are in fastboot mode open command prompt and navigate to the folder containing fastboot files then just use the following command to wipe /data partition:
    Code:
    fastboot erase userdata
  • once flashing is complete you will get a prompt on pc saying that everything is ok
  • now just unplug ur device and the problems should be sorted out
  • if u still are facing problems just flash back to Stock Firmware using FLASHTOOL




[ FINAL THOUGHTS ]


I hope this answers most of ur questions...

in case of specific queries about flashtool/fastboot or prerooted images ask in THOSE SPECIFIC threads... if u have any queries other than that [RELATED TO THIS THREAD ] u can post ur questions here...



PLEASE DONT FILL UP DEV THREADS WILL REDUNDANT QUESTIONS

I am on a tour right now... will not be available for discussions for a while...



Like my work? Please consider donating via PayPal


Lead Developer of Team UtterChaos & Member of Team ICX

Creator of DooMKernel making those Snapdragons fly higher and faster

Android Devices I use : Sony Xperia Z, T, S, ARC, PLAY

Contributions : Generic Android / Xperia X10 / Xperia 2011 devices / Samsung Galaxy S2 / Huawei Ideos X6 / Samsung Galaxy SCL (i9003) / HTC Flyer / Kindle Fire / HTC JetStream / Xperia P, Sola, U / HTC One X / Xperia S / Xperia T, V, TX / Xperia Z, ZL, Tablet Z





** NEW *** Xperia SDCARD Mounter App! (supports Xperia Z, ZL, Tablet Z, T/TL, TX, V, S/SL/NX, Ion, Acro S/HD, P, U, Go, Sola, J, Miro, Tipo, Tipo Dual, E, E Dual!)
The Following 57 Users Say Thank You to DooMLoRD For This Useful Post: [ Click to Expand ]
 
DooMLoRD
Old
(Last edited by DooMLoRD; 9th June 2011 at 07:22 PM.)
#2  
DooMLoRD's Avatar
Recognized Developer - OP
Thanks Meter 20608
Posts: 10,084
Join Date: Jul 2010
Location: Indian Institute of Management, Ahmedabad (IIMA)
jerpelea has posted an unbrick (softbrick) package in the FreeXperia project thread...

here is how to use it to get back to stock!


Requirements:
  1. Fastboot drivers already installed
  2. unbrick (softbrick) package
  3. 7zip


How to get back to Stock Kernel & system:
  1. this WILL WIPE ur data
  2. using 7zip extract the unbrick (softbrick) package to some directory
  3. now for getting back to stock kernel & ROM just power down device and get into FASTBOOT MODE (LED notification turns BLUE) with usb-cable connected to PC
  4. once u are in fastboot mode just browse to the folder where u extracted the unbrick package double click on restoreme.cmd
  5. once flashing is complete you will get a prompt on pc saying that everything is ok (or the command prompt window might just close in some time dont worry its expected)
  6. ur device will now restart automatically
  7. now just unplug ur device and u are back to stock kernel & ROM

I am on a tour right now... will not be available for discussions for a while...



Like my work? Please consider donating via PayPal


Lead Developer of Team UtterChaos & Member of Team ICX

Creator of DooMKernel making those Snapdragons fly higher and faster

Android Devices I use : Sony Xperia Z, T, S, ARC, PLAY

Contributions : Generic Android / Xperia X10 / Xperia 2011 devices / Samsung Galaxy S2 / Huawei Ideos X6 / Samsung Galaxy SCL (i9003) / HTC Flyer / Kindle Fire / HTC JetStream / Xperia P, Sola, U / HTC One X / Xperia S / Xperia T, V, TX / Xperia Z, ZL, Tablet Z





** NEW *** Xperia SDCARD Mounter App! (supports Xperia Z, ZL, Tablet Z, T/TL, TX, V, S/SL/NX, Ion, Acro S/HD, P, U, Go, Sola, J, Miro, Tipo, Tipo Dual, E, E Dual!)
The Following 14 Users Say Thank You to DooMLoRD For This Useful Post: [ Click to Expand ]
 
ShyamSasi
Old
#3  
ShyamSasi's Avatar
Recognized Contributor
Thanks Meter 1262
Posts: 2,455
Join Date: Dec 2010
Location: CLASSIFIED

 
DONATE TO ME
Nice thread Mate ... I'm sure this be most useful


ROM : SlimBean (4.2.2.Build.5-OFFICAL)
Recovery: PhilZ Touch Recovery
Kernel: 3.1.10 (n3okernel_v33 mnazim@slimroms.net)
Baseband: 5.1204.162.29

Ultimate HTC One X Guide To Tweaking, Flashing and Modding
List of Themes and Mod for HTC One X

List of Custom ROMs, Firmwares and Kernels for Xperia Arc / Arc S
The Following User Says Thank You to ShyamSasi For This Useful Post: [ Click to Expand ]
 
DooMLoRD
Old
(Last edited by DooMLoRD; 9th June 2011 at 07:23 PM.)
#4  
DooMLoRD's Avatar
Recognized Developer - OP
Thanks Meter 20608
Posts: 10,084
Join Date: Jul 2010
Location: Indian Institute of Management, Ahmedabad (IIMA)
i just saw that jerpelea has posted an unbrick (softbrick) package...

i am downloading it now and will updated the info as per the files present in that package...


EDIT:

how to updated...
info on how to use the package updated in 2nd post

I am on a tour right now... will not be available for discussions for a while...



Like my work? Please consider donating via PayPal


Lead Developer of Team UtterChaos & Member of Team ICX

Creator of DooMKernel making those Snapdragons fly higher and faster

Android Devices I use : Sony Xperia Z, T, S, ARC, PLAY

Contributions : Generic Android / Xperia X10 / Xperia 2011 devices / Samsung Galaxy S2 / Huawei Ideos X6 / Samsung Galaxy SCL (i9003) / HTC Flyer / Kindle Fire / HTC JetStream / Xperia P, Sola, U / HTC One X / Xperia S / Xperia T, V, TX / Xperia Z, ZL, Tablet Z





** NEW *** Xperia SDCARD Mounter App! (supports Xperia Z, ZL, Tablet Z, T/TL, TX, V, S/SL/NX, Ion, Acro S/HD, P, U, Go, Sola, J, Miro, Tipo, Tipo Dual, E, E Dual!)
The Following User Says Thank You to DooMLoRD For This Useful Post: [ Click to Expand ]
 
depulle87
Old
#5  
depulle87's Avatar
Senior Member
Thanks Meter 111
Posts: 669
Join Date: Nov 2010
nice thread thanks for it gonna try this later this week
Sony Tablet-S
Whatsapp on your Sony tablet-S

Hit if someone helps you out and most of all HAVE FUN
 
PollPixx
Old
#6  
PollPixx's Avatar
Senior Member
Thanks Meter 286
Posts: 1,972
Join Date: Apr 2009
Man, what an amount of text, thanks for your efforts to get everything organized this well. Will try as soon as we have any reliable material to work with.

Sent from my arc or optimus 2x
 
itskapil
Old
#7  
Senior Member
Thanks Meter 45
Posts: 195
Join Date: Apr 2010
Location: Bhilwara
Wow! Cool post man. Kudos
 
Lef.teris
Old
(Last edited by Lef.teris; 10th June 2011 at 10:36 AM.)
#8  
Lef.teris's Avatar
Senior Member
Thanks Meter 115
Posts: 119
Join Date: Apr 2009
Nice thread man, thank you!!!

I have two questions.

1. How can I modify or create a custom boot.img (from kernel.sin)?
2. How can I create/compress a new system.img back from extracted system.sin (with sin2img tool)

If anyone want to share his knowledge please pm me!
 
hush66
Old
#9  
hush66's Avatar
Senior Member
Thanks Meter 234
Posts: 417
Join Date: Apr 2010
Thanks for the guide!

I'm just wondering. In X10's XRecovery, there is a Backup and a Restore function. The Backup function practically saves the entire ROM including data. One can then proceed to flash custom ROMs/kernels. In the event that we want to revert back to the original ROM including data, we just have to use the Restore function.

Does any of the above methods achieve the same result?
 
DooMLoRD
Old
#10  
DooMLoRD's Avatar
Recognized Developer - OP
Thanks Meter 20608
Posts: 10,084
Join Date: Jul 2010
Location: Indian Institute of Management, Ahmedabad (IIMA)
Quote:
Originally Posted by hush66 View Post
Thanks for the guide!

I'm just wondering. In X10's XRecovery, there is a Backup and a Restore function. The Backup function practically saves the entire ROM including data. One can then proceed to flash custom ROMs/kernels. In the event that we want to revert back to the original ROM including data, we just have to use the Restore function.

Does any of the above methods achieve the same result?
those are called NANDROID backups can be created using working RECOVERY...

no the above methods can ONLY WRITE to device... they cant take backups...

I am on a tour right now... will not be available for discussions for a while...



Like my work? Please consider donating via PayPal


Lead Developer of Team UtterChaos & Member of Team ICX

Creator of DooMKernel making those Snapdragons fly higher and faster

Android Devices I use : Sony Xperia Z, T, S, ARC, PLAY

Contributions : Generic Android / Xperia X10 / Xperia 2011 devices / Samsung Galaxy S2 / Huawei Ideos X6 / Samsung Galaxy SCL (i9003) / HTC Flyer / Kindle Fire / HTC JetStream / Xperia P, Sola, U / HTC One X / Xperia S / Xperia T, V, TX / Xperia Z, ZL, Tablet Z





** NEW *** Xperia SDCARD Mounter App! (supports Xperia Z, ZL, Tablet Z, T/TL, TX, V, S/SL/NX, Ion, Acro S/HD, P, U, Go, Sola, J, Miro, Tipo, Tipo Dual, E, E Dual!)

The Following User Says Thank You to DooMLoRD For This Useful Post: [ Click to Expand ]
 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

report this ad
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...