[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)
the custom kernel will be provided as boot.img file
just copy this file to fastboot folder
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 flash custom kernel:
Code:
fastboot flash boot boot.img
once flashing is complete you will get a prompt on pc saying that everything is ok
now just unplug ur device and u are on the custom kernel
Flashing Custom ROM/SYSTEM (system.img):
this WILL NOT WIPE ur data, it will only wipe ur /system partition
the custom ROM/system will be provided as system.img file
just copy this file to fastboot folder
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 flash custom ROM/system:
Code:
fastboot flash system system.img
once flashing is complete you will get a prompt on pc saying that everything is ok
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):
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
you will need stock FTF package
get ur device into FLASH MODE (LED notification turns Green)
use flashtool to flash stock FTF package
for details refer to the above FlashTool guide
How to get back to Stock Kernel (boot.img / kernel.sin):
this WILL NOT WIPE ur data
using 7zip extract the FTF package to some directory
you will get many files with extension .sin
we are interested in the kernel.sin file, which is the stock kernel
just copy this file to fastboot folder
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
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
once flashing is complete you will get a prompt on pc saying that everything is ok
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
this WILL NOT WIPE ur data, it will only wipe ur /system partition
using 7zip extract the FTF package to some directory
you will get many files with extension .sin
we are interested in the system.sin file, which is the stock rom/system
just copy this file to fastboot folder
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
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
once flashing is complete you will get a prompt on pc saying that everything is ok
now just unplug ur device and u are back to stock rom/system
OPTION - 2 : stock PreRooted system
this WILL NOT WIPE ur data, it will only wipe ur /system partition
use the prerooted system.img u downloaded from above links
just copy this file to fastboot folder
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
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
once flashing is complete you will get a prompt on pc saying that everything is ok
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...
using 7zip extract the unbrick (softbrick) package to some directory
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
once u are in fastboot mode just browse to the folder where u extracted the unbrick package double click on restoreme.cmd
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)
ur device will now restart automatically
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...
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.
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!
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?
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...
Ever since the introduction of multi-window with things like Cornerstone and … more
XDA Developers was founded by developers, for developers. It is now a valuable resource for people who want to make the most of their mobile devices, from customizing the look and feel to adding new functionality. Are you a developer?