yashsingh1/xdaforums huggingface dataset:
[G2 and Desire Z Android Development] J-Hop2o6:
well utilize the QUOTE button more often.. but thats good that u got it to finally work.. how'd u get it to work?
[G2 and Desire Z Android Development] reethu:
I think it is not easy to use
[G2 and Desire Z Android Development] guhl99:
so what?

it is a complicated security system that you are trying to break.

If you want, try this http://xdaforums.com/showthread.php?t=857537
[G2 and Desire Z Android Development] cbmm:
i restored to cyanogen rom from november. used the adb method, didnt get any errors. ran gverify just to double check and everything passed. thanks for fyi on the quote as well
[G2 and Desire Z Android Development] SFVDan:
I was on the Virtuous latest ROM and latest kernel (1.0.5). Needless to say, I didn't expect it to work. So I flashed the stock ROM (rooted) & kernel and had no problems getting this to work the first time. Reflashed Virtuous and I am in business. It's a thing of beauty. :)
[G2 and Desire Z Android Development] wpickel:
So i haven't seen anything on this.

Once I have used gfree to completely free the phone, can I upgrade CM or kernels?
[G2 and Desire Z Android Development] J-Hop2o6:
oh ok.. u must of been using CM6.1.1 huh? that doesn't work with gfree.

yea, ppl should just run gfree first, THEN do all the extra stuff cuhz there are some kernels that'll prevent gfree from syncing/finalizing.

thats what it says in the first post.
[G2 and Desire Z Android Development] steviewevie:
Once you have root and S-OFF then you can flash custom recovery, custom ROMs, custom kernels etc.
[G2 and Desire Z Android Development] taz4101:
is there anyway to do the gfree S-OFF without abd? I already permarooted with visionary running cyanogen 6.1.1. could it be done via terminal emulator and root explorer?
[G2 and Desire Z Android Development] urmybaby:
thank you very much
[G2 and Desire Z Android Development] steviewevie:
Yes, you just need to use another way to copy the necessary files to your SD card - e.g. mounting the SD card on the PC via USB sharing/disk drive mode, physically putting your SD card into a card reader, etc.
[G2 and Desire Z Android Development] jojo_16:
Yeah I did mhyne thru terminal emulator I forgot the instructions though but I still remember who I followed I think post 51 or 54 in this thread I'm using XDA app that's y I cannot find the post :lazy:
[G2 and Desire Z Android Development] brzgw:
Is gfree going to work with CM7 RC0 kernel 2.6.32.27-cyanogenmod?
[G2 and Desire Z Android Development] J-Hop2o6:
try it.. if not, flash a compatible kernel, then flash back to the kernel thats in CM7 RC0.
[G2 and Desire Z Android Development] deliberate187:
You can indeed update kernels now. You only needed the stock kernel to use gfree. Now that you've got all it has to offer, you can use any kernel you want.
[G2 and Desire Z Android Development] fattire:
Quick note--

if you have a DZ with the newer update that wont' work with rage, scotty2 found another exploit so you're good to go...
[G2 and Desire Z Android Development] zoranb:
Hello, im too rookie for this stuff, am i in the right thread? i want to unlock my HTC G2 so it can work in Europe and Australia, but i have no idea about the commands described here. Is there a video tutorial perhaps or someone that can guide me step by step?

(sorry for my noobyness :D)
[G2 and Desire Z Android Development] deliberate187:
They all involve command lines and tools. If you just want to unlock, call T-Mobile and you'll get a code within 14 days to unlock. The rest of the stuff such as SuperCID and S-OFF is for installing custom ROMs.
[G2 and Desire Z Android Development] BouRRi_GSM:
wiki boot (boot-new.img) can't be writen in HTC magic 32B

when other offitial boot can be written without error.

any old ROM with old kernel work for 32B.

br:)
[G2 and Desire Z Android Development] steviewevie:
You're in the wrong forum. This is the Vision forum, you need the Magic forum.

Sent from my HTC Desire Z
[G2 and Desire Z Android Development] awryter:
Can anyone help me figure this out?

I can't seem to find a compatible kernel to use with gfree. I tried when using Virtuous ROM and it failed, then upgraded to CM6 with pershoot and that failed too. Now I'm stuck on CM7 (crackflasher version) and it won't work either. Whenever I run gfree_verify, my CID is TMO and my Security is still 1 which is locked. The only thing that is unlocked is the SIM card because I paid for an unlock previously.

Anyone know if there's a CM7-compatible kernel I can use to run gfree?

Thanks.
[G2 and Desire Z Android Development] renn9420:
Just use CM 6.1.0 without Pershoot's kernel. Like OP mentioned. Then once you get Gfree to S-Off then you can update to CM 6.1.1 or whatever. It helps to totally read the first post.

Phone: T-Mobile G2/Vision Rooted/GFree'd

Rom: Latest Cyanogen

Recovery: CWM-PSFreedom 0.3.3
[G2 and Desire Z Android Development] awryter:
Don't mean to be rude, but I read the post. I was asking if there was a current CM7-compatible kernel that could be used for gfree.
[G2 and Desire Z Android Development] renn9420:
Sorry but I'm saying that in order to get gfree'd you must have Cyanogen stock kernel and it works on CM 6.1.0 then you can flash to 6.1.1 or another rom and different kernel. And if you want to go back S-On then flash back to CM 6.1.0 to change gfree cuz it wont work on later updates such as 6.1.1 or CM 7. For some reason it wont place nice with the newer kernels.

Phone: T-Mobile G2/Vision Rooted/GFree'd

Rom: Latest Cyanogen

Recovery: CWM-PSFreedom 0.3.3
[G2 and Desire Z Android Development] jadams630:
Hey, guys sorry for the noob ? But how do I get gfree into data/local. And I cant even create a folder named data/local. Any help would be very helpful thanx
[G2 and Desire Z Android Development] tronmech:
You have to do it from adb. I just set up an ubuntu vm using vmware to do it since windows was being windows, a bit of a pain since I needed to install eclipse and the whole adk all over again. BUT I NOW HAVE ROOT!¡!¡! And s-off, and sim unlock, etc.
[G2 and Desire Z Android Development] steviewevie:
There should already be a folder called /data/local on your phone. Note the slash in front of the path name, if you leave that out then it probably won't work, as you have found (absolute pathnames vs relative pathnames).

Sent from my HTC Desire Z
[G2 and Desire Z Android Development] jadams630:
On the sdcard or on the phone itself? Because there is not on either, there is a folder named .data bu thats it
[G2 and Desire Z Android Development] jadams630:
Can someone make a wiki of this way not using adb
[G2 and Desire Z Android Development] renn9420:
@hadams630

You can't see the folder with astro file manager you need something like root explorer. Then you can see all the files in /data

Phone: T-Mobile G2/Vision Rooted/GFree'd

Rom: Latest Cyanogen

Recovery: CWM-PSFreedom 0.3.3
[G2 and Desire Z Android Development] steviewevie:
I am not sure if you are looking in the right place. On your phone, if you do "cd /data" and then do "cd local" you should see it there (e.g. if you then run an "ls" command to show the contents of the directory"

Sent from my HTC Desire Z
[G2 and Desire Z Android Development] steviewevie:
What problems are you having with adb ? Post up on that in the "adb for noobs" thread.

Sent from my HTC Desire Z
[G2 and Desire Z Android Development] jadams630:
Well I don't have a problem with it , I've just never messed with it. I'm not a dev just trying to get around installing a bunch of stuff on my computer that I probably won't use other than just for this
[G2 and Desire Z Android Development] steviewevie:
It's useful for the messing around on your phone that most people who hang out on this forum do. You don't have to be a dev to benefit from it.

Sent from my HTC Desire Z
[G2 and Desire Z Android Development] bguzmanz2:
if i have perm root and a custom rom can i just flash this over it (after i wipe first =). i had a nexus one and loved cyanogen's roms. just got my g2 recently and looking to once again enjoy cyanogen's roms. thanks guys.
[G2 and Desire Z Android Development] steviewevie:
You will need to have S-OFF before you can flash a custom ROM.

Sent from my HTC Desire Z
[G2 and Desire Z Android Development] bguzmanz2:
not sure i understand you, i am using custom roms, was using visionary's latest rom and then i tried muiu. currently i'm running cyanogen 6.1. Ive read that i need cwr 3.0, is that the only prerequisite?

i do have s-off =)
[G2 and Desire Z Android Development] J-Hop2o6:
^^ CWM 3.0 is needed for CM7 (aka Gingerbread). CWM3.0 is NOT able to backup a FroYo rom.
[G2 and Desire Z Android Development] jojo_16:
I did this from using terminal emulator tutorial on post #57 but I think you should learn how to use ADB, steviewevie taught me a couple of weeks ago he'd be happy to teach you with every single question you have.
[G2 and Desire Z Android Development] mrbmg:
I rooted a few monthes ago and used visionary, going to do my wifes phone tonight and will for sure use adb and copy/paste straight from the wiki...
[G2 and Desire Z Android Development] ilostchild:
You can do this in terminal.. just put files in sdcard.. then go in terminal

Su

cp /sdcard/file name here /data/local

The you do

chmod 777 /data/local/filename here

Sync

Reboot
[G2 and Desire Z Android Development] zbrah:
when use gfree by just putting them on your phone do you put them in the gfree folder or just each file indidivually onto the sd card using these commands

su

cd /data/local

cp /sdcard/download/gfree/gfree /data/local

chmod 777 gfree

./gfree

sync

Reboot
[G2 and Desire Z Android Development] zbrah:
after chmod 777 gfree

i got error no such file or directory
[G2 and Desire Z Android Development] zbrah:
this is what i did i unzipped the gfree folder on my computer then put the 6 files onto my sd card

opened terminal emulator

su

cp /sdcard/gfree /data/local

chmod 777 /data/local/gfree

sync

but after chmod 777... i got error no file directory found

i think i am typing the wrong commands, what should i type in?
[G2 and Desire Z Android Development] zbrah:
su

cd /data/local

cp /sdcard/gfree/ data/local

chmod 777 gfree

./gfree

sync

would this be the right commands if i put the unzipped files on to the sd card
[G2 and Desire Z Android Development] zbrah:
how do i move gfree into data/local
[G2 and Desire Z Android Development] mrbmg:
I believe you actually extract the file from the zip and stick the actual file on your sdcard in no folder.
[G2 and Desire Z Android Development] steviewevie:
You are missing a / , that should be :

cp /sdcard/gfree /data/local

Sent from my HTC Desire Z
[G2 and Desire Z Android Development] SmartBrother90:
help

ever since i used this..my phone randomly reboots..and ive tried different rooms..villain's sense & gingerbread and deodexed stock roms..and the issue persist..it happens if randomly when i slide the phone open or if its been sitting idle for a while
[G2 and Desire Z Android Development] DJMartini:
Edit: Was able to get this. Scotty helped me on IRC ... Come to find out gfree doesn't work with newer kernels and has to be done with stock kernel.

Worked like a Charm!
[G2 and Desire Z Android Development] roxrox:
I am trying to unlock my Wildfire using gfree and have succeded in rooting the phone as i now have superuser icon in menu.

I used the instructions in this link to unlock;

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

but rooted the phone using; Unrevoked 3.32

The problem i keep getting is shown in the adb log below i get to this stage;

More info (not sure what info is needed to help so i will post everything);

Kernel : 2.6.29-6fb59e13

firmware 2.1-update 1

baseband 13.45.55.24H_3.35.15.31

HBOOT=0.80.0007

Radio-3.35.15.31

All i keep getting is eMMC... Failed. module failed to load: exec format error

I am a bit of a noob when it comes to Android and HTC phones, so please be gentle, i thought i did everything right.

Any help would be gratefully appreciated and thanks in advance
[G2 and Desire Z Android Development] renn9420:
Don't know if gfree will work on other phones except G2 or DZ. I could be wrong....

Phone: T-Mobile G2/Vision Rooted/GFree'd

Rom: Latest Cyanogen

Recovery: CWM-PSFreedom 0.3.3
[G2 and Desire Z Android Development] roxrox:
From what ive read elsewhere i heard it works on some wildfires?? Could anyone please confirm this as i read this in another forum.

P.S. I have also tried running the above code on the wildfire itself using terminal emulator & with gscript as someone mentioned here in a previous post but still the same error: eMMC... Failed. module failed to load: exec format error.

Just a note :- "S-on" is still showing on screen when i hold home button and power on

Any help with unlocking this with gfree would be gratefully appreciated. Also how can i unroot the phone using unrevoked? From what i can tell the program automatically makes a recovery image?

BR
[G2 and Desire Z Android Development] roxrox:
Apparently Wildfire has NO eMMC ... which makes sense why gfree_02 doesnt work, i was obv given wrong info!

Thanks anyway

BR
[G2 and Desire Z Android Development] twainpeare:
I'm hoping for some assistance. I was able to root my G2 using gfree. No errors. I have root access and using gverify returns the flags as desired.

@CID: 11111111

@SIMLOCK = 00

@secu_flag: 0

The phone works fine with my t-mobile sim card in it. When I pop in my AT&T sim, however, I get "No Service". Obviously, the phone is unable to take or receive calls. I can use the same sim card in a different phone. I'm running the stock t-mobile 2.2 version.

Baseband: 26.02.02.26_M

Kernel: 2.6.32.17

Anyone have any ideas? Is it a problem of the baseband I'm currently using or the stock rom? Any advice as to what alternatives to try?

Thanks,

J
[G2 and Desire Z Android Development] zbrah:
how do i do this?
[G2 and Desire Z Android Development] Athrun88:
Hello, I have tried to follow the instructions on the first post. I am able to get root (I can only assume because Superuser appears in my app drawer) but when checking the other two points, S-ON is there also the SIMLOCK is still locked.

when in adb shell,

$su

su

su: permission denied

the above appears. any tips on how to proceed? perhaps i missed something? i am totally new with adb so any help would be appreciated. Thank you.

EDIT: Had the guide mixed up with another wiki. Didn't have permaroot so obviously didn't give me su permissions. Live and learn, right? Thank you so much for the guide!
[G2 and Desire Z Android Development] andrewilley:
[Sorry for the double posting, thought this might be a better thread]

I have a UK Desire-Z, the very first 'day one' non-contract release from HTC, which I perm-rooted with Visionary and installed the eng hboot a while ago. No other changes to default ROM or radio.

I thought it was about time I set radio S-OFF (so I can start trying upgrading or flashing new ROMs) which I thought should be a simple matter using gfree on top of what I've already done, but it does not report S-OFF. The phone is already non-contract so the sim_unlock and cid set parts don't worry me so much.

Details:

I first uninstalled the Visionary app from the phone as recommended, then used ADB to push gfree and gfree_verify to data/local and ran (in ADB SHELL, su) "./gfree -f" which resulted in:

--secu_flag off set
--cid set. CID will be changed to: 11111111
--sim_unlock. SIMLOCK will be removed
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.21-gd2764ed
New .modinfo section size: 204
Attempting to power cycle eMMC... OK.
Searching for mmc_blk_issue_rq symbol...
- Address: c02a6a54, type: t, name: mmc_blk_issue_rq, module: N/A
Kernel map base: 0xc02a6000
Kernel memory mapped to 0x40011000
Searching for brq filter...
- Address: 0xc02a6a54 + 0x34c
- ***WARNING***: Found fuzzy match for brq filter, but conditional branch isn't
. (0xea000012)
Patching and backing up partition 7...
patching secu_flag: 0
Done.

Then I did a "sync". However those warning messages above worry me.

Then, to test it, I did "stop ril-daemon" and then "./gfree_verify" which resulted in:

gfree verify_cid returned: AT
gfree verify_secu_flag returned:
OK
ATV1
OK
gfree verify_secu_flag returned: ATV1
gfree verify_secu_flag returned:
OK
gfree verify_simlock returned: AT@CID?
gfree verify_simlock returned:
@CID: HTC__001
OK
AT@SIMLOCK?AA
gfree verify_simlock returned:
@secu_flag: 1
OK
AT@SIMLOCK?AA

Which does not look right, looks like nothing has been changed. Any ideas what I'm doing wrong? Should I try to put the part7backup file which was created on the sdcard back in place? (How do I do that by the way?)

Thanks for any help anyone can offer,

Andre
[G2 and Desire Z Android Development] renn9420:
@Andre

What rom are you running when trying to gfree?

Phone: T-Mobile G2/Vision Rooted/GFree'd

Rom: Latest Cyanogen

Recovery: CWM-PSFreedom 0.3.3
[G2 and Desire Z Android Development] andrewilley:
Just the stock HTC Desire-Z inititial UK release, I've not even allowed it to do the OTA update. I want to make sure I've got full radio S-OFF before messing around with changing the rom or radio. Kernel version is 2.6.32.21-gd2764ed (26-Oct-10).

Andre
[G2 and Desire Z Android Development] renn9420:
Think you should try flashing either busybox from the Android Market and for sure try flashing CyanogenMod 6.0.0 and then running the Gfree mod. That should work because it worked for me.

Phone: T-Mobile G2/Vision Rooted/GFree'd

Rom: Latest Cyanogen

Recovery: CWM-PSFreedom 0.3.3
[G2 and Desire Z Android Development] andrewilley:
Bit puzzled there. I don't know exactly what busybox is (apart from some generic low level linux system tools) but how would flashing CyanogenMod help me, won't that just put in a new ROM and wipe my current Sense system? (which I most certainly don't want to do). As I said, I ideally want to get full root/radio S-OFF before I even think of flashing any new ROMs, and if/when I do it will be a Sense one.

Andre
[G2 and Desire Z Android Development] guhl99:
Hi !

I assume that you are using gfree version 0.4?

If yes, try to use version 0.2 which is attached to this page http://www.thinkthinkdo.com/trac/project1/wiki/gfree.

We know that the version of wpthis that is embedded in gfree version 0.4 has problems with some desire z's (mostly from the UK).

gfree 0.4 has an option to restore a backup that it created earlier but this won't work on your phone because it is not able to powercycle the emmc.

if you really have to you would have to do the following:

1. use gfree 0.2 again to powercycle the emmc (i.e. using just the -s off option) (-> This will create another partition 7 backup so make sure that you use your first and original one in the next step)

2. use dd to copy back the partion 7 backup using dd

dd if=/sdcard/part7backup-<time>.bin of=/dev/block/mmcblk0p7

See also the XDA wiki on how to go back to stock http://xdaforums.com/wiki/index.php?title=HTC_Vision#Returning_to_Stock.

You would need a different stock rom because you have a DZ but the rest is the same.

have fun Guhl
[G2 and Desire Z Android Development] andrewilley:
Thanks for your help, much appreciated.

I was using gfree02, didn't actually know there was an 04.

Other than using the Visionary+ hack to get basic permroot, my phone is stock, still with its original HTC-shipped ROM (the very first one for the DZ, as I bought the phone the day it came out).

According to the 'Return to Stock' thread, I can only do that if I have got Radio S-OFF though, which is where I've got the problem of course - and wouldn't that wipe the phone anyway? (Not really ready to try that yet, I've not even got ClockworkMod in place to back it up first!).

Is it worth using gfree04 to try to put the original partition 7 back into place, and then trying gfree04 again to see if that then works with the -f option? Is putting the old partition 7 back in place really as simple as just using that copy command you listed, as if so I'll probably try it manually.

The original root went so smoothly for me, even when others were having problems, bother.

Andre
[G2 and Desire Z Android Development] guhl99:
Well first off all it is really astonishing that gfree 0.2 fails to powercycle the emmc. You could try to install a kernel that is known to work (see the wiki)

Regarding your questions about going back to stock:

Up to now you still have your original partition 7 because gfree fails to modify it. Visionary temporary disabled the write protection of the emmc and installed the files necessary for root (busybox, su and Superuser.apk) but did not touch your partition 7.

If you install the original ROM as described in the guide you will be back to stock.

Background info about writing to/restoring the partition 7:

In principle you can just use dd as described above to copy the backup back to the partition but the partition 7 is write protected by two mechanisms:

1. The emmc chip of you phone is write protected until you are S-OFF and even then a certain area of your phone (the radio partitions) stay write protected.

- gfree power cycles the emmc chip so that it drops the write protection of all parts of the chip.

2. The kernel has a filter in the block driver of the emmc that prevents linux from writing to addresses below address 131072 which is where partition 7 is. If you intend to write to an address below this address the kernel generates a bug and the phone reboots.

- gfree tries to find this bug in the kernel in memory (this is the fuzzy search in the gfree output) and patches it.

In your case the first step failed (which is still very astonishing) because if the second step would have failed the phone would have rebooted.

Maybe you try the procedure again and be sure that you do a sync after gfree and give it some time to really write to the chip.

If it fails again and you really want to work on it you could try to find me on irc (freenode #G2ROOT) and we could try to find the reason.
[G2 and Desire Z Android Development] funkeee:
Hey folks. Trying to do the gfree method to get new radios. I permarooted through rage, and downgraded from CM7 to 6.1.1 by nandroid to get a workable kernel.

Everything seems to work fine:

# ./gfree -f
./gfree -f
--secu_flag off set
--cid set. CID will be changed to: 11111111
--sim_unlock. SIMLOCK will be removed
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.27-cyanogenmod
New .modinfo section size: 208
Attempting to power cycle eMMC... OK.
Searching for mmc_blk_issue_rq symbol...
- Address: c02e8994, type: t, name: mmc_blk_issue_rq, module: N/A
Kernel map base: 0xc02e8000
Kernel memory mapped to 0x40009000
Searching for brq filter...
- Address: 0xc02e8994 + 0x34c
- 0x2a000012 -> 0xea000012
Patching and backing up partition 7...
patching secu_flag: 0
Done.
# sync
sync
#

But when doing gfree verify after a rebooting, nothing has changed:

./gfree_verify
./gfree_verify
gfree verify_cid returned:
@CID: T-MOB010

OK

gfree verify_secu_flag returned:
@secu_flag: 1

OK

gfree verify_secu_flag returned:
@secu_flag: 1

OK

gfree verify_secu_flag returned:
@secu_flag: 1

OK

gfree verify_simlock returned:
@SIMLOCK= 01

OK

gfree verify_simlock returned:
@SIMLOCK= 01

OK

gfree verify_simlock returned:
@SIMLOCK= 01

OK

#

I have attempted it twice. I'm not sure why this isn't working for me. Any ideas are much appreciated.