[Q] Backing up stock HBOOT - G2 and Desire Z General

My sister-in-law got a Bell Desire Z and she may want my assistance with rooting and S-OFF.
I see that the key instruction to install ENG HBOOT is:
dd if=/sdcard/hbooteng.img of=/dev/block/mmcblk0p18
I'm guessing, then, if I wanted to back up the stock HBOOT first, I could do the following?
dd if=/dev/block/mmcblk0p18 of=/sdcard/hbootstock.img
And then if we later needed to restore stock HBOOT from the backup:
dd if=/sdcard/hbootstock.img of=/dev/block/mmcblk0p18
Did I get the syntax right? I wouldn't want to brick her phone

Yes, thats the way to do it. I also backed up all other 30 partitions just in case
Not sure about the restore though. I mean: It's the right commands and everything, but I'm not sure if it will work. Don't see why not though.

dicer42 said:
Yes, thats the way to do it. I also backed up all other 30 partitions just in case
Not sure about the restore though. I mean: It's the right commands and everything, but I'm not sure if it will work. Don't see why not though.
Click to expand...
Click to collapse
Actually now that I've read about nightmarish situations where G2 owners tried to flash back using PC10IMG.zip after perm root and S-OFF, but the first thing it did was replace stock HBOOT, which subsequently locked them out of the rest of the phone. Yikes. I guess you really have to know what you're doing!

cmstlist said:
Actually now that I've read about nightmarish situations where G2 owners tried to flash back using PC10IMG.zip after perm root and S-OFF, but the first thing it did was replace stock HBOOT, which subsequently locked them out of the rest of the phone. Yikes. I guess you really have to know what you're doing!
Click to expand...
Click to collapse
That problem will happen ONLY in the case you are flashing a PC10img.zip different from your original version, or if you are flashing an older version...
That will not happen if you get pc10img.zip from your accurate current version or a newer firmware version

Related

[REQUEST] Can anyone write a guide for Unrooting

Its only going to be a matter of time before people will need to send phones back under warranty for whatever reasons so a guide for unrooting will be needed.
Any takers?
G2 already has one, but obviously we will need different rom/hboot etc to go back to our stock.
Not just unrooting, but going completely back to stock, i.e. S-ON and stock ROM.
As you say, we should be able to base it on this - http://forum.xda-developers.com/showthread.php?t=835971
Although we have several different stock ROMs, e.g. European, Asian, Vodafone UK, etc.
this is already covered in the FAQ (easy tutorial @ dev forum)
http://forum.xda-developers.com/showpost.php?p=9143411&postcount=2
gtrab said:
this is already covered in the FAQ (easy tutorial @ dev forum)
http://forum.xda-developers.com/showpost.php?p=9143411&postcount=2
Click to expand...
Click to collapse
That just says to use Visionary to turn off rooting. Or did I miss something ?
As I said, I think we need to cover how to return a phone completely to stock, and I don't think it includes all that you'd really need to do, or if you didn't use Visionary in the first place, e.g. the kind of stuff in the G2 post that I linked.
steviewevie said:
That just says to use Visionary to turn off rooting. Or did I miss something ?
As I said, I think we need to cover how to return a phone completely to stock, and I don't think it includes all that you'd really need to do, or if you didn't use Visionary in the first place, e.g. the kind of stuff in the G2 post that I linked.
Click to expand...
Click to collapse
It does say to flash an RUU to S-ON which in the past I would have said would work, but seeing how the G2 forums are not suggesting that its that simple my guess would be that its not that simple.
I had to flash the PC10img thing taken from the stock ROM to restore root and s-on. But no idea how to extract that PC10img thing, not that I have looked into it either.
That info was from one of the guides in the dev section I'm sure.
Sent from my HTC Vision using XDA App
What might work now will probably not work once an OTA update comes out for the DZ though, as per the problem on the G2 they've had which has led to quite a few semi-bricks (possibly full bricks in some cases ?).
Done some research, it would seem that flashing an RUU would work fine for those of us already rooted, if an OTA were to come out those who rooted after the OTA would have issues unless an RUU for the same OTA was released as well. (this is basically because the RUU's currently available will be older than the software the phone is on so the RUU would fail leaving you with a semi-bricked phone as described above, basically it would flash stock hboot and recovery then fail to flash the /system so you would be left with no root or recovery and no rom.
Flashing the ruu would give rise to accepting the OTA too, if you really wanted to do that, but it might block root.
you just need the RUU for your correct original phone version
OR use a gold card
eg. I have debranded mine from bell NAM 1.34.666.5 to euro generic 1.34.405.5
To go back to stock, I can:
1.- grab the bell 1.34.666.1 RUU (its slightly previous, but is the correct original version for my phone)
OR
2.- run the euro generic 1.34.405.5 with a golcard inserted
gtrab said:
you just need the RUU for your correct original phone version
Click to expand...
Click to collapse
Isn't that dangerous though once we get any OTAs, and could lead to this ?
http://forum.xda-developers.com/showthread.php?t=838484
Or am I missing something ?
steviewevie said:
Isn't that dangerous though once we get any OTAs, and could lead to this ?
http://forum.xda-developers.com/showthread.php?t=838484
Or am I missing something ?
Click to expand...
Click to collapse
Yes thats what I was getting at in my post above, any RUU you flash needs to be of the same or newer version of what your previously flashing. You cannot GoldCard to flash an RUU to S-ON or you get left with the semi-brick where you have stock recovery and hboot, but no rom installed.
So if an OTA comes out, you can't accept it, s-off then use an older RUU to s-on again. You would have to flash an RUU of that OTA version (if one is released).
Basically its best to not accept any OTA if you can avoid it and just wait for a custom rom of the same, that way we can always use the older RUU's to s-on if we need it.
I successfully downgraded my rooted/S-OFF'd phone to an earlier ROM last night. I simply followed this method - http://forum.xda-developers.com/showthread.php?t=832503
I'm of the firm belief that this is the onyl way to do it if you are at S-OFF. If you have S-OFF, then flashing an older RUU will probably brick your phone.
Well yesterday I perm root and s-off my european Desire Z with World/Euro generic 1.34.405.5. Somehow everything went bad after flashing recovery mode, so I decided to unroot it and bring it back to original settings.
I found there are 2 methods, one is to run the original ruu, and the other one was to copy the exact World/Euro generic 1.34.405.5 PC10img.zip to the root of my sd card.
Then entered to bootloader, and the phone recognize the archive, I simply apply it, and now I am back again to original stock.
However now I tried again and I am happily root, and S-Off following the amazing gtrab guide (http://forum.xda-developers.com/showthread.php?t=835777)
buzmay said:
I found there are 2 methods, one is to run the original ruu, and the other one was to copy the exact World/Euro generic 1.34.405.5 PC10img.zip to the root of my sd card.
Click to expand...
Click to collapse
That's the thing I keep saying though, flashing the original RUU worked for you because you weren't trying to downgrade the ROM, it was the same version that you already had on (just S-OFF etc). If you had a later version on your phone (e.g. via an OTA update) and were trying to flash to an earlier one, you would have bricked it trying the straight RUU method.
So what should be done is download and install an RUU - say 1.234.987, so you're on 1.234.987 - then root / S-OFF / custom ROM the phone. If anything goes wrong, reinstall the 1.234.987 RUU.
By the way - that's a fake RUU
DanWilson said:
So what should be done is download and install an RUU - say 1.234.987, so you're on 1.234.987 - then root / S-OFF / custom ROM the phone. If anything goes wrong, reinstall the 1.234.987 RUU.
Click to expand...
Click to collapse
During that process, if the stock HBOOT/recovery that is installed by that RUU decides that what you're trying to flash is "older" than your custom ROM, you're screwed though. That's why the "debranding" guide has extra steps in it, i.e. gold card and editing the misc partition.
steviewevie said:
During that process, if the stock HBOOT/recovery that is installed by that RUU decides that what you're trying to flash is "older" than your custom ROM, you're screwed though. That's why the "debranding" guide has extra steps in it, i.e. gold card and editing the misc partition.
Click to expand...
Click to collapse
I hate HTC.
Love the phones, love the Sense, hate the security.
Why not give us a command like the N1? WHY!?
So you should backup the system partition before S-OFF and so on? Like so a dd? (Following on from previous post)
DanWilson said:
So you should backup the system partition before S-OFF and so on? Like so a dd? (Following on from previous post)
Click to expand...
Click to collapse
The system partition isn't changed in S-OFF, that's the boot partition (just allows writing to the system partition).
The gold card and editing of the misc partition should work fine, as per this thread - http://forum.xda-developers.com/showthread.php?t=832503
It worked for me last night to flash to an older stock ROM (which also gave me S-ON again, removing my S-OFF).
steviewevie said:
The system partition isn't changed in S-OFF, that's the boot partition (just allows writing to the system partition).
The gold card and editing of the misc partition should work fine, as per this thread - http://forum.xda-developers.com/showthread.php?t=832503
It worked for me last night to flash to an older stock ROM (which also gave me S-ON again, removing my S-OFF).
Click to expand...
Click to collapse
Cool. Confused. I believe you though.
But you are saying just to make a gold card, and edit the misc partition?
Nice
DanWilson said:
Cool. Confused. I believe you though.
But you are saying just to make a gold card, and edit the misc partition?
Click to expand...
Click to collapse
Following that guide that I linked worked for me. Yes, I turned my SD card into a gold card and edited the misc partition. Then it is fooled into thinking you're restoring a ROM of the same version that it already is running, so it lets you do it.
Actually, I do wonder whether both steps are necessary (i.e. gold card *and* editing misc), because I thought the whole point of the gold card was that it avoided those checks, so perhaps you can do one or the other ? I am only thinking out loud here, and may well be missing something, so I don't suggest trying it other than as in that guide.

Revert to Stock: howto undo Root, S-Off?

I rooted my Desire Z with gfree gfree ("Permaroot", S-Off, CID 11111111) according to the guide in the XDA-Wiki.
Of course i still have the backup of "partition 7" ("part7backup-<time>.bin") and i did a nandroid backup directly after rooting.
How and in which order i can revert completly to stock (without S-off, root, busybox, ...)?
There is an explanation in the Wiki:
Returning_to_Stock
But is this enough? su, busybox, superuser.apk are still in the flash, isn't it?
Installing busybox and having a file called "Superuser.apk" on your phone isn't enough to void your warranty. Just remove the Superuser app so it doesn't stick out like a sore thumb, and remove su from /system/bin if you like.
Hi
I'm in a similar position, needing to return my Z due to a hardware defect I'd like to restore the stock image
I've been able to restore the stock OS image but my radio remains S-OFF and i no longer have the partition 7 backup made by g-free during unlocking (see aforementioned hardware fault)
Can i simply use the part7backup-timestamp.bin from another unlocked desire Z, and if so, would someone be kind enough to post theirs?
If not, what other recourse do i have?
steviewevie said:
Installing busybox and having a file called "Superuser.apk" on your phone isn't enough to void your warranty. Just remove the Superuser app so it doesn't stick out like a sore thumb, and remove su from /system/bin if you like.
Click to expand...
Click to collapse
It's not because of warranty. Here in germany you can return things bought over the internet for 2 week. I was quite happy with my Desire Z and decided to keep it, so i rooted. After a few days i realized that i hardly never use the hardware keyboard and so i changed my mind and want to return it (for ordering a Desire HD).
FOr being able to return it, the device has to be in the state it was when i got it. So not only S-off, but also root should be undone completly.
Deebens said:
I'm in a similar position, needing to return my Z due to a hardware defect I'd like to restore the stock image
I've been able to restore the stock OS image but my radio remains S-OFF and i no longer have the partition 7 backup made by g-free during unlocking (see aforementioned hardware fault)
Can i simply use the part7backup-timestamp.bin from another unlocked desire Z, and if so, would someone be kind enough to post theirs?
If not, what other recourse do i have?
Click to expand...
Click to collapse
You can use gfree to set S-ON, by running "gfree -s on" (see the Wiki). You can also reset the CID using gfree. However, if your phone was SIM locked and you unlocked it with gfree, you can only restore that lock by restoring the partition 7 backup. So you won't be able to do that bit if you need to restore the SIM lock.
steviewevie said:
You can use gfree to set S-ON, by running "gfree -s on" (see the Wiki). You can also reset the CID using gfree. However, if your phone was SIM locked and you unlocked it with gfree, you can only restore that lock by restoring the partition 7 backup. So you won't be able to do that bit if you need to restore the SIM lock.
Click to expand...
Click to collapse
Thankyou for your swift reply!
I had wondered if this was all I had needed to do, but no matter how many times i read it i was not confident of this fact. Thanks for confirming for me.
Having resolved to restore my phone to stock, however, it is now behaving itself perfectly.
Blah.
Is there really no way to completly unroot?
Bierfreund said:
Is there really no way to completly unroot?
Click to expand...
Click to collapse
Yes, you can re-flash the stock ROM which will be completely unrooted. When you do this, make sure you know what you are doing - e.g. if you flash an older stock ROM whilst you still have the eng hboot but no S-OFF via gfree, you could brick/semi-brick your phone.
It really depends if you've flashed a different ROM, exactly how you got S-OFF etc.
The simplest is if you have radio S-OFF via gfree, in which case you can flash a stock ROM, get temp root again (not perm root) and then use gfree to go back to S-ON (gfree -s on).
Edit: Got it fixed.
So is there no way to sim-lock it back without the partition7 backup? I had to run gfree twice for some reason on my G2 to get it to work, and it backed up the sim-unlocked partition7. Am I screwed out of sim-locking it back?
phoenx06 said:
So is there no way to sim-lock it back without the partition7 backup? I had to run gfree twice for some reason on my G2 to get it to work, and it backed up the sim-unlocked partition7. Am I screwed out of sim-locking it back?
Click to expand...
Click to collapse
Are you saying you dont have the original "part7backup-timestamp.bin"? Do you need your sim unlock back on for warranty? I doubt they will check if you sim unlocked your phone and even if they do T-mobile freely gives out the unlock code for your phone to there loyal Tmobile customers, so I doubt the sim unlock affects your warranty.
Hi guys,
I've 2 Part7backup because i had to run gfree twice - gfree 05 and gfree 02.
Got S-off with the 2nd gfree 02
Not knowing they're important, i deleted both of them.
I've only manage to retrieve the 1 of the deleted part7backup which belongs to the gfree 05.
Are both the Part7backup the same?
Can i run gfree again the 2nd time to get the Part7backup file?
Thanks.
With out redoing sim lock can we still just s-on with sim lock still being off

Returning to stock completely, clarification questions.

Hi guys,
I'd like to return my G2 to stock....completely stock and I have a few questions to make sure I'm doing this right (as I've heard that simply installing an officially signed ROM can screw things up).
Right now, I've done everything using the gfree method to get radio, s-off, and even the engineering hboot installed.
My question then becomes, should I follow the instructions as per wiki on returning to stock, or do I follow this guide?
My next question is then, is there anything specific that I should do first? Like remove hboot first, and then follow either of the above guides? And if I hve to remove hboot, how would I go about doing that (I tried searching, but I wasn't able to find anything).
If anyone could guide me on the matter, Id really appreciate it.
I'd like confirmation on the best and most up-to-date guide on this as well. Thanks
Just follow the guide that you linked to in your thread. You don't need to mess with hboot. As long as you follow the guide correctly you will overwrite the engineering hboot with the stock hboot.
Sent from my T-Mobile G2 running Cyanogenmod.
Since you used gfree, you'll need to either restore the partition 7 backup or use gfree to S-ON and set your CID back.
Then follow something like the guide you linked to in order to flash the correct PC10IMG for your phone (as stated earlier, this will also get rid of your engineering HBOOT).
If you had one of the later phones that came with the OTA preinstalled, update your phone with it after the flash is done.
Format your SD card from your settings and then enter the bootloader one more time to do a factory rest.
You should then be completely back to how the phone was when you first got it (with the exception of subsidy unlock if you didn't have the original partition 7 backup from gfree---unlocking your phone is allowed by most carriers though, so shouldn't be a problem).
Thank you for that information. In which order do I do this? Restore the partition first (how would I do this?), or do I install the stock ROM first? Or...?
As you see, I'm confused as to the order of how I would go about doing this assuming I followed the gfree method through and through
Currently, I have an original nandroid backup through clockwerk. Would I "restore" that backup first in the recovery menu, followed by restoring the original gfree backup partition?
My biggest worry currently is that I can't put any stock rom on the phone due to the engineered hboot causing a booting loop problem (something I read on a sticky or something?)? Because based on the Wiki, I need to install the stock ROM first before reinstating the backup gfree partition.
Again, thank you everyone thus far for helping me out with my questions. I do hope that you guys can still answer my remaining questions!
ianmcquinn said:
Since you used gfree, you'll need to either restore the partition 7 backup or use gfree to S-ON and set your CID back.
Then follow something like the guide you linked to in order to flash the correct PC10IMG for your phone (as stated earlier, this will also get rid of your engineering HBOOT).
If you had one of the later phones that came with the OTA preinstalled, update your phone with it after the flash is done.
Format your SD card from your settings and then enter the bootloader one more time to do a factory rest.
You should then be completely back to how the phone was when you first got it (with the exception of subsidy unlock if you didn't have the original partition 7 backup from gfree---unlocking your phone is allowed by most carriers though, so shouldn't be a problem).
Click to expand...
Click to collapse
Okay, thanks guys, I managed to return everything back to stock.
PoisonWolf said:
Thank you for that information. In which order do I do this? Restore the partition first (how would I do this?), or do I install the stock ROM first? Or...?
As you see, I'm confused as to the order of how I would go about doing this assuming I followed the gfree method through and through
Currently, I have an original nandroid backup through clockwerk. Would I "restore" that backup first in the recovery menu, followed by restoring the original gfree backup partition?
My biggest worry currently is that I can't put any stock rom on the phone due to the engineered hboot causing a booting loop problem (something I read on a sticky or something?)? Because based on the Wiki, I need to install the stock ROM first before reinstating the backup gfree partition.
Again, thank you everyone thus far for helping me out with my questions. I do hope that you guys can still answer my remaining questions!
Click to expand...
Click to collapse
Hi!
My original guide how to go back to stock can be found here: http://www.thinkthinkdo.com/trac/project1/wiki/back_to_stock
It is absolutely up to date and i did this myself several times.
There is only one important prerequisite before you follow this guide: You need to be radio S-OFF before you start this.
The engineering-hboot only causes problems if you are not radio S-OFF. So if you used gfree to get radio S-OFF the eng-hboot will not be a problem.
There is no need to install the nandroid backup before you do this procedure.
have fun - Guhl
Thanks for that but I have successfully returned the phone to stock already
I just used my nandroid backup followed by manually setting the Cid back to tmob010. After that, I iinstalled the stock recovery and used the guide I linked earlier by starting at procedure 2.
In short, it was a very eclectic approach and I did what made sense to me. Lawl. It all worked out ok. Back to the good old hd2 for now
guhl99 said:
Hi!
My original guide how to go back to stock can be found here: http://www.thinkthinkdo.com/trac/project1/wiki/back_to_stock
It is absolutely up to date and i did this myself several times.
There is only one important prerequisite before you follow this guide: You need to be radio S-OFF before you start this.
The engineering-hboot only causes problems if you are not radio S-OFF. So if you used gfree to get radio S-OFF the eng-hboot will not be a problem.
There is no need to install the nandroid backup before you do this procedure.
have fun - Guhl
Click to expand...
Click to collapse
Sent from my HD2

stock hboot (0.85.0005) ignores S-OFF?

Hi all,
today i discovered something strange and i like to get your opinion on that:
I am not able to do s-off things in fastboot even if i have s-off!
Situation:
Phone: Desire Z
HBOOT: stock 0.85.0005
FW: 1.34..
Rooted: did root, supercid and s-off via gfree and verified via gfree_verify - even hboot showes up S-OFF
ROM: GingerVillain 1.5
Recovery: ClockworkMod 3.0.0.5
Problem:
First of all, i myself have no problem, but i started experimenting after a friend semi-bricked his desire z with same setup.
I did a nandroid backup and when i boot into hboot and do a 'fastboot flash recovery recovery.img' (with my nandroid recovery.img) i always get a remote: not allowed.
Now from my point of view this should only happen if I have a S-ON and should be impossible with S-OFF ?! Even using 'fastboot oem rebootRUU' does not change anything.
The thing that concerns me about that is: If something destroys both system and recovery, your pretty much screwed + bricked because hboot is not allowed to write to something other then cache and all of this basic stuff doesn't work:
- flash recovery with CW
- flash a complete zip
- flash an other hboot
- RUU
When I rooted my phone i have read everywhere that eng-hboots are not necessary any longer. But it appears that they are the only thing that helps and you have to install them as long as you have a working ROM.
Any thoughts on that issue / can you reproduce this / are fastboot actions logged anywhere?
You need a ENG. HBoot to use fastboot commands, doesn't matter if your s-off.
yeah, i came to the same conclusion..
is there any chance to flash a eng-hboot from a bricked 0.85.0005? i did some experimentation with a goldcard, but at least remote commands didn't change in behaviour..
I think being full-bricked when something goes wrong and not having an eng-hboot already installed is not an acceptable solution for most people here
DragonTEC said:
yeah, i came to the same conclusion..
is there any chance to flash a eng-hboot from a bricked 0.85.0005?
Click to expand...
Click to collapse
maybe thru a modified PC10IMG.zip
I think being full-bricked when something goes wrong and not having an eng-hboot already installed is not an acceptable solution for most people here
Click to expand...
Click to collapse
My thoughts exactly, its kind of a safety if you can't boot into android.
i'm not sure if a PC10IMG.zip will help at all.. my friend tried flashing both 1.34 and 1.72 RUU ROMs as PC10IMG and this didn't change anything.. in fact, the 1.72 even didn' install the new .00008 hbott, so i thing there is some heavy write protection in the hboot making it more or less useless..
what i can imagine that works is aa gokldcard with sppimg.zip, but i haven't yet found one for the desire z..
i have the feeling that this is a huge problem because with a short research i have found at least 3 threads of people having bricked their phone exactly this way and are now stuck.. some of the experts here might pay attention to this problem and in my opinion you should also consider removing the 'a eng-hboot is not needed, don't use it' advice from the rooting section of the wiki..
So what exactly is your problem.
You destroyed recovery and system?
If yes, and you used gfree to get Super-CID just install an PC10IMG that has a version higher or equal to the main version in you misc partition. And then do the whole downgrading, rooting, flashing recovery again.
If you are not Super-CID you might need a goldcard in addition if the CID of the phone is not supported by the PC10IMG that you whant to install.
have fun Guhl
It is almost impossible to brick this phone. The only possible way might be a failed copy of the eng-hboot and this is why the warning is and stays in the wiki.
Sent from my HTC Vision using XDA App
I thought so, too, but when flashing a newer original RUU using the PC10IMG.zip, the flash process runs okay, but after the restart nothing (still hangs in HTC screen, no new hboot) changes so apparently no changes are made..
So from my point of view the phone is more or less bricked.. i guess maybe some custome PC10IMG with an eng-hboot might change this, but i only found one for the G2 and wasn't able to find one for the DZ.. Thats why I thing that removing the 'UNNECESSARY' advice is justified (of course i don't want the warning advice that this can brick the phone to be removed)..

[Q] gfree on cm7.

I have my phone rooted,with root.sh. An I was thinking since I don't have full s-off,can I run gfree on cm7.1. Or will I need to go back to a 2.2.1 stock rom(rooted) an run gfree. Figured I'd ask before I do something stupid.
From my fist to your face, enjoy.
Any one got any ideas
From my fist to your face, enjoy.
Nandroid backup.
RUU back to old 2.2.1 and follow gfree guide for Radio S-OFF, SIM unlock, root, Clockwork etc.
Nandroid restore.
cmstlist said:
Nandroid backup.
RUU back to old 2.2.1 and follow gfree guide for Radio S-OFF, SIM unlock, root, Clockwork etc.
Nandroid restore.
Click to expand...
Click to collapse
So I would have to re-root then, thought so, thanks
From my fist to your face, enjoy.
Mr.Highway said:
So I would have to re-root then, thought so, thanks
From my fist to your face, enjoy.
Click to expand...
Click to collapse
Right, well even if you flash to a pre-rooted version of original 2.2.1, you still need to also change the bootloader (and possibly radio? I don't know) to the matching version as well. And if you only had root.sh S-OFF until now, then installing these things will screw up what you already had.
cmstlist said:
Right, well even if you flash to a pre-rooted version of original 2.2.1, you still need to also change the bootloader (and possibly radio? I don't know) to the matching version as well. And if you only had root.sh S-OFF until now, then installing these things will screw up what you already had.
Click to expand...
Click to collapse
only reason why i rooted with that method is cause i didnt have access to a computer. i might just return my phone back to completely stock (fireware,radio...). then re root it with gfree an restore my cm7.1. thats gonna have to wait till after work today though

Categories

Resources