[G2 and Desire Z Q&A, Help & Troubleshooting] jontornblom:
Hello,

I've had a few requests for help unrooting the Bell Desire Z for warranty purposes.

If you've noticed, there isn't a specific guide for us Bell users, while T-Mobile customers have like a dozen guides scattered around. I figured this out and I should share it.

The really tricky part was figuring out how to get rid of superuser.apk and also get s-on and Bell's CID in the right order, but it turns out it's simple haha. Unfortunately there was not guide for me, so I had to figure this out trial and error and piecing it together from other random posts. I'm not a dev/hacker (well, maybe now I am a novice hacker), so it was a big deal for me (lol) and I can relate to the frustration that comes from not having a good resource.

The exact build my phone shipped with was 1.34.666.5 and other phones may have shipped with other builds, but I've determined that the way Bell operates is that they send their phones to a 3rd party repair facility, and they don't check this (or don't care). However, they may still check whether or not the phone is rooted. So let's unroot it.

DISCLAIMER: Do your own research. I am not responsible for anything bad that happens to your phone after this point (but I will take credit for your success!! :P). I used this method successfully and everything worked great. But proceed with caution. If you are unsure, do some looking around. CHECK YOUR MD5 SUMS! Easy MD5 is in the market, and is great.

0. If you have flashed a new radio, flash the old radio back. This one:

http://www.mediafire.com/?9cb8a7jwxob8o6r

NOTE: I'm leaving specific details out of this because if you don't know how to do this, that means you haven't done it before, and you don't need to do this step, and should probably avoid flashing new radios anyway.

1. Download this file:

https://rcpt.yousendit.com/1317004046/ea1de40db3968b867573327c903231bf

-unzip it, and place the folders in /sdcard/clockworkmod/backup/

(recovery will check the md5 sums for you)

2. Reboot into recovery (assuming you have the clockworkmod recovery).

-Do a factory reset (yes, you will lose all your apps etc if you didn't back up)

-Choose Backup/Restore, Advanced Restore, Stock DZ System, System.img

-Choose Backup/Restore, Advanced Restore, Stock DZ Boot, Boot.img

-Reboot

3. Download

http://dl.dropbox.com/u/15272013/Flash Recovery Files.zip

Unzip those files to the root of your sdcard.

PLEASE CHECK THE MD5 of recovery.img AFTER you have unzipped it and placed it on your sdcard!! Sometimes if you check an md5 on your pc and then copy it over, you could still have an error, and then you'll be in a bit of trouble!

md5 of recovery.img: id5d280af717f9afd7ce1c3285c129bc

4. Download the following file:

http://cmw.22aaf3.com/common/gfree_07.zip

md5 (of entire folder): 6916cf05b0805aeac9effdc1725aaa12

unzip and place the file gfree on the root of your sdcard

3. Install Terminal Emulator from the Market. This all needs to be done in the same Terminal Session. Type

$su

#mount -o remount, rw /system

#cp /sdcard/flash_image /system/bin/

#chmod 777 /system/bin/flash_image

#/system/bin/flash_image recovery /sdcard/recovery.img

#cp /sdcard/gfree /data/local/tmp/

#chmod 777 /data/local/tmp/gfree

#rm /system/app/superuser.apk

#/data/local/tmp/gfree -s on -c BM___001

Now when you reboot your phone, you will have an unrooted phone, stock. For clarity, you have:

-Stock, Unrooted Bell ROM 1.34.666.5

-Stock, Matching Radio

-S-Off HBoot

-Proper Bell CID

-Superuser.apk nowhere to be found

The only loose ends are that flash_image will still be in your /system/bin and if you flashed the eng hboot, your hboot number may not match. I'm 99.9% certain nobody at the repair facility will look or care about it. Also, I'd prefer you avoid flashing your hboot, since that is singly the most risky thing you can do with your phone.

If anybody knows whether the flash_image binary works in /data/local/tmp, let me know and I'll edit the post.

Note: when you get your phone back, it will have the latest GB RUU on it. This will give you a bit of trouble re-rooting it. There is no way around having them flash the latest firmware on it, since it's the very first thing they do before they diagnose your phone.

Thanks to Football for information on shipped builds and mxpxboi for his rooted 1.34.666.5 nandroid files.

Cheers!

JT