I've been thinking about bricks recently.
The common brick is caused by a failure to boot the recovery system in conjunction with having the command field of the MISC partition set to "boot-recovery".
When the command field is set to boot-recovery, the SPL will ***IGNORE*** the boot-time signals for altering the boot mode, such as the BACK or CAMERA buttons to go into FASTBOOT.
When a recovery fails to boot, it will NOT clear the command field as a successful boot will, hence it will always try to boot into the broken recovery, and nothing you do will break it out.... bricked.
In general, it is my belief that having the recovery fail to boot ***FOR ANY REASON*** will have the same effect.
Yes, a REALLY broken recovery will convince the SPL to skip straight to fastboot. Unfortunately, a PARTLY working recovery will NOT, i.e. it just needs to be good enough that the SPL can recognize a recovery image.
There are many reasons why a recovery partition can fail to boot!
A recent observation by FIRERAT is that the CM5.0.8 kernel WILL NOT successfully boot a phone with 0.95.3000 *when flashed*. It *will* boot it using "fastboot boot"... which adds to the danger since the typical testing procedure IS to "fastboot boot". The second observation is that it works perfectly with 1.33.2003, which actually uses the SAME PARTITION TABLE as 0.95.3000.
So if someone builds a recovery using the CM5.0.8 kernel, you could have a brick factory.
The process that would brick a phone is this:
From the SYSTEM, flash the recovery image, then "reboot recovery". You are now bricked. And this, of course, is a very common process.
This is my WARNING about building custom recovery images:
1) Testing the image using "fastboot boot" is ***NOT ADEQUATE***. It MUST be tested by being FLASHED.
2) You can safely test it by NOT doing ANYTHING that will set the command field to "boot-recovery".... i.e. flash the image, and do a NORMAL reboot holding the HOME button.
3) Recovery image MUST be EXTENSIVELY TESTED... 0.95.x000, 1.33.2003, 1.33.2005. I suggest that YOU THE USER test your recovery image when you install it!
Further thought: It is seeming more and more that the simple presence of a recovery image is the cause of bricks. Since a BLANK recovery image will convince the SPL to jump into fastboot, I suggest that it might just be a really good idea to keep your recovery blank. As long as you have FASTBOOT, you can always "fastboot boot recovery.img" with no chance of bricking.
So... in rooting, the first step is to install SOME SPL with fastboot... i.e. 1.33.2003 or 0.95.3000. The second step for added security is to wipe out your recovery partition.
Note: This is by no means to be taken as a negative with respect to the CM image or kernel. There is nothing particularly wrong with it or dangerous about it since it was never *INTENDED* that that kernel be used for a recovery. Breaking your boot partition is never a problem since you have fastboot waiting to save the day.
Is it possible to build an spl that always allows access to fastboot?
jtroye32 said:
Is it possible to build an spl that always allows access to fastboot?
Click to expand...
Click to collapse
Possible? Certainly.
The problem is in convincing EVERYONE to actually INSTALL it.
Keep in mind that there are a LOT of people who still use the 0.95.0000 SPL (stock dream no fastboot), despite all the information everywhere saying that they should have *SOME* kind of engineering SPL.
The RECOVERY is a much easier place to play, for several reasons;
1) flashing the recovery feels "safer".
2) everybody's doing it
3) SOURCE CODE!!! (rather than decompile/reverse engineer/hack).
If the recovery was made to be SAFE (which includes being GONE), then a severe oversight in the SPL design loses its teeth.
You could always get devs to recommend a hacked SPL with that functionality. I mean, there's so many people with Danger now, when it used to be only people playing with ports.
Tony_SpaZ said:
You could always get devs to recommend a hacked SPL with that functionality. I mean, there's so many people with Danger now, when it used to be only people playing with ports.
Click to expand...
Click to collapse
You can recommend whatever you want. There is NOTHING you can do to make people use it.
Recovery on the other hand... well that's fairly easy.... you can enforce a custom recovery with a custom update-script much more completely than you can enforce a particular SPL.... and people are MUCH more comfortable with flashing a custom recovery than a custom SPL since they figure that the SPL is still there to protect them! For that matter, there are VERY FEW recoveries that would need to be modified in order to cover EVERYBODY -- most importantly, amon-ra and clockwork. The old recoveries (jf, cm) don't matter much since nobody is pushing them.... even CM recommends amon-ra and clockwork over his recovery.
And then to force everybody to use a single SPL? Well *right now* there are TONS of SPLs in use! You want to shut the door on all of them?
Fact is simple. I am NOT suggesting that you don't go hack up a custom "safe" SPL. In fact I ENCOURAGE it. I don't think you CAN though -- otherwise you wouldn't be asking for it. Find somebody who CAN -- hint: not too many around, ezterry is one of those few, he even mentioned that he WANTED to, but it is FAR from trivial.
Hint 2: 1.33.2003 is probably your best starting point... it seems to have the greatest universal compatibility of ALL the available SPLs.... it boots kernels incompatible with 0.95 and its compatible with radios incompatible with 1.33.2005.
But this does NOT eliminate the need for a safe RECOVERY, because FACE IT -- the RECOVERY is where the bricking ACTUALLY OCCURS.
Ok, this caught my attention.
I like your idea of working without recovery. Rom updates could force either the install of a "safe" recovery (I assume that that's why AOSP and official builds include recovery images and force-flash them), or just format the recovery partition entirely without writing anything back.
It would also force people to use an engineering SPL since any work that you might have to do through recovery would have to be done through fastboot boot recovery.
I see one problem, though. Say you're a person who has 0.95 SPL, you pick up a rom that force-removes recovery, and you finish flashing the rom. Now you're sans recovery and with an SPL that can't fastboot boot. Your only option at this point is to flash recovery through system, and that has a chance (if the "dev" who packed the forced recovery is an idiot) of bricking your phone.
A better choice would be to force-flash an SPL that's safe to use (1.33+), but I don't know if that can be done from an OTA package.
Let's face it. If a person bricks a phone, it's usually because they're dumb, so we can't realistically expect a person to learn to use fastboot boot recovery any time they have to flash a new rom.
I believe the force-flash SPL is a better option.
whenever I switch from 0.95.xxxx to 1.33.xxxx I
fastboot erase system -w
fastboot erase recovery
fastboot boot recovery.img
flash spl-1.33.xxxx.zip
fastboot boot recovery.img
seems the safest way
good to know! thanks for the warning i really love how much you guys care about the community and this kind of.... obsolete? phone
jubeh said:
Ok, this caught my attention.
I like your idea of working without recovery. Rom updates could force either the install of a "safe" recovery (I assume that that's why AOSP and official builds include recovery images and force-flash them), or just format the recovery partition entirely without writing anything back.
It would also force people to use an engineering SPL since any work that you might have to do through recovery would have to be done through fastboot boot recovery.
I see one problem, though. Say you're a person who has 0.95 SPL, you pick up a rom that force-removes recovery, and you finish flashing the rom. Now you're sans recovery and with an SPL that can't fastboot boot. Your only option at this point is to flash recovery through system, and that has a chance (if the "dev" who packed the forced recovery is an idiot) of bricking your phone.
A better choice would be to force-flash an SPL that's safe to use (1.33+), but I don't know if that can be done from an OTA package.
Let's face it. If a person bricks a phone, it's usually because they're dumb, so we can't realistically expect a person to learn to use fastboot boot recovery any time they have to flash a new rom.
I believe the force-flash SPL is a better option.
Click to expand...
Click to collapse
I wouldn't want to FORCE erase the recovery when installing a system image... that would be silly since the recovery failure is related to the radio and spl and NOT the system image.
You are also missing one option for a 0.95.0000 SPL (note that 0.95.3000 is also a 0.95 SPL, but has fastboot, so blank recovery OK there) is NBH files.
Best way to erase a recovery is through fastboot. This has the added benefit of ensuring that you HAVE fastboot.
the_fish said:
good to know! thanks for the warning i really love how much you guys care about the community and this kind of.... obsolete? phone
Click to expand...
Click to collapse
Obsolete? Nope. Not even close. The defining characteristic of obsolete is that it is not able to perform the required function. This hardware still works great and 2.2 is supposed to be even better on it.
Firerat said:
whenever I switch from 0.95.xxxx to 1.33.xxxx I
fastboot erase system -w
fastboot erase recovery
fastboot boot recovery.img
flash spl-1.33.xxxx.zip
fastboot boot recovery.img
seems the safest way
Click to expand...
Click to collapse
That appears to be quite safe
It should even withstand a radio/spl mismatch (1.x radio + 1.33.2005 SPL or 3.x radio + SPL < 1.33.2005)
been thinking, I'm not sure it is quite as dangerous
Clockwork ROM Manager reboots to recovery
and we know that we don't get bricks when it fails to flash recovery via cm5.0.7test5+ based ROM
does that set the boot flag in the same way?
Firerat said:
been thinking, I'm not sure it is quite as dangerous
Clockwork ROM Manager reboots to recovery
and we know that we don't get bricks when it fails to flash recovery via cm5.0.7test5+ based ROM
does that set the boot flag in the same way?
Click to expand...
Click to collapse
When it fails to flash recovery, it must be leaving it in the OLD state, or in a so-dead-the-SPL-can-see-it state.
what about suggesting that you should *never* use the reboot recovery command from shell? its easier than suggesting a new spl, and its a guarantee against stupidly bricking your phone.
$.02, and im gone.
relevent81 said:
what about suggesting that you should *never* use the reboot recovery command from shell? its easier than suggesting a new spl, and its a guarantee against stupidly bricking your phone.
$.02, and im gone.
Click to expand...
Click to collapse
Because reboot-recovery can also be set from update-radio and update-hboot. This is where the REAL danger comes in -- if it didn't do that, then there wouldn't be nearly as many deathspl bricks -- it would look nice and bricked, but still respond perfectly to back/camera, which would bring up fastboot and offer the cure -- especially since 1.33.2005 is actually a strong SPL that can fastboot flash both radio and SPL.
Firerat said:
been thinking, I'm not sure it is quite as dangerous
Clockwork ROM Manager reboots to recovery
and we know that we don't get bricks when it fails to flash recovery via cm5.0.7test5+ based ROM
does that set the boot flag in the same way?
Click to expand...
Click to collapse
My thoughts exactly. I had Clockwork running fine installed from a test4 rom. I wiped and upgraded to a 5.0.8 rom (via clockwork), and then on the new install Clockwork forced me to re-install the recovery again in order to use it. I did that and rebooted in to it and almost had a heart attack when it was stuck on G1. After a battery pull it started up fine again. I flashed clockwork yet again through the app, rebooted, and all is normal again. Whew.
Now this thread is saying that the first time clockwork flashed its recovery it messed it up so bad even the header that tells SPL it is a recovery was broken, but it it had that header correct I would have been bricked? ...and sorry for OT, but why did the recovery flash fine the second time through ROM manager? How are you supposed to flash a recovery in a 5.0.8cm branch?
rpmccormick said:
My thoughts exactly. I had Clockwork running fine installed from a test4 rom. I wiped and upgraded to a 5.0.8 rom (via clockwork), and then on the new install Clockwork forced me to re-install the recovery again in order to use it. I did that and rebooted in to it and almost had a heart attack when it was stuck on G1. After a battery pull it started up fine again. I flashed clockwork yet again through the app, rebooted, and all is normal again. Whew.
Now this thread is saying that the first time clockwork flashed its recovery it messed it up so bad even the header that tells SPL it is a recovery was broken, but it it had that header correct I would have been bricked? ...and sorry for OT, but why did the recovery flash fine the second time through ROM manager? How are you supposed to flash a recovery in a 5.0.8cm branch?
Click to expand...
Click to collapse
flash recovery via fastboot or recovery
@Firerat
not sure it belongs to this thread but am trying to use MTD 70 2 on LeFeuDeDieu v2.5.1 which uses CM 5.0.8 and I haven't been able to make it boot (on previous version 2.4) I am about to try v2.5.1, any help will be appreciated as always
juangil said:
@Firerat
not sure it belongs to this thread but am trying to use MTD 70 2 on LeFeuDeDieu v2.5.1 which uses CM 5.0.8 and I haven't been able to make it boot (on previous version 2.4) I am about to try v2.5.1, any help will be appreciated as always
Click to expand...
Click to collapse
For me i must do this if I want it to boot! I have clockwork now, not amon_ra
-Goto rec, Flash 1-1 recovery of MTD.zip thing
-wipe everything(exc batt stats)
-reboot recovery
-flash rom, then any xtras
-flash the boot MTD file.zip(version 1)
My Partition is, 3-cache, 90-sys, rest-data
Ace42 said:
For me i must do this if I want it to boot! I have clockwork now, not amon_ra
-Goto rec, Flash 1-1 recovery of MTD.zip thing
-wipe everything(exc batt stats)
-reboot recovery
-flash rom, then any xtras
-flash the boot MTD file.zip(version 1)
My Partition is, 3-cache, 90-sys, rest-data
Click to expand...
Click to collapse
thanks, I'll try that
1 more Question (I know am on the wrong thread sorry)
how about no wipe updates? will that affect the new partition or should I flash the boot MTD again?
thx
Related
Hi,
I understand what the SPL is and what the difference of the SPLs available are.
But I don't understand what the recovery image is and what it is for.
What is happening by flashing the recovery image? What is the difference between the original and the modded recovery image?
Thanks,
Michael
The recovery image is Android platform's primary method of updating the system software. If you were to update OTA, it would reboot into recovery to perform its task. The bootloader (SPL) also happens to be another way to flash system software, but it is not officially supported or endorsed. Furthermore, the recovery is device-agnostic, but the SPL is device-specific.
Stock recovery image will only allow the flashing of officially signed update files. Modified recovery image flashes updates signed with the publicly available test keys. In addition, modified recovery partition may have additional features not present in the stock version, such as the ability to perform a nand dump.
OK. Thanks for the reply!
So if I mess up my Android OS but the SPL and the recovery image is still working it's not bricked.
And if I mess up my recovery image and the SPL and Android OS with root shell is still working I can re flash it.
So if I mess up my SPL OR the recovery image and the Android OS at the same time I broick my phone.
Am I right with this?
fuchsmi said:
Am I right with this?
Click to expand...
Click to collapse
If you've made your Dream non-bootable but you can still get into Recovery, you can rescue it. If you've destroyed the recovery but you can boot, you can rescue it. If you destroyed the recovery and it's not booting but your bootloader works, you can rescue it. If you destroyed the bootloader then it's completely toast.
Lessons learned: don't start messing around with system files unless you know what you're doing! Follow in the path that others have already safely taken to avoid trouble.
jashsu said:
If you destroyed the recovery and it's not booting, but your bootloader works, you can rescue it.
Click to expand...
Click to collapse
Is this true for all SPLs (G1Orig, Engineering & HardSPL) or only for HardSPL?
Michael
It's true for all SPLs, but the ease of restoration depends on which SPL is installed. For example the G1 Original SPL would only let you apply a signed NBH file, whereas Engineering & HardSPL would allow you to flash back a nand dump.
This may have been posted before but this just SERIOUSLY saved my ass this morning.
Only use this method if you phone will not:
Boot into your:
Recovery
ROM
Anything else besides HBOOT (hold vol. down and turn on phone)
Get an RUU from somewhere and pull the rom.zip file
Rename it to HERCIMG.zip
Put on ROOT of sdcard
Reboot to hboot as per instructions above
If you renamed it right it will say:
SD Checking...
Loading.....[HERCDiag.zip]
No image!
etc.etc.etc
then
Loading...[HERCIMG.zip]
You will see a progress bar on the upper right of the screen.
It will ask you if you want to upgrade. Press Action (trackball btn) for yes.
***YOU WILL LOSE EVERYTHING! Root/files/etc. just like if you flashed it with the RUU setup file***
After it finishes you now have a working hero again
Very helpful post. Saved me once.
Also, a tad off topic, but if you are S-OFF, you can flash the recovery only (clockworkmod tested). This might save some time vs a total reflash.
google clockwork recovery, find the 2.5.0.1 img file for the heroc. Get an android-info.txt from an exisiting HERCIMG.zip (either find one on xda in this forum, or follow OP instructions and get it from ROM.zip) and zip it along with the clockwork recovery .img file. Rename it to HERCIMG.zip and flash from hboot.
You can also create custom RUU with a clockwork recovery by replacing the stock recovery img in an HERCIMG.zip with the clockwork recovery .img, and then flashing. You will get sprint stock but with clockwork recovery instead of the stock recovery.
Just a few tips I've learned. Remember mine requires S-OFF, which is opposite of what the OP is working with.
Well this is very helpful.
BUT! Here is the issue I am now having...
My phone wont boot into android... OR recovery (stock).
I know the recovery is stock since I just flashed the RUU from the carrier.. So I am thinking maybe a corrupt partition?
Major worry I am having is I did flash the engineering spl however it is still in s-on mode (dunno why) so I cant even boot into a custom recovery to flash back the old spl. Is it possible to flash the spl with the method you mentioned? If so I will do that and then if it still doesn't boot (I know it wont btw) I will take it in store.
hexskrew said:
Well this is very helpful.
BUT! Here is the issue I am now having...
My phone wont boot into android... OR recovery (stock).
I know the recovery is stock since I just flashed the RUU from the carrier.. So I am thinking maybe a corrupt partition?
Major worry I am having is I did flash the engineering spl however it is still in s-on mode (dunno why) so I cant even boot into a custom recovery to flash back the old spl. Is it possible to flash the spl with the method you mentioned? If so I will do that and then if it still doesn't boot (I know it wont btw) I will take it in store.
Click to expand...
Click to collapse
I tried the eng-spl also to get fastboot working but that didn't seem to work either. Not sure why. I used the other S-OFF method flashed via clockwork.
This wouldn't be an issue if we could use fastboot on our phones (I always get access denied). I think the eng-spl was supposed to enable the use of fastboot.
If you think the eng-spl worked, try using fastboot to wipe your partitions. I think there was talk about this in the firerat mod thread. I don't recall the exact commands, but it's run like adb is from the command line. I think fastboot system -w erase but I could be wrong... probably best to check the firerat mod thread.
btw about your question, I am not sure if you can flash anything else via hboot other than what I tried. At least I think this is what you were asking.
Porkrinds said:
I tried the eng-spl also to get fastboot working but that didn't seem to work either. Not sure why. I used the other S-OFF method flashed via clockwork.
This wouldn't be an issue if we could use fastboot on our phones (I always get access denied). I think the eng-spl was supposed to enable the use of fastboot.
If you think the eng-spl worked, try using fastboot to wipe your partitions. I think there was talk about this in the firerat mod thread. I don't recall the exact commands, but it's run like adb is from the command line. I think fastboot system -w erase but I could be wrong... probably best to check the firerat mod thread.
btw about your question, I am not sure if you can flash anything else via hboot other than what I tried. At least I think this is what you were asking.
Click to expand...
Click to collapse
What I was wondering is if I could flash either an original HBOOT, or to put it back to S-On by the method you described.
OR....
Does the original hboot have the option for fastboot? If so then I will just bring the phone in for service
hexskrew said:
What I was wondering is if I could flash either an original HBOOT, or to put it back to S-On by the method you described.
OR....
Does the original hboot have the option for fastboot? If so then I will just bring the phone in for service
Click to expand...
Click to collapse
Well, if you are S-ON right now, you can't flash anything that isn't signed with HTC's private key I believe.
You should be able to get to fastboot via hboot menu... just boot into hboot (power off, vol dwn + power on) and see if there is an option to get to fastboot (I think it's home key? I forget). Thing is... we can't do anything using fastboot (as end users) because it's turned off. The eng-spl was/is supposed to turn that on as well as S-OFF if I understand correctly.
Since you tried the eng-spl, have you tried hooking up to USB, booting into HBOOT and then jumping to fastboot and seeing if you can do any fastboot commands?
Sadly, the only two ways I know to flash something is either via a recovery like clockwork, or via S-OFF via HBOOT. Fastboot is possible, but like I said before it seems to have been turned off..
fastboot works after you flash the eng-spl. you'll have to look for the commands to use it though. ive used it once after flashing the eng-spl just to verify it worked.
Well, I did flash the ENG-SPL like I said and I did try to use fastboot from HBOOT, however nothing ever worked except for the fact that I could see that fastboot detected it when using "fastboot devices".. fastboot reboot wouldn't even work though. It would say that it worked but it actually did not.
No biggie though, as like I said I flashed the RUU to wipe it. It still wouldnt boot but that's ok cause I got a replacement today
Awesome post, thanks. I'm tagging this should the unfortunate event happen.
hunterd13 said:
fastboot works after you flash the eng-spl. you'll have to look for the commands to use it though. ive used it once after flashing the eng-spl just to verify it worked.
Click to expand...
Click to collapse
Good info thanks. I think I might have been S-OFF via unrevoked already so maybe that is why the eng-spl didn't work for me (as far as being able to use fastboot, I still got access denied errors).
OP: glad you got it fixed the easy way
I'm having trouble getting back to a regular non locked down firmware. I flashed whispercore without fully understanding that it was actually in fact changing my entire rom.
I didnt even think to try and install CWM first to create a recovery image I need help getting out of this mess. I've used the Whispercore installer to unlock fastboot because whispercore relocks your fastboot after it does its thing.
Seems as though the stock sdk tools hated me for a while there and wouldnt detect my device than I later realised it was just because the sdk downloads itself all fragmented it basically took fastboot and adb and separated the two even though fastboot requires adb to function properly. I wont even begin to speculate as to why that happened, as thats beyond the scope of my question.
I basically have gotten to the point where i have Clock work mod (CWM) installed on my droid and the fastboot oem unlocked but am currently stuck at trying to get Cyanogenmod 7 stable on here.
***UPDATE**
Ok. This situation has been resolved. If you are having trouble with leaving whisper core and you've flashed a bunch of stuff trying desperately trying to fix this issue. Recognize the nexus S is a very easy device to fix. Fastboot is your saviour and the WhisperCore installer will even be kind enough to install all the drivers required to OEM unlock fastboot and do it for you.
Anyways the solution was: Re run the whispercore installer. Let it do its automagic.
Than flash a new Clockwork Mod recovery image this thread provided some clean Clockwork Mod images for flashing with fastboot that link is also for rooting but provides a good example for how to flash a new recovery.
Than Just reboot into recovery and use it to mount your phone via the Clockwork Mod recovery console to your computer, upload your favorite flavor of rom and than unmount the device. Once unmounted go back to the main menu in Clockwork mod and "Flash zip from SD" look for your rom in my case it was update-cm-7.0.3-NS-signed.zip Latest stable at the time. let it do its job.
Basically my issue was a combination of several factors. A bad Clockwork mod and a semi corrupt installation of SDK tools and Whispercore.
Possibly a stock firmware might be required first I just know that trying to straight flash cm7 stable from cwm is not working out.
you can get adb and the 2 dll files and fastboot in the same folder and cd to that directory. fastboot oem unlock should unlock your bootloader. then you should be able to flash a recovery if you want. might also want to check out the 1 click stock thread to see if that works.
I will probably have trouble finding this thread but I will look and if i come up with anything I will certainly post my findings.
This should work. But we shall see I will update the original post if I find a full solution.
Just flash a stock full rom (for i9023 you can use the one in my signature, don't forget get to use the wipe options in cwm recovery before) and the root should be gone. Afterwards, boot into bootloader and use fastboot command "fastboot oem lock" to lock the bootloader again. Than you can do a factory reset (and delete usb storage) to fully restore stock "experience".
__________________
Nexus S running Official 2.3.4 ROM (for i9023) with XTEUV92 Trinity kernel
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=1214705&highlight=one+click+stock
I'm getting an error in the zip files no matter what one I use and its "Status 7" whatever that means.
chamunks said:
***UPDATE**
Ok. This situation has been resolved. If you are having trouble with leaving whisper core and you've flashed a bunch of stuff trying desperately trying to fix this issue. Recognize the nexus S is a very easy device to fix. Fastboot is your saviour and the WhisperCore installer will even be kind enough to install all the drivers required to OEM unlock fastboot and do it for you.
Anyways the solution was: Re run the whispercore installer. Let it do its automagic.
Than flash a new Clockwork Mod recovery image this thread provided some clean Clockwork Mod images for flashing with fastboot that link is also for rooting but provides a good example for how to flash a new recovery.
Than Just reboot into recovery and use it to mount your phone via the Clockwork Mod recovery console to your computer, upload your favorite flavor of rom and than unmount the device. Once unmounted go back to the main menu in Clockwork mod and "Flash zip from SD" look for your rom in my case it was update-cm-7.0.3-NS-signed.zip Latest stable at the time. let it do its job.
Basically my issue was a combination of several factors. A bad Clockwork mod and a semi corrupt installation of SDK tools and Whispercore.
Click to expand...
Click to collapse
I am trying to follow what you did and i am completely lost... I have a nexus s g that i am trying to get whispercore off it!
The "Automagic" you talk about. Isnt that just whispercore putting it in fast boot??? If so then then how do you use the recover image?
HTCDreamOn said:
A word of advice: I strongly recommend temporarily booting any images (be it recoveries or kernels) you are about to flash to your device. This is simply a case of using the command "fastboot boot blahblah.img" whether blahblah.img is a recovery or kernel.
Click to expand...
Click to collapse
We know you can boot to TWRP vice flash to your device by using the command:
Code:
fastboot boot twrp.img
But how do you proceed from here? Are you required to use ADB commands at this point or can you unplug your USB cable and use TWRP as if it was installed, I.E. , back up current ROM, and install new zip.
purplepizza said:
We know you can boot to TWRP vice flash to your device by using the command:
Code:
fastboot boot twrp.img
But how do you proceed from here? Are you required to use ADB commands at this point or can you unplug your USB cable and use TWRP as if it was installed, I.E. , back up current ROM, and install new zip.
Click to expand...
Click to collapse
Sorry if I wasn't clear. Yes you can unplug usb and use as normal, it just means twrp isn't flashed to the device so it won't be there when you reboot.
I just recommend this step because I'm paranoid. Once you've confirmed the image works you should reboot to bootloader and fastboot flash the image, then you'll be able to boot into twrp whenever you want.
HTCDreamOn said:
Sorry if I wasn't clear. Yes you can unplug usb and use as normal, it just means twrp isn't flashed to the device so it won't be there when you reboot.
I just recommend this step because I'm paranoid. Once you've confirmed the image works you should reboot to bootloader and fastboot flash the image, then you'll be able to boot into twrp whenever you want.
Click to expand...
Click to collapse
This is a good step to do, and if the device supports it it should be used... for example the Moto G (if unlocked) fully supports fastboot boot commands, devices like the HTC One M7 do NOT support this anymore...
To the OP, what is really happening here is that TWRP or the boot.img (kernel) is being loaded from USB into RAM and executed normally, instead of the standard /boot partition which is skipped when executing fastboot boot. TWRP (and recovery in general) is really just a specialized micro-sized android distribution and when started via fastboot boot is executed as if it was the boot image. Once the image is transferred into RAM, the boot continues normally per the instructions of TWRP or the boot image, and no further action via USB is required. USB is just the medium to load the image into RAM and nothing more.
fastboot boot - used to manually load a boot image (or recovery) and execute from RAM, it is not flashed to the device, on the next reboot it will return to it's previous state
fastboot flash boot/recovery - used to actually flash the boot image or recovery image to the it's appropriate partition on the device, it does not execute it. On a reboot or factory default this information will stay in the device.
acejavelin said:
This is a good step to do, and if the device supports it it should be used... for example the Moto G (if unlocked) fully supports fastboot boot commands, devices like the HTC One M7 do NOT support this anymore...
To the OP, what is really happening here is that TWRP or the boot.img (kernel) is being loaded from USB into RAM and executed normally, instead of the standard /boot partition which is skipped when executing fastboot boot. TWRP (and recovery in general) is really just a specialized micro-sized android distribution and when started via fastboot boot is executed as if it was the boot image. Once the image is transferred into RAM, the boot continues normally per the instructions of TWRP or the boot image, and no further action via USB is required. USB is just the medium to load the image into RAM and nothing more.
fastboot boot - used to manually load a boot image (or recovery) and execute from RAM, it is not flashed to the device, on the next reboot it will return to it's previous state
fastboot flash boot/recovery - used to actually flash the boot image or recovery image to the it's appropriate partition on the device, it does not execute it. On a reboot or factory default this information will stay in the device.
Click to expand...
Click to collapse
Thanks. So it seems there is no reason to ever flash TWRP unless you don't want the PC dependence to use the TWRP tool.
purplepizza said:
Thanks. So it seems there is no reason to ever flash TWRP unless you don't want the PC dependence to use the TWRP tool.
Click to expand...
Click to collapse
Well, sort of... but the point is once you flash anything via twrp, you are no longer stock, so why not flash twrp to make it easier to flash other things?
The smartest thing would be to unlock, boot TWRP, make a nandroid backup before you do anything at all, then flash TWRP and do your thing...
acejavelin said:
Well, sort of... but the point is once you flash anything via twrp, you are no longer stock, so why not flash twrp to make it easier to flash other things?
The smartest thing would be to unlock, boot TWRP, make a nandroid backup before you do anything at all, then flash TWRP and do your thing...
Click to expand...
Click to collapse
I understand what you are saying. The only flash I planned on was SuperSU. I thought when a system upgrade is available, I could simply use SU to unroot and be ready for the update. Would this work?
If I followed your recommendation, could I feasibly, flash TWRP, then when an upgrade is ready, flash nandroid backup (which I assume removes TWRP) then accept system update, then re-flash TWRP. I could restore apps by using TB. Does this make sense? Or does TWRP remain in place after flashing nandroid backup?
purplepizza said:
I understand what you are saying. The only flash I planned on was SuperSU. I thought when a system upgrade is available, I could simply use SU to unroot and be ready for the update. Would this work?
If I followed your recommendation, could I feasibly, flash TWRP, then when an upgrade is ready, flash nandroid backup (which I assume removes TWRP) then accept system update, then re-flash TWRP. I could restore apps by using TB. Does this make sense? Or does TWRP remain in place after flashing nandroid backup?
Click to expand...
Click to collapse
TWRP remains in place after restoring a nandroid (I think, I haven't installed on my Moto G, but in most devices it doesn't backup/restore recovery), but you can easily restore the original recovery via fastboot.
acejavelin said:
TWRP remains in place after restoring a nandroid (I think, I haven't installed on my Moto G, but in most devices it doesn't backup/restore recovery), but you can easily restore the original recovery via fastboot.
Click to expand...
Click to collapse
Just curious, how did you go from 5.1.1 to 6.0?
purplepizza said:
Just curious, how did you go from 5.1.1 to 6.0?
Click to expand...
Click to collapse
OTA... part of soak test on December 22.
acejavelin said:
OTA... part of soak test on December 22.
Click to expand...
Click to collapse
Hey thanks for helping to answer this, your explanation was much better I thought it had something to do with loading into RAM but wasn't sure. I didn't know some devices don't allow fastboot boot commands though, I've always relied on them. Part of the reason I'm avoiding htc now.
@purplepizza I agree with everything acejavelin has said: essentially you really do want to make sure your have twrp flashed.
To answer your nandroid question: It basically just takes an image of the partitions you choose, usually /system, /data, and /boot (where kernel stuff is) which is the least you need to boot back with all your data. It doesn't backup recovery and when you restore it doesn't write anything to recovery, so yes twrp will still be in place. In general you should only ever flash stuff to the recovery partition whilst in fastboot mode (i.e. using fastboot flash recovery recovery.img), I know on some devices you can flash recoveries as zip files in the recovery itself but you shouldn't.
I've seen quite a few people querying about the 6.0 OTA: in short, I wouldn't worry about it because once they start rolling out, people always catch the OTA and post here on xda. You can flash that and it'll return you to stock 6.0 anyway, at which point you can reroot and everything if you want.
acejavelin said:
Well, sort of... but the point is once you flash anything via twrp, you are no longer stock, so why not flash twrp to make it easier to flash other things?
The smartest thing would be to unlock, boot TWRP, make a nandroid backup before you do anything at all, then flash TWRP and do your thing...
Click to expand...
Click to collapse
One more question, when making the first nandroid backup. do you just back up system and data or do you include boot as well?
purplepizza said:
One more question, when making the first nandroid backup. do you just back up system and data or do you include boot as well?
Click to expand...
Click to collapse
My opinion is always backup everything, you can always choose what to restore
Sent from my MotoG3 using Tapatalk
acejavelin said:
My opinion is always backup everything, you can always choose what to restore
Sent from my MotoG3 using Tapatalk
Click to expand...
Click to collapse
So what is boot? I know I am kind of going back to my previous question, but if I restore boot, is that the boot loader? I would assume this would not commonly need restored?
And I now assume the bootloader is completely independent from recovery.
purplepizza said:
So what is boot? I know I am kind of going back to my previous question, but if I restore boot, is that the boot loader? I would assume this would not commonly need restored?
And I now assume the bootloader is completely independent from recovery.
Click to expand...
Click to collapse
It is not the bootloader... It is the /boot partition of the phone, basically the kernel and RAM disk. If you screw things up and need to restore, you typically want to restore /boot, /system, and /data, and occasionally /cache (if you want to restore to save time and get an exact duplicate of the previous image, otherwise many people skip /cache and let it rebuild on the first boot which takes 10-15 minutes extra).
acejavelin said:
Well, sort of... but the point is once you flash anything via twrp, you are no longer stock, so why not flash twrp to make it easier to flash other things?
The smartest thing would be to unlock, boot TWRP, make a nandroid backup before you do anything at all, then flash TWRP and do your thing...
Click to expand...
Click to collapse
HTCDreamOn said:
@purplepizza I agree with everything acejavelin has said: essentially you really do want to make sure your have twrp flashed.
Click to expand...
Click to collapse
So I am following your advice. I booted to TWRP, made Nandroid backup.
Rebooted and flashed TWRP, see below:
Code:
sudo fastboot flash recovery twrp.img
target reported max download size of 268435456 bytes
sending 'recovery' (7772 KB)...
OKAY [ 10.635s]
writing 'recovery'...
OKAY [ 0.141s]
finished. total time: 10.776s
All seems OK.
Scrolled to recovery, selected recovery. TWRP was there. I then powered down.
After that I held power and volume down, system boots to dead Android with message “No command” Held power then volume up, I see stock boot loader. Is TWRP flashed somewhere or is it gone? So what did I do wrong.
purplepizza said:
So I am following your advice. I booted to TWRP, made Nandroid backup.
Rebooted and flashed TWRP, see below:
Code:
sudo fastboot flash recovery twrp.img
target reported max download size of 268435456 bytes
sending 'recovery' (7772 KB)...
OKAY [ 10.635s]
writing 'recovery'...
OKAY [ 0.141s]
finished. total time: 10.776s
All seems OK.
Scrolled to recovery, selected recovery. TWRP was there. I then powered down.
After that I held power and volume down, system boots to dead Android with message “No command” Held power then volume up, I see stock boot loader. Is TWRP flashed somewhere or is it gone? So what did I do wrong.
Click to expand...
Click to collapse
I have no idea, you did it right... selecting recovery from the bootloader should start TWRP, not stock recovery, that should be gone.
acejavelin said:
I have no idea, you did it right... selecting recovery from the bootloader should start TWRP, not stock recovery, that should be gone.
Click to expand...
Click to collapse
Any recommendations how to proceed?
I also need help with my soft bricked moto g3
Moto g3 (xt 1550, Indian dual sim 16 gb version)
I officially upgraded to 6.0.0 via ota and my objective was to root my phone and use xposed modules. I am not interested in any other custom rom (I'd rather keep stock rom just for moto display and ota upgrades) or custom recovery like twrp(I'm afraid it may cause ota upgrades to fail).
I used the method described here in the question- http://android.stackexchange.com/qu...rsu-using-play-store-versus-a-custom-recovery
So I first successfully unlocked my bootloader using the official motorola method.
I then proceeded to use google's backup settings to re-install all the apps that were uninstalled due to unlocking the bootloader. I also put supersu.zip version 2.46 on internal sd card.
I then proceeded to (without rebooting) enter fastboot where i used minimal adb to temporarily boot into twrp version2.8.7 r5 (link - http://forum.xda-developers.com/2015-moto-g/orig-development/twrp-twrp-moto-g-2015-t3170537 ).
Once in twrp, I located and flashed the supersu.zip. It flashed successfully. I procceded to clear dalvik cache and then after clearing cache I tried to reboot my phone using twrp.
However, it did not go beyond the "Warning - Bootloader Unlocked" screen that you get on unlocking a motorola bootloader. I left it for over 10 minutes (usb was still plugged in, I had >80% battery) but it did not proceed.
Long -pressing the power button causes the phone to vibrate and again attempt to boot, stuck at the same initial screen. Adb quite understandably does not work here.
I can press vol down+power and enter fastboot , where adb works fine.
I can enter stock recovery from the fastboot sceen too.
Using adb in fastboot, I am able to boot twrp . In fact, I tried to re-install supersu.zip. I retried version 2.46 and then tried version 2.56. On all occcassions, it was able to successfully flash it, but gets hung on the initial boot screen.
USB Debugging is also enabled, and I have a backp of my sd card data.
I tried taking a backup of the system and apps in twrp (3 gb in total) and tried to reflash it, but it still hangs at the same screen.
Is there any way I can unbrick my device and- (in decreasing order of preference)
1. Keep my stock rom and recovery?
2. Keep stock rom with twrp? (It should not be a problem)
3. Custom rom with custom recovery - perhaps official cm. Least preferred as I want Moto Display and stock/vanilla android.
Also, is SELinux involved anywhere with my phone getting bricked? I also read that a custom kernel is required for rooting 6.0, which I don't have. Supersu Version 2.56 is said to prevent soft bricks if the kernel is incorrect (systemless root), yet even after flashing the newer one it is still bricked. Where am I going wrong? What should I do? Thanks in advance! :good:
purplepizza said:
Any recommendations how to proceed?
Click to expand...
Click to collapse
Try the flash again? Sorry, but I don't really know help... if you are successfully rooted, perhaps try to flash TWRP image with Flashify? (select your file, don't let it auto-grab an image)
acejavelin said:
Try the flash again? Sorry, but I don't really know help... if you are successfully rooted, perhaps try to flash TWRP image with Flashify? (select your file, don't let it auto-grab an image)
Click to expand...
Click to collapse
I have not rooted yet. I guess I can try by booting TWRP then flashing SuperSU.
Can you think of any reasons not to try fastboot again the re-flash TWRP?
Own the OPP6; Rooted, on OxygenOS 5.18.
Went to install the newest TWRP (was going to install XXX no limits), when asked where to install it to, accidentally, without thinking, hit install to Boot.
Problems.
I can get into fastboot, the PC sees the phone in fastboot.
Have tried to flash a recovery image and similar, got an error saying: FAILED (remote: (recovery_b) No such partition).
Just want to get the phone booting again, wipe the whole thing start over, from fastboot.
Any help appreciated.
https://forum.xda-developers.com/oneplus-6/how-to/tool-msmdownloadtool-v4-0-international-t3798892
Thank you, the tool worked like a charm.
BTW: I did search and find other "methods" but none of them worked
noncomjd said:
Own the OPP6; Rooted, on OxygenOS 5.18.
Went to install the newest TWRP (was going to install XXX no limits), when asked where to install it to, accidentally, without thinking, hit install to Boot.
Problems.
I can get into fastboot, the PC sees the phone in fastboot.
Have tried to flash a recovery image and similar, got an error saying: FAILED (remote: (recovery_b) No such partition).
Just want to get the phone booting again, wipe the whole thing start over, from fastboot.
Any help appreciated.
Click to expand...
Click to collapse
What you should have done was fastboot boot twrp.img. which would start twrp, then you could have used the installer in to install twrp on phone. After that you would have to installed stock or custom kernel.
MrSteelX said:
What you should have done was fastboot boot twrp.img. which would start twrp, then you could have used the installer in to install twrp on phone. After that you would have to installed stock or custom kernel.
Click to expand...
Click to collapse
That is exactly what I wanted to do.
I could get into TWRP, but I couldn't see the phone on the PC and couldn't move files (ROM) to the phone (although fastboot was working and I could see the device using adb) but I couldn't figure out how to have TWRP look for or find the ROM on the PC.
There's no recovery partition on A/B phones remember.
RusherDude said:
There's no recovery partition on A/B phones remember.
Click to expand...
Click to collapse
Thanks for that. and that explains a few things and explains why when I installed TWRP, I didn't see the recovery option. Doesn't pardon my hitting install to Boot.
Just thought of another Q, if there is no recovery partition, where is the OEM recovery stored? (I figured the lack of a recovery partition is why TWRP gets overwritten if installed without a custom ROM)
I did a quick read on that, it seems really interesting and may be of some use as soon as I learn more.
I've got so much to learn about this. I keep meaning to take time to begin, but stuff comes up and boom more changes.
I've got to do more reading to take advantage of that.
@MrSteelX mentioned that I could have used TWRP to install a ROM from the PC.
Is this what is referred to as "sideloading". I've been looking for some info on this and haven't really come across much that is any good.
Are there any available guides that anyone can point to so I can learn about using TWRP that way?
noncomjd said:
Thanks for that. and that explains a few things and explains why when I installed TWRP, I didn't see the recovery option. Doesn't pardon my hitting install to Boot.
Just thought of another Q, if there is no recovery partition, where is the OEM recovery stored? (I figured the lack of a recovery partition is why TWRP gets overwritten if installed without a custom ROM)
I did a quick read on that, it seems really interesting and may be of some use as soon as I learn more.
I've got so much to learn about this. I keep meaning to take time to begin, but stuff comes up and boom more changes.
I've got to do more reading to take advantage of that.
@MrSteelX mentioned that I could have used TWRP to install a ROM from the PC.
Is this what is referred to as "sideloading". I've been looking for some info on this and haven't really come across much that is any good.
Are there any available guides that anyone can point to so I can learn about using TWRP that way?
Click to expand...
Click to collapse
In twrp, you go to advance/sideload. Twrp then waits for adb sideload to push file to phone then auto flashes file.
In your case, you would sideload rom to flash and have been go to go.
noncomjd said:
Own the OPP6; Rooted, on OxygenOS 5.18.
Went to install the newest TWRP (was going to install XXX no limits), when asked where to install it to, accidentally, without thinking, hit install to Boot.
Problems.
I can get into fastboot, the PC sees the phone in fastboot.
Have tried to flash a recovery image and similar, got an error saying: FAILED (remote: (recovery_b) No such partition).
Just want to get the phone booting again, wipe the whole thing start over, from fastboot.
Any help appreciated.
Click to expand...
Click to collapse
If you have working fastboot mode and getting detected via fastboot then
fastboot flashable stock rom via fastboot mode.
U don't have to do anything just downloaded zip file unzip it any folder u want. Connect u r phone to. Computer in fastboot mode
Then go to that folder and just click flash all bat waut for 10to 15 min and then phone boots in working oos.
(all data will be get wipes after this)
Link
https://www.google.co.in/amp/s/foru...m-stock-fastboot-roms-oneplus-6-t3796665/amp/
MrSteelX said:
In twrp, you go to advance/sideload. Twrp then waits for adb sideload to push file to phone then auto flashes file.
In your case, you would sideload rom to flash and have been go to go.
Click to expand...
Click to collapse
Thanks.
I will give this a try. After I learn a little more about the A/B partitions & recovery on this phone, I want to try one on the custom ROMs.
pankspoo said:
If you have working fastboot mode and getting detected via fastboot then
fastboot flashable stock rom via fastboot mode.
U don't have to do anything just downloaded zip file unzip it any folder u want. Connect u r phone to. Computer in fastboot mode
Then go to that folder and just click flash all bat waut for 10to 15 min and then phone boots in working oos.
(all data will be get wipes after this)
Link
https://www.google.co.in/amp/s/foru...m-stock-fastboot-roms-oneplus-6-t3796665/amp/
Click to expand...
Click to collapse
Thanks for the link/guide. I had been trying an iteration of this (and the guide) but after reading your link, it too explains some things. I was trying to restore a Stock ROM from fastboot according to your link:
Things are changing with the advent of project treble. OnePlus will no longer release ROMs flashable via recovery (either stock or twrp) because is no more needed. The updates will be done on the slot not used for example if you are using slot a the update will be installed on slot b and the slot b will be set as default. If you brick and you are in bootloop how you can restore the rom? You can't with Stock ROM you have, because the zip can be only installed via Update Engine, so what can you do? Flash a stock rom via fastboot. I have extracted all images from the stock zip and i have made a new zip with the Fastboot ROM with a flash-all.bat included. This will work only if your bootloader is unlcoked. This will erase all your data and will wipe
I download and was trying to use the stock ROMs, I didn't see any bats, and now I know why.
Lots more reading to do. I love doing playing with this stuff, but trying to learn & keep up with things burns time, which most days I don't have.
This is the longest I've ever been on a stock OS (6 weeks? got the phone right after its release) although it's rooted (can never leave things completely alone).
noncomjd said:
Thanks for the link/guide. I had been trying an iteration of this (and the guide) but after reading your link, it too explains some things. I was trying to restore a Stock ROM from fastboot according to your link:
Things are changing with the advent of project treble. OnePlus will no longer release ROMs flashable via recovery (either stock or twrp) because is no more needed. The updates will be done on the slot not used for example if you are using slot a the update will be installed on slot b and the slot b will be set as default. If you brick and you are in bootloop how you can restore the rom? You can't with Stock ROM you have, because the zip can be only installed via Update Engine, so what can you do? Flash a stock rom via fastboot. I have extracted all images from the stock zip and i have made a new zip with the Fastboot ROM with a flash-all.bat included. This will work only if your bootloader is unlcoked. This will erase all your data and will wipe
I download and was trying to use the stock ROMs, I didn't see any bats, and now I know why.
Lots more reading to do. I love doing playing with this stuff, but trying to learn & keep up with things burns time, which most days I don't have.
This is the longest I've ever been on a stock OS (6 weeks? got the phone right after its release) although it's rooted (can never leave things completely alone).
Click to expand...
Click to collapse
I have to unzip the downloaded fastboot ROM at any folder on computer and open that folder u will see named [flash all bat]
Now connect phone in fastboot mode to computer and just click [flash all bat] file
noncomjd said:
Thanks for that. and that explains a few things and explains why when I installed TWRP, I didn't see the recovery option. Doesn't pardon my hitting install to Boot.
Just thought of another Q, if there is no recovery partition, where is the OEM recovery stored? (I figured the lack of a recovery partition is why TWRP gets overwritten if installed without a custom ROM)
I did a quick read on that, it seems really interesting and may be of some use as soon as I learn more.
I've got so much to learn about this. I keep meaning to take time to begin, but stuff comes up and boom more changes.
I've got to do more reading to take advantage of that.
@MrSteelX mentioned that I could have used TWRP to install a ROM from the PC.
Is this what is referred to as "sideloading". I've been looking for some info on this and haven't really come across much that is any good.
Are there any available guides that anyone can point to so I can learn about using TWRP that way?
Click to expand...
Click to collapse
"recovery" (what's left of it... wipe and mostly nothing else) is inside the boot partition. TWRP on those devices is installed into the boot partition (NOT overwriting the boot partition, but into the "ramdisk", a part of the kernel where OEM recovery resides and where TWRP, Magisk, Xposed and all the mods do their stuff on the kernel. On a phone with A/B partitions, you have to fastboot BOOT twrp, and then you have to flash the installer zip, you should never ever flash the image to any partition since there isn't any.
RusherDude said:
"recovery" (what's left of it... wipe and mostly nothing else) is inside the boot partition. TWRP on those devices is installed into the boot partition (NOT overwriting the boot partition, but into the "ramdisk", a part of the kernel where OEM recovery resides and where TWRP, Magisk, Xposed and all the mods do their stuff on the kernel. On a phone with A/B partitions, you have to fastboot BOOT twrp, and then you have to flash the installer zip, you should never ever flash the image to any partition since there isn't any.
Click to expand...
Click to collapse
Thanks for the information.
and this is what I did, originally I thought I had accidentally selected the wrong partition, but it seems since there is no recovery partition, I did it wrong from the start.
Q: I'm guessing this is why when you do load TWRP (the correct way, which I did once, following a guide) without a custom ROM (still using Oxygen OS) that the OEM recovery overwrites TWRP or the OEM recovery is called up at the next reboot into recovery?
Q: I understand, at least in theory the benefit of the A/B partitions, what is the benefit of eliminating the recovery partition other than giving more control of the phone to the OEM and OS? Is this setup limited to the stock kernel or mandated to be copied by any potential replacement kernels (this information is new to me, I haven't yet read up on kernels).