yashsingh1/xdaforums huggingface dataset:
[G2 and Desire Z Android Development] liquidhot:
Alright, so I went out to dinner, and the phone registered all by itself, so maybe it's something with the cell tower by my house? It didn't occur to me that that would be it since my G1 works fine with it.

Anyway, it's all working now. Thanks a lot!
[G2 and Desire Z Android Development] instigator008:
OK, successfully ran gfree...many thanks to the devs who made this possible!

What now?
[G2 and Desire Z Android Development] amack10:
So by being radio unlocked and able to flash any firmware does this mean we could technically take say an image from a sprint phone flash it and now its a sprint g2
[G2 and Desire Z Android Development] popokrew:
Probably not since the chips in the phone are made to work on gsm, not cdma (sprint/vzw).
[G2 and Desire Z Android Development] ayalah1986:
So my laptop is out of commision anyway to do this from the phone itself? I have gfree.zip in my downloads and I used terminal to cd into the folder but dnt know how to forward it into /data/local???
[G2 and Desire Z Android Development] SoTacMatt:
Read up further in this thread, someone shows how they did that already.

http://xdaforums.com/showpost.php?p=9531384&postcount=57
[G2 and Desire Z Android Development] misconcepti0n:
Yes, as mentioned previously, extract the zip file to a folder on your sd card, then use a root file manager (say, Astro) to copy all the extracted files into the /data/local folder. Then, use your terminal to perform the rest of the commands.
[G2 and Desire Z Android Development] fattire:
you can also just copy the files from the sdcard from the terminal. For example, assuming the file unzipped to /sdcard/gfree/gfree , you'd do this in the terminal:

$ su
# cp /sdcard/gfree/gfree /data/local
# cd /data/local
# chmod 777 gfree
# ./gfree
# sync
# reboot

BTW-- there were a lot of changes to the wiki instructions to simplify things.
[G2 and Desire Z Android Development] codf4ther:
Safe for Desire Z?

Is this safe to run on the Bell Desire Z? Most of you seem to be T-Mobile users.
[G2 and Desire Z Android Development] SoTacMatt:
Done!

Very painless running the gfree! After reboot, instantly popped up "T-Mobile" network.

Thanks all!!!
[G2 and Desire Z Android Development] tr82691:
brq filter error

can anyone help me? i followed instructions exactly and am still on stock rom with "2.6.32.26-cm-virtuous-v1.0 rmk@droid#1" kernel and keep getting the error towards the bottom of my prompt. after it does the patching and backing up part it reboots my phone and sim is still locked. i saw some other posts and dont see the WARNING message. anyone got a clue? heres my prompt log.

Microsoft Windows [Version 6.1.7600]

Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Android SDK\tools>adb shell

# su

su

# cd /data/local

cd /data/local

# chmod 777 gfree

chmod 777 gfree

# ./gfree

./gfree

Section header entry size: 40

Number of section headers: 44

Total section header table size: 1760

Section header file offset: 0x000138b4 (80052)

Section index for section name string table: 41

String table offset: 0x000136fb (79611)

Searching for .modinfo section...

- Section[16]: .modinfo

-- offset: 0x00000a14 (2580)

-- size: 0x000000cc (204)

Kernel release: 2.6.32.26-cm-virtuous-v1.0

New .modinfo section size: 212

Attempting to power cycle eMMC... OK.

Searching for mmc_blk_issue_rq symbol...

- Address: c02d5154, type: t, name: mmc_blk_issue_rq, module: N/A

Kernel map base: 0xc02d5000

Kernel memory mapped to 0x40001000

Searching for brq filter...

- ***WARNING***: Did not find brq filter.

Patching and backing up partition 7...

C:\Android SDK\tools>

oh and btw i checked my sdcard and there is a part7backup .bin file created after my attempt.
[G2 and Desire Z Android Development] Mikey:
directions, including su and beyond are to be PERFORMED thru your terminal emulator app on your phone :)
[G2 and Desire Z Android Development] tr82691:
i tried it on both pc and phone but same thing happened. and when i did it thru my phone the size of the .bin file was 0mb but the file from doing it thru my pc was 2mb.
[G2 and Desire Z Android Development] gee one:
I ran into a reboot the first time around because I had pershoot's kernal installed.

Flash stock CM6 and try it again.
[G2 and Desire Z Android Development] fattire:
Yeah, I'm not sure what is meant by "stock rom with "2.6.32.26-cm-virtuous-v1.0 rmk@droid#1" kernel". Stock rom doesn't have the cm kernel. That sounds like a custom rom to me.

Update: this thing?

At this point, you don't want to re-flash the original ROM as you could wind up in trouble. Just try the straight cyanogenmod kernel. Should work fine.

That said, you might also make sure that you have sufficient room on your SDCard for the full backup of partition 7 before it gets patched. I believe it's about 2MB for the file itself, plus let's add some breathing room to be safe :)

So make sure you have 5MB free on your sdcard.
[G2 and Desire Z Android Development] tr82691:
well im rooted on the stock rom with a kernel i flashed thru rom manager to overclock to 1.4xx. but i just flashed CM6 RC4 so lets see what happens. and for sdcard room i still got about 4 something gigs left.

EDIT: ok so it worked like a charm now. but quick question idk if anyone else had this but now with my tmobile sim back in it says 3G instead of H. when i go to APN settings i see a "Simple" and "T-Mobile" profile. dont know if its CM or the unlock that did that.
[G2 and Desire Z Android Development] Okawa:
Hmm, not sure whats wrong here.

Ok I am running Preshoots kernal running CM6 RC2, I tried running gfree via adb.

Here is the exactly what I did.

Then it reboots after X amount of time doesnt give me time to sync. I have tried an AT&T SIM but still says I need to enter a SIM unlock code.

Anything else I should try?
[G2 and Desire Z Android Development] misconcepti0n:
The 3G instead of H is from the ROM, not the unlock.
[G2 and Desire Z Android Development] gee one:
That seems like the same problem that tr82691 had in post 89.

Pershoots kernal doesn't work- flash back to a stock CM6 and try again... it worked for me!

Thanks fattire!!
[G2 and Desire Z Android Development] tr82691:
same happened for me the first time but then i installed CM RC4 ran the process and then flashed my rom back nad worked like a charm.

@misconcepti0n: thanx for the info, i flashed back to my other rom and got it back.
[G2 and Desire Z Android Development] Okawa:
Thanks I will give it a try.
[G2 and Desire Z Android Development] deathofdemigod:
gfree WORKED!!!!

this may be helpful for windows users:

1. stock g2 with "no service"

2. manual OTA

http://xdaforums.com/showthread.php?t=827139

3. enable usb debugging on phone:

settings-applications-development- check off usb debugging

4. install htc sync from website (it will install correct drivers)

http://www.htc.com/europe/SupportDownload.aspx?p_id=325&cat=3&dl_id=1058

5. install ADB from andriod sdk

http://developer.android.com/sdk/installing.html

6. set env variables

http://xdaforums.com/showthread.php?t=834748

http://xdaforums.com/showthread.php?t=757233

7. temproot & gfree

http://xdaforums.com/wiki/index.php...Phone.2C_Set_SuperCID.2C_and_Turn_Radio_S-OFF

7. enjoy fixed phone and donate to Scotty ;)

my cmd log:

ps Scotty, thank you for your hard work
[G2 and Desire Z Android Development] trock62:
Work easy using cm nightly and gfree with terminal thanks
[G2 and Desire Z Android Development] Okawa:
hmm still no go =(
[G2 and Desire Z Android Development] steviewevie:
Yes it is. Head on over to the DZ forums (please mods, merge them with the G2 ones !) and check out the thread on this threre.
[G2 and Desire Z Android Development] fattire:
You tried with cm rc4 and it still didn't work? You have debugging turned on? You have 5MB on your sdcard, and it isn't mounted on your computer?

What error are you getting?
[G2 and Desire Z Android Development] Okawa:
Yes, Yes, Yes and Yes.

I am getting no error it goes through the paces but just reboots with out my typing in sync and when i try to use another SIM I still see it needs an unlock code =/
[G2 and Desire Z Android Development] Okawa:
Ok finally! flashed it one more time then tried and worked just fine! ^_^

So Yes people just flash Stock CMRC4 and then run this it will work just fine ^_^
[G2 and Desire Z Android Development] dadewy:
Nice :D:D:D Thanks guys! Worked like a charm on CM RC4. Now to restore my nandroid of virtuous 7.2.

Can I tell you how nice it is to finally have a G2 again? This G2 went from virgin boxed to permroot/subsidy unlock in about an hour or so. Gotta love it :)
[G2 and Desire Z Android Development] screwthe49ers:
Worked fine using CMRC3, followed post #57's instructions using terminal emulator.
[G2 and Desire Z Android Development] Gootah:
Question

Does this last ROM to ROM? In other words, is it permanent? I did it on CM RC3 and now I wanna flash RC4, will I have to redo it?
[G2 and Desire Z Android Development] prp2:
Yes it does. I did this using the original method with hex editing by hand and entering the commands, but first I had to flash from Virtuous 0.7.0 to CM RC3 to get the kernel to not boot loop me. Once that worked, flashed back to Virtuous, and I've since updated to 0.7.1 and 0.7.2 (patches) and the changes have been maintained.
[G2 and Desire Z Android Development] Deuces:
just a win report for gfree app on CM6-RC4
[G2 and Desire Z Android Development] imranbandial:
I tried almost 3 hours,didn't work for me,same error,no such file or directory found.I also sans know how to run gfree on phone.I have g2 rooted ,virtuous 0.72
[G2 and Desire Z Android Development] xl DIGITAL lx:
Try doing it in recovery mode with the system and data mounted. Worked for me.
[G2 and Desire Z Android Development] dadewy:
Didn't work from Virtuous for me. Worked fine from CM RC4 though. Just FYI.
[G2 and Desire Z Android Development] Duffm4n:
this might sound silly, but upon trying to download the g2temproot file, kaspersky informs me of a trojan warning. is this to be ignored?
[G2 and Desire Z Android Development] guhl99:
Do you download from here http://xdaforums.com/attachment.php?attachmentid=414349&d=1286381465 ?

At least according to Avast this is clean
[G2 and Desire Z Android Development] digikid:
Awesome! Thank you!
[G2 and Desire Z Android Development] MLonon:
SUCCESS!!!

I do not have any money to donate (since I spent it all getting my g2). Would you except a *******:eek: or at least my unending gratitude?:p
[G2 and Desire Z Android Development] amack10:
Make sure when u download the zip file for gfree, unzip it. And it will give you a folder called gfree. Take the contents of that folder and place them in data/local. Then run the commands. That's what worked for me.
[G2 and Desire Z Android Development] shortlived:
I just did it with Virtuous 7.2 no problems however I change my kernel to the stock "DesireZ HTC Kernel Unmodified" first which can be found in the ROM Manager under Virtuous Sense kernels. somthing like that anyway. Hope that helps.
[G2 and Desire Z Android Development] dadewy:
You're not running any of that on your PC anyhow so it doesn't really matter what your PC AV makes of it.
[G2 and Desire Z Android Development] damnoregonian:
hahahaha

that's gratitude.

people have donated quite enough; i am happy about the number of people rooting and unlocking their phones, though :)
[G2 and Desire Z Android Development] ayalah1986:
Success!!! Thnx Scotty the only thing I need now is a worthy carrier w/decent prices lol
[G2 and Desire Z Android Development] Gootah:
Dope, thanx for the info
[G2 and Desire Z Android Development] daweeze02:
Got my G2 about 10 minutes ago and used your method, it worked like a champ.....thanks op
[G2 and Desire Z Android Development] The Great NY:
I just flashed on virtuous 7.2 no issue. It actually rebooted itself.

After I hit sync...it went back to tools on the command line for a second and then rebooted itself.

Now I gotta find someone with att or another sim card carrier to see if it worked.

Unless there is a way to tell that the change took....is there? Other than a sim swap?
[G2 and Desire Z Android Development] AndroidNoober:
theres an easy way? :(

lol I didnt get the sdk well installed :(
[G2 and Desire Z Android Development] KronicAnarchy:
Ok so I did this via the terminal method on my phone and all seems to have gone as planned, haven't verified yet, not entirely sure how.

My question is with S permanently off, could I conceivably flash the PC10IMG to go back to stock ie if I need to send my phone in or for whatever reason. I'm a little unclear as to the implications of this.

If I do flash the stock image will that then put me back completely stock with S-On again? If so then do I just use this method to achieve root or do I still have to use the Rage method to root?

Thanks for your patience and explaination
[G2 and Desire Z Android Development] Jarheadflip:
Im new and it might be a dumb question so with supercid can i flash any rom say like a nexus one rom or another phones rom on mine? Please dont flame me for just curious. Thanks in advance
[G2 and Desire Z Android Development] muncknr:
That not what it means no. More like a rom for this particular phone, but from another carrier.
[G2 and Desire Z Android Development] VValdo:
The wiki talks about how to verify it worked.
[G2 and Desire Z Android Development] VValdo:
You should be able to go back to stock. Radio S-off should stick. No further steps should be necessary.

That is my understanding.

W
[G2 and Desire Z Android Development] luis86dr:
Going to try this tonight.

[G2/HTC Vision]
[G2 and Desire Z Android Development] The Great NY:
ok, thanks....i was actually gonna browse through that tonite.
[G2 and Desire Z Android Development] Diablo2424:
Worked perfectly, within the next few days I should have a different provider SIM card to check, but that aside, everything went smoothly, thanks for the awesome tool and write up! Super simple instructions to follow!
[G2 and Desire Z Android Development] Jarheadflip:
oh k thanks
[G2 and Desire Z Android Development] Trainer#1:
Thank you all!!!!!!!!!!!

I admit I was worried when I discovered how HTC locked down this phone.

It is my 1st android device.

My G2 thanks you for removing the shackles! :)

Blessed be the hackers of the world!

Scott Walker MVP! (most valuable programmer)

Paul Obrien (a visionary)

#g2root UNBELIEVABLE work
[G2 and Desire Z Android Development] dictionary:
Had previously permarooted with Visionary r12, and opted to go ahead with this on top of that. Don't know if the sim unlock is working just yet, but I can say that I have no issues as of now even with root, so I'm definitely happy. Very easy!
[G2 and Desire Z Android Development] steviewevie:
The phone will still be at S-OFF, so if you want to do a warranty return then you will need to copy the original radio config partition back to the phone, to restore the original radio config (S-ON etc).

Scotty posted up about this over on the DZ forums :
[G2 and Desire Z Android Development] ALB24:
Thanks You!

T-Mobile HTC G2. rage+gfree worked great. Tested on both TMO & AT&T Networks and everything worked with no problems. Went from getting no radio signal due to Code unlock method, to getting any network I choose.
[G2 and Desire Z Android Development] fattire:
So is that a confirmation that the rooting instructions in the wiki are correct? If so i'll remove the "this has not been tested" warning...
[G2 and Desire Z Android Development] steviewevie:
I would suggest that the section in the Wiki labelled "Permaroot (S-OFF)" is a bit misleading/confusing, given that S-OFF has nothing to do with permaroot. The first bit there is the S-OFF bit, then there's a separate bit on permaroot (root script).

Also, the Wiki section is for the Vision (i.e. G2/DZ), but the engineering boot instructions are specifically for the G2 and could lead to a bricked DZ. I suggest this be altered to include the engineering hboot for the DZ.

Sorry if this sounds nit-picky, just trying to get things 100% clear.
[G2 and Desire Z Android Development] kalipedia:
Can someone please clarify a couple points? First, I used the RAGE method with ADB to permaroot (with S-OFF), and am happily running CM-RC4. I would like to SIM unlock now. I have a code from T-Mo, but I read of so many backfires with that, that I held off.

So, my question - does this GFREE method work on phones already permarooted with RAGE? (And yes, I methodically read all posts in this thread and others, but have found no definitive answer). If so, any special instructions for those already permarooted or do I just run through the steps as if my phone were still in its original state?

Thanks!
[G2 and Desire Z Android Development] instigator008:
Yes, you will be fine. Just run through the instructions per normal.
[G2 and Desire Z Android Development] luis86dr:
Worked great for me. Feels good to have true root and even unlocked sim. :) not that I need it but good to know.

[G2/HTC Vision]
[G2 and Desire Z Android Development] kalipedia:
@instigator008 - thanks for the tip - i ran it and had no problems at all. i confirmed SIM unlock via adb too (just to make sure). will have to pop in a friend's non-TMO sim for a real confirm.

thanks to all for this!
[G2 and Desire Z Android Development] fattire:
No problem. I changed the title "permaroot (s-off)" to read "Permaroot (using "gfree" + "root")" to explain what we were doing a little better. While "S-OFF" != root itself, they do relate a bit in that part of the permarooting process (necessary for the perma part) has to do with dropping the emmc read-only, which is achieved via gfree/s-off.

Although these instructions are on the Vision wiki, I also clarified that the HBOOT is for G2/DZ only and that a different HBOOT is used for DHD. I didn't link to it as I don't know where such an hboot is. (I bet there's a thread on it somewhere in the DHD forums, but I'll leave it to someone else to add...)
[G2 and Desire Z Android Development] Trainer#1:
I verified everything unlocked on my G2 through ADB. I previously rooted using rage method, so I only used part 2. It is quick, fast, and clean!

Thanks to fattire for the user friendly post!
[G2 and Desire Z Android Development] wtang:
I perma-rooted (with S-OFF) my G2 using the rage method a while back. I also flashed baconbits on top of that. Can I use gfree with the kernal from baconbits? Or do I need to be running a CM 6.1 RC kernal?
[G2 and Desire Z Android Development] xl DIGITAL lx:
It would be better if you ran the CM kernel. Try flashing that then go on.
[G2 and Desire Z Android Development] steviewevie:
There are two different engineering HBOOTs for Vision though, one for the G2 and a different one for the DZ. I suspect there would be big problems if you flashed the wrong one, since the phones are partitioned slightly differently.
[G2 and Desire Z Android Development] Pat123:
Wow. That's really bad. Any links that mention which HBOOT is for which model?
[G2 and Desire Z Android Development] fattire:
No... I didn't even realize there were two HBOOTs. No one who's gone over the instructions mentioned it either.. if there are in fact two, could someone provide links in the wiki to that effect?
[G2 and Desire Z Android Development] stridger:
They are both mentioned in the different guides. Here are the links to the HBOOTs:

DZ: http://www.multiupload.com/4U9P14R86Y

G2: http://unforgiven512.udderweb.com/downloads/hboot-eng.img

It is correct that they are not interchangeable, because of different partitioning. You could interchange them, but then would have to reflash everything after partition 18. I believe the table before partition 18 is the same on both phones.
[G2 and Desire Z Android Development] mpmilestogo:
Unlocked G2 as a gift

I received a G2 that is unlocked as a gift. Is there a reason or any additional functionality or changes I gain from applying gfree to a tmobile phone that is already unlocked? I gather I get the true S=OFF at the radio level. Anything else to recommend it for an unlocked G2?
[G2 and Desire Z Android Development] renn9420:
Just waiting for a newer version of gfree to come out so we can always revert to radio s-on. But loving the fact that i can use any sim and Super CID!! :eek:
[G2 and Desire Z Android Development] skiptomylou11:
Did it through Emulator and it seems to have worked. Any way to check if I have radio S-off?

I don't have a different SIM card, so I would have no way of checking if I'm SIM unlocked, either.

Thanks all for the hard work!!
[G2 and Desire Z Android Development] luis86dr:
Flashed pc10img to revert back to stock. No problems. Just restored my cm without any issues as well. Thanks to all devs.

[G2/HTC Vision]
[G2 and Desire Z Android Development] fattire:
Thanks for this. Updated the wiki to make it clear that there are two different HBOOTs. Prior to this the wiki didn't include any link at all so I assume anyone who searched for hboot-eng.img found it in the appropriate forum for their phone... still it's better to be explicit and as clear as possible I think.
[G2 and Desire Z Android Development] Turbo Brian:
i followed the steps outlined in the wiki (as of 12-5-10) and no issues with gfree. i have root, even after reboots. bootloader shows s-off. i cant verify the SIM unlock but that feature really isnt relevant to me anyway. my first rooted android phone. w00t! now, off to install rom manager and titanium backup.
[G2 and Desire Z Android Development] wilnotdie:
Would it be safe to say that I can dd the backed up bin file back to the partition? To revert the changes?

Would it be the same if I dd'd the ota radio.img to this partition? Or fastboot flash it?

Searching from the phone didn't work right, I'm a lil confused, sry guys.
[G2 and Desire Z Android Development] joemm:
I read through the thread and didn't see anything mentioned so I am guessing that after gfree the G2 is still getting 4g speeds through Tmobile? Any confirmations please?

update:found out still get 4g speeds after gfree.
[G2 and Desire Z Android Development] dangeruss_oo7:
temp root needed?

is temp root need to do this. i saw was needed n earlier post. does this update eliminate need for temp root
[G2 and Desire Z Android Development] NicholsonRL:
Much thanks for all the hard work!

Thank you!
[G2 and Desire Z Android Development] joemm:
Just ran gfree, placed gfree file in data/local and ran the commands thru terminal emulator, pretty simple. Saved a copy of my part7backup off my sd and feeling pretty free. Ran the command lines from HTC Vision Wiki page thru Terminal/Command Line to verify I had SuperCID, Subsidy Unlock & Radio S-off and got this returned:

@CID: 11111111

@SIMLOCK= 00

@secu_flag: 0

NICE.

Thanks scotty2 for all the hard work and time invested, beer fund transfer on the way, also thanks to fattire for the post and guide. :D
[G2 and Desire Z Android Development] dadewy:
If you dd back partition 7 your s-on/subsidylock/CID will revert back to what they were before gfree, yes.
[G2 and Desire Z Android Development] The Great NY:
this just happened to me. i ran gfree on friday while i was at work. and everything checked out. been using the phone carefree since then.

went out to get some pizza about 1 1/2 hours ago and the service kept going in and out on my way to the pizza place. so i picked up the pizza made a quick call. and went to send a text message and i had no service.

this was in a place i always had perfect service. so i rebooted a couple times on my way back home and still got no service. even at home. so i rebooted again. no go.

i restored to a backup just prior to running gfree, and now everything is back to normal.

im on Virtuous 7.2 sense rom if that means anything.
[G2 and Desire Z Android Development] androidtoy09:
Can you please give us an instruction how to do this? for future references.

Thanks
[G2 and Desire Z Android Development] dadewy:
Sure.

adb shell, su if needed. then:

dd if=/sdcard/part7backup-1291298028.bin of=/dev/block/mmcblk0p7

Replace "part7backup-1291298028.bin" with the actual filename of the backup on your sd card. The part past the dash will be different (it's a timestamp).

Follow up with a "sync" and then reboot after waiting a minute or so.