As simple as that
Another question: if I perform "format system" and then reboot, will I be left without recovery?
I bought my device already rooted, but I understand that there is some sort of stock recovery. Is it true, if yes, what does it do?
In case I reboot after formating system and there will not be recovery as I suspect, I will be able to flash recovery image via fastboot as usual, right?
thanks
Format system will format the system partition, not the recovery.
Recovery will remain intact.
Thank you, but I would really like to understand how it works:
I know that the Internal memory devides into 3 partitions: system ,cach, data.
Which are the ROM. (This "ROM" is actually just flash memory isn't it? and is rewritable)
Where is the partition of the recovery if so?
Are there more partitions than those 3 in there?
Now when I come to think about it, I still don't know where the radio partition is, and where the data of bootloader is located.
I would still like to know what happens if you perform "format boot". Is it the partition where recovery is sitting or it refers to the memory partitioning (aka Hboot).
and That too
I bought my device already rooted, but I understand that there is some sort of stock recovery. What does a stock recovery allow to do?
Click to expand...
Click to collapse
thanks
There are actually more than those 3 partitions =)
There is:-
HBOOT - This is the bootloader its-self and contains the partition table
Boot - Contains the Kernel and a ramdisk used during startup
Recovery - Contains the recovery image
System - Contains the ROM installed on the device
Data - The internal memory, apps etc stored here
Cache - Pretty self explanatory =D It hold the cache =P
Radio - (Not too sure if this is on the NAND or not) Tells the radio chip how to communicate with your carrier etc (as far as I'm aware, someone feel free to correct me)
If you format boot, the phone will just go right to the bootloader without actually loading Android, but with a custom recovery it can be fixed easily by reflashing the ROM, nandroid restore, or by using fastboot to flash an existing boot.img. (Just a note here, flashing a Kernel wont fix this as the scripts used try to extract some parts from the existing boot.img, which isn't there after a format =P)
Assuming that you have an S-OFF HBOOT (Alpharev) you can flash any of those partitions with an image, using Fastboot as you mentioned, however, if you don't have S-OFF, you would have to do it through the Recovery (and you can’t flash HBOOT through recovery).
The phone does come with a stock Recovery Image, but this is very limited, Can only flash update.zip signed by HTC (again, might be wrong here), factory reset (Wipe data), reboot the phone and possibly some others.
Using either ClockworkMod Recovery or Amon_RA's recovery will let you flash custom ROMs, perform nandroid backups + restore (Boot, system + data) and a few other fancy things like wiping individual partitions =)
Hope this helps!
Thanks alot! you've explained it very clearly.
I would like just correct a very tiny mistake, probably unintentional - Factory reset is "wipe data", not "format system + data".
I got the answers that I wanted and more.
thanks again
It was unintentional =P I corrected incase someone happens upon the post.
Glad I could Help
wrong thread
Hi, I need help with my SGS2 . I tried to install the miui rom and it was the first time I tried to flash a arom. I just followed the intsurctions on the following link http://androidflip.com/how-to-insta...-3-4-on-samsung-galaxy-s2-step-by-step-guide/
and I tought everything went soomthly but after I rebooted the device first it was like the miui logo on the screen and nothing happened and then I tried to reboot it then my pc did not recognize the phone when I connected it to the pc and then I took the battery off and now when start the damn phone the triangle picture comes and then just black screen nothing happens. I did make a full recovery with the rom manager before and now my question is did I just kill the phone or can I do something?
Pls help me.
There's tons of threads about your problem.
Put it in download mode and install a stock ROM using Odin. That should get you going again.
You should have CWM, so turn phone off, press volup+home+power, goto Mounts&Storage, Mount USB Storage, and connect phone to PC. Copy over whatever ROM you want, then in CWM menu clear data/factory reset, clear cache, goto advanced, clear dalvik cache, goto install zip from sdcard, choose the zip ROM file, and install it. Reboot, and you should be fine.
thank you so much guys, it helped. It is working now. I will not panic like this one next time. Once again thank you very much
Brgds
blackspp said:
There's tons of threads about your problem.
Put it in download mode and install a stock ROM using Odin. That should get you going again.
Click to expand...
Click to collapse
Good sir, I'm also new with this rooting and flashing stuff on Android. Would this method always guarantee that the phone firmware will be fixed under any circumstances? (aside from physical damage, of course)
m2smoe said:
You should have CWM, so turn phone off, press volup+home+power, goto Mounts&Storage, Mount USB Storage, and connect phone to PC. Copy over whatever ROM you want, then in CWM menu clear data/factory reset, clear cache, goto advanced, clear dalvik cache, goto install zip from sdcard, choose the zip ROM file, and install it. Reboot, and you should be fine.
Click to expand...
Click to collapse
Let me get this straight, so basically what you are saying is:
- Wipe all the ROM data from the phone
- Install a new ROM, since all the previous corrupt ROM data is cleared
But why clear cache and then clear dalvik cache? Just curious with the difference. (Yes, I haven't rooted mine yet, because I'm still learning slowly before plunging)
Oh also, since you mentioned that we should "clear data/factory reset", doesn't that mean the phone is back to the original stock ROM already, which means we have to root it again...?
i want to install moar but im a beginner noob... im looking for a tutorial or video..
i just got rooted and did a titanium backup...
I DOWNLOADED THE MOAR 8.00 TO MY COMPUTER ( DONT KNOW EXACTLY WHAT IS THE NEXT STEP)
I DOWNLOADED MK3 MODEM TO MY COMPUTER (DONT WHAT TO DO WITH IT)
The first place you should do is go HERE. That thread will answer most of your questions. Also if you are on the PC, in my Sig there is a general guide that you can follow on How to Flash a Rom.
EDIT:
It's been posted a bunch of times already. But here goes.
If you are not sure what some of these terms mean, !!! STOP !!! Use the search feature and do some reading to better familiarize yourself with the process, and terminology. A good place to start is HERE. Also THIS THREAD.
BEFORE YOU START COPY ALL YOUR INTERNAL STORAGE INFO AND EXTERNAL STORAGE INFO TO YOUR PC JIC
1.) download the MK3 Modem - verify MD5 checksum
2.) download MOAR Rom - Verify MD5 checksum
3.) Place both on your external SD Card ( not the phones Storage )
4.) Boot into Recovery
5.) Backup your current setup ( NANDROID BACKUP )
6.) Wipe Cahce - Wipe Dalvik - Flash MK3 Modem - reboot
7.) Let the Device fully boot - check to see that Data is working correctly - If it is move on to the next step - If it is not, Do not proceed
8.) Boot into Recovery
9.) Do a Full Wipe : System - Data - Dalvik Cache - Cache - Factory Reset - wipe Internal Storage
10.) Flash the Rom
11.) Reboot and enjoy
prboy1969 said:
The first place you should do is go HERE. That thread will answer most of your questions. Also if you are on the PC, in my Sig there is a general guide that you can follow on How to Flash a Rom.
EDIT:
It's been posted a bunch of times already. But here goes.
If you are not sure what some of these terms mean, !!! STOP !!! Use the search feature and do some reading to better familiarize yourself with the process, and terminology. A good place to start is HERE. Also THIS THREAD.
BEFORE YOU START COPY ALL YOUR INTERNAL STORAGE INFO AND EXTERNAL STORAGE INFO TO YOUR PC JIC
1.) download the MK3 Modem - verify MD5 checksum
2.) download MOAR Rom - Verify MD5 checksum
3.) Place both on your external SD Card ( not the phones Storage )
4.) Boot into Recovery
5.) Backup your current setup ( NANDROID BACKUP )
6.) Wipe Cahce - Wipe Dalvik - Flash MK3 Modem - reboot
7.) Let the Device fully boot - check to see that Data is working correctly - If it is move on to the next step - If it is not, Do not proceed
8.) Boot into Recovery
9.) Do a Full Wipe : System - Data - Dalvik Cache - Cache - Factory Reset - wipe Internal Storage
10.) Flash the Rom
11.) Reboot and enjoy
Click to expand...
Click to collapse
Also recommend making sure you have an updated custom recovery... I personally use Philz. There is also CWM and TWRP. Search the forum for the threads, there's some good reading there.
prboy1969 said:
4.) Boot into Recovery
5.) Backup your current setup ( NANDROID BACKUP )
6.) Wipe Cahce - Wipe Dalvik - Flash MK3 Modem - reboot
rickpcb said:
Also recommend making sure you have an updated custom recovery... I personally use Philz. There is also CWM and TWRP. Search the forum for the threads, there's some good reading there.
Click to expand...
Click to collapse
That was my first thought....Recovery.....which one do you have......All the ones mentioned above will work, but it will also depend on which version you have. ( Unless that's changed in the last 2 weeks or so)
Click to expand...
Click to collapse
disc golfing said:
prboy1969 said:
4.) Boot into Recovery
5.) Backup your current setup ( NANDROID BACKUP )
6.) Wipe Cahce - Wipe Dalvik - Flash MK3 Modem - reboot
That was my first thought....Recovery.....which one do you have......All the ones mentioned above will work, but it will also depend on which version you have. ( Unless that's changed in the last 2 weeks or so)
Click to expand...
Click to collapse
The current version of Philz can be found here:
http://forum.xda-developers.com/showthread.php?t=2446393
Click to expand...
Click to collapse
Update: The latest TWRP is already capable of decrypting data. This method is now unnecessary and depreciated. Use factory reset in TWRP menu instead
Disclaimer: This mod will wipe your data. I am not responsible for data loss after using this mod.
I tested on my device several times, it's working for me so internal storage is always preserved, but I cannot guarantee if anything is messed up on your side. Please read the post carefully before using this mod!
Always backup your important data before modifying your phone's software!
To compensate the mistake I have done in the modified SuperSU script (I fixed it eventually though ), I decided to release a mod I consider quite useful for most people.
I've used the 10 for quite some time, and I've been messing with it from day 1.
Since the encryption is required for the phone to have proper radio signal (more info here), we are forced to keep our devices encrypted.
And because HTC uses proprietary encryption method, TWRP is unable to decrypt our data partition, which causes the recovery unable to read anything from data.
This is actually quite a big problem. If you want to full wipe and clean flash your favorite custom rom, the "Factory Reset" option in TWRP is not available, so you are forced to wipe the whole data partition, which will cause all your personal files stored in internal storage to be removed.
If you're a flashaholic like I am, you are forced not to store anything important in the phone storage because it will be wiped every time trying to clean flash a rom.
To breakthrough this inconvenience, I created this flashable zip to accomplish something similar to the "Factory Reset" option in TWRP.
Requirement: You have to use the systemless root of SuperSU to use this mod. If you want to flash the wipe script with SuperSU, flash SuperSU first, then flash the wipe script.
Important: If you have chosen "Require PIN/password/pattern to start device" in the "Secure startup" page during the initial setup, you CANNOT use this mod!
If you have to enter your PIN/password/pattern before your device booted up, this means that you have secure startup enabled. You CANNOT use this mod!
If secure startup is enabled and you flash this zip, your encryption will be messed up and you will have to format the whole data partition eventually to make your phone working again.
After flashing the mod, your data will not be wiped immediately in recovery because we cannot do so. It will wipe the data AFTER you rebooted back to system. It will reboot again after the wipe is done. If you flashed SuperSU at the same time with this mod, you will experience 2 consecutive reboot loops. This is normal behavior, don't panic.
If devs are interested in including this zip into your rom, you can use it in the same way as SuperSU:
Code:
package_extract_dir("wipe", "/tmp/wipe");
run_program("/sbin/busybox", "unzip", "/tmp/wipe/wipe.zip", "META-INF/com/google/android/*", "-d", "/tmp/wipe");
run_program("/sbin/busybox", "sh", "/tmp/wipe/META-INF/com/google/android/update-binary", "dummy", "1", "/tmp/wipe/wipe.zip");
For those who are interested in what this zip actually do, here is a brief explanation:
If secure startup is disabled, data will be decrypted as soon as the device booted up. We can only access data after it is decrypted. So our only choice is to wipe data after the device has booted up.
I created a script to wipe all data except SuperSU app, su binary image, and your internal storage.
SuperSU will automatically run scripts inside the directory /su/su.d, so after putting the script into the folder, SuperSU will the wipe script at boot time.
The problem is: su.img is also located in /data, how can we push files into the image? Fortunately, our master Chainfire has thought of this problem. The image /cache/su.img will be merged with /data/su.img during boot. So I just need to place the script into /cache/su.img, then Chainfire's script will do all the rest of the work automatically. If you're interested in the merging process, take a look at launch_daemonsu.sh in the ramdisk of a SuperSU modified boot for more details.
Is this helpful in regards to initial routing and flashing a rom or only afterwards to flash a new one?
topjohnwu said:
Disclaimer: This mod will wipe your data. I am not responsible for data loss after using this mod.
I tested on my device several times, it's working for me so internal storage is always preserved, but I cannot guarantee if anything is messed up on your side. Please read the post carefully before using this mod!
Always backup your important data before modifying your phone's software!
To compensate the mistake I have done in the modified SuperSU script (I fixed it eventually though ), I decided to release a mod I consider quite useful for most people.
I've used the 10 for quite some time, and I've been messing with it from day 1.
Since the encryption is required for the phone to have proper radio signal (more info here), we are forced to keep our devices encrypted.
And because HTC uses proprietary encryption method, TWRP is unable to decrypt our data partition, which causes the recovery unable to read anything from data.
This is actually quite a big problem. If you want to full wipe and clean flash your favorite custom rom, the "Factory Reset" option in TWRP is not available, so you are forced to wipe the whole data partition, which will cause all your personal files stored in internal storage to be removed.
If you're a flashaholic like I am, you are forced not to store anything important in the phone storage because it will be wiped every time trying to clean flash a rom.
To breakthrough this inconvenience, I created this flashable zip to accomplish something similar to the "Factory Reset" option in TWRP.
Requirement: You have to use the systemless root of SuperSU to use this mod. If you want to flash the wipe script with SuperSU, flash SuperSU first, then flash the wipe script.
Important: If you have chosen "Require PIN/password/pattern to start device" in the "Secure startup" page during the initial setup, you CANNOT use this mod!
If you have to enter your PIN/password/pattern before your device booted up, this means that you have secure startup enabled. You CANNOT use this mod!
If secure startup is enabled and you flash this zip, your encryption will be messed up and you will have to format the whole data partition eventually to make your phone working again.
After flashing the mod, your data will not be wiped immediately in recovery because we cannot do so. It will wipe the data AFTER you rebooted back to system. It will reboot again after the wipe is done. If you flashed SuperSU at the same time with this mod, you will experience 2 consecutive reboot loops. This is normal behavior, don't panic.
If devs are interested in including this zip into your rom, you can use it in the same way as SuperSU:
Code:
package_extract_dir("wipe", "/tmp/wipe");
run_program("/sbin/busybox", "unzip", "/tmp/wipe/wipe.zip", "META-INF/com/google/android/*", "-d", "/tmp/wipe");
run_program("/sbin/busybox", "sh", "/tmp/wipe/META-INF/com/google/android/update-binary", "dummy", "1", "/tmp/wipe/wipe.zip");
For those who are interested in what this zip actually do, here is a brief explanation:
If secure startup is disabled, data will be decrypted as soon as the device booted up. We can only access data after it is decrypted. So our only choice is to wipe data after the device has booted up.
I created a script to wipe all data except SuperSU app, su binary image, and your internal storage.
SuperSU will automatically run scripts inside the directory /su/su.d, so after putting the script into the folder, SuperSU will the wipe script at boot time.
The problem is: su.img is also located in /data, how can we push files into the image? Fortunately, our master Chainfire has thought of this problem. The image /cache/su.img will be merged with /data/su.img during boot. So I just need to place the script into /cache/su.img, then Chainfire's script will do all the rest of the work automatically. If you're interested in the merging process, take a look at launch_daemonsu.sh in the ramdisk of a SuperSU modified boot for more details.
Click to expand...
Click to collapse
Is the systemless one the one you patched?
Sent from my LG-H830 using XDA-Developers mobile app
stonew5082 said:
Is this helpful in regards to initial routing and flashing a rom or only afterwards to flash a new one?
Click to expand...
Click to collapse
It functions the same as "Factory Reset" in TWRP, which means it will wipe all data, but your personal files stored in internal storage will remain on the device.
StickyEyez said:
Is the systemless one the one you patched?
Sent from my LG-H830 using XDA-Developers mobile app
Click to expand...
Click to collapse
Actually you can use the original version. But I suggest you to use my patched one, in case you accidentally wiped your whole data partition (this mod will not do this), you will stay encrypted, and your data signal will be fine
Hi topjohnwu
@ jollywhitefoot suggested you might be able to help to wipe userdata from download mode.
My phone will not get passed message "Your phones is encrypted" "TO DECRYPT YOUR PHONE. ENTER YOUR SCREEN LOCK PASSWORD" I had no screen lock password... i have different passwords to decrypt . Each time i put a password in it resest phone and does factory rest and then reboots straight into Bootloader again.
Phone has no recovery " Failed to boot into recovery mode" red writing on a black screen.
Phoned has OEM Relocked ....cant fastboot or unlock bootloader again
Please can you help
tailor999 said:
Hi topjohnwu
@ jollywhitefoot suggested you might be able to help to wipe userdata from download mode.
My phone will not get passed message "Your phones is encrypted" "TO DECRYPT YOUR PHONE. ENTER YOUR SCREEN LOCK PASSWORD" I had no screen lock password... i have different passwords to decrypt . Each time i put a password in it resest phone and does factory rest and then reboots straight into Bootloader again.
Phone has no recovery " Failed to boot into recovery mode" red writing on a black screen.
Phoned has OEM Relocked ....cant fastboot or unlock bootloader again
Please can you help
Click to expand...
Click to collapse
You can try to unlock your bootloader again.
If you cannot unlock it, then I regret to say that your phone might be doomed.
Never try to relock your phone if it's not in 100% stock condition and perfectly working.
topjohnwu said:
You can try to unlock your bootloader again.
If you cannot unlock it, then I regret to say that your phone might be doomed.
Never try to relock your phone if it's not in 100% stock condition and perfectly working.
Click to expand...
Click to collapse
I have tried unlocking boot loader again. The log shows oem needs to be unlocked.
When a RUU comes out, would that help recover the phone?
Sent from my ONE A2003 using XDA-Developers mobile app
tailor999 said:
Hi topjohnwu
@ jollywhitefoot suggested you might be able to help to wipe userdata from download mode.
My phone will not get passed message "Your phones is encrypted" "TO DECRYPT YOUR PHONE. ENTER YOUR SCREEN LOCK PASSWORD" I had no screen lock password... i have different passwords to decrypt . Each time i put a password in it resest phone and does factory rest and then reboots straight into Bootloader again.
Phone has no recovery " Failed to boot into recovery mode" red writing on a black screen.
Phoned has OEM Relocked ....cant fastboot or unlock bootloader again
Please can you help
Click to expand...
Click to collapse
Assuming you have a stock recovery image..
Boot to bootloader then recovery.
Long press power for a few seconds then tap volume up.
You can then factory reset in stock recovery
LeeDroid said:
Assuming you have a stock recovery image..
Boot to bootloader then recovery.
Long press power for a few seconds then tap volume up.
You can then factory reset in stock recovery
Click to expand...
Click to collapse
Oh dam it, just seen your post a bit late. Car phone warehouse has just collected my handset :silly: - im sure they'll send it back saying ive lost warranty :crying:
tailor999 said:
Oh dam it, just seen your post a bit late. Car phone warehouse has just collected my handset :silly: - im sure they'll send it back saying ive lost warranty :crying:
Click to expand...
Click to collapse
Oh dear....
topjohnwu said:
Requirement: You have to use the systemless root of SuperSU to use this mod. If you want to flash the wipe script with SuperSU, flash SuperSU first, then flash the wipe script.
Important: If you have chosen "Require PIN/password/pattern to start device" in the "Secure startup" page during the initial setup, you CANNOT use this mod!
If you have to enter your PIN/password/pattern before your device booted up, this means that you have secure startup enabled. You CANNOT use this mod!
If secure startup is enabled and you flash this zip, your encryption will be messed up and you will have to format the whole data partition eventually to make your phone working again.
Click to expand...
Click to collapse
the thing is i have selected no for secure boot but whenever i setup a fingerprint and boot then it gets enabled again even if i had disabled it...
any way around or am i missing on something.. currently on lee's rom
SacredDeviL666 said:
the thing is i have selected no for secure boot but whenever i setup a fingerprint and boot then it gets enabled again even if i had disabled it...
any way around or am i missing on something.. currently on lee's rom
Click to expand...
Click to collapse
you're talking about something different that he is. secure boot is a pin before you ever get the system loaded. you are talking about lockscreen pin/password, which, is mandatory if you use fingerprint scanner.
jollywhitefoot said:
you're talking about something different that he is. secure boot is a pin before you ever get the system loaded. you are talking about lockscreen pin/password, which, is mandatory if you use fingerprint scanner.
Click to expand...
Click to collapse
cool thank you...
I'm confused a bit. So every time I want to clean flash a rom, I can flash this script and it will wipe everything (system, data, cache etc.) except internal storage? Would dirty flashing a rom have any affect?
Ndaoud360 said:
I'm confused a bit. So every time I want to clean flash a rom, I can flash this script and it will wipe everything (system, data, cache etc.) except internal storage? Would dirty flashing a rom have any affect?
Click to expand...
Click to collapse
+1
Ndaoud360 said:
I'm confused a bit. So every time I want to clean flash a rom, I can flash this script and it will wipe everything (system, data, cache etc.) except internal storage? Would dirty flashing a rom have any affect?
Click to expand...
Click to collapse
It will only wipe data without internal storage.
You should flash this zip after you flash a rom.
It will wipe data after the device boots up.
topjohnwu said:
It will only wipe data without internal storage.
You should flash this zip after you flash a rom.
It will wipe data after the device boots up.
Click to expand...
Click to collapse
Ok so the process would be wipe system, cache, flash rom, flash data wipe script?
Ndaoud360 said:
Ok so the process would be wipe system, cache, flash rom, flash data wipe script?
Click to expand...
Click to collapse
Why would you wipe system this will be done by the rom installation, just flash the rom then flash the script & job done
LeeDroid said:
Why would you wipe system this will be done by the rom installation, just flash the rom then flash the script & job done
Click to expand...
Click to collapse
huh? Ever since I began rooting phones, I would wipe system, data and cache before a clean flash of a rom. I guess I never knew the rom does it for you. I thought the rom just over wrote the system possibly leaving remnants of the old system which could lead to issues which is why devs advise to full wipe when switching roms.
Ndaoud360 said:
huh? Ever since I began rooting phones, I would wipe system, data and cache before a clean flash of a rom. I guess I never knew the rom does it for you. I thought the rom just over wrote the system possibly leaving remnants of the old system which could lead to issues which is why devs advise to full wipe when switching roms.
Click to expand...
Click to collapse
Ah, a full wipe is only applicable to data buddy, if a rom dev doesn't wipe system before their installation, they need a good slap with a frozen kipper.
Cache is entirely optional