yashsingh1/xdaforums huggingface dataset:
[G2 and Desire Z Android Development] steviewevie:
You don't need to move the whole contents of the gfree zip file to the phone, the instructions only say to do :

adb push gfree /data/local

- and that's all you need to do. The rest is just source code etc (which I didn't even realise was there until I just went back to download it, and saw the zip had been updated).

Somehow you are not running the "gfree" executable, so I suspect you pushed something else over as "gfree", not the actual "gfree" itself.

I suspect you have missed an error message happening. Were you root when you tried to move gfree to /data/local. The list of error messages that you did show doesn't make any sense, did you cut and paste this from more than one session ? Because you can't try and run ./gfree once and have it not find it, then immediately try ./gfree again and it does something different.

I suggest not wiping the ROM but simply trying the process again from the top.
[G2 and Desire Z Android Development] stevedawg85:
So will this allow me to install clockwork and flash custom roms like CM?
[G2 and Desire Z Android Development] boogie1077:
Sounds like you're having the same problem I had...

When I unzipped gfree.zip to my sdcard, I accidentally created and extracted to /sdcard/gfree/ So the file gfree ended up in the folder gfree... then when I ran the cp command it copied the entire folder instead of just the file and I also got errors running the remaining steps.

So make sure you're copying only the file gfree(no extention) and not an entire gfree folder.

Hope that helps.
[G2 and Desire Z Android Development] boogie1077:
Yes 10char
[G2 and Desire Z Android Development] enrayged:
part of the instructions is to temp root your phone. I did this on my unrooted G2. I had used visionary in the past for temp root but I uninstalled and rebooted before I used this method.
[G2 and Desire Z Android Development] Veiger:
Tried moving it again this time I moved just /sdcard/download/gfree/gfree and I did the steps in the instructions and it works like a charm. Popped in a AT&T SIM and it worked like an dream, only on edge though. Thanks for the gfree program bro.
[G2 and Desire Z Android Development] mytharak:
First of all, I apologize for not reading this whole thread and if it was mentioned already, but is there an MD5sum for the following file to check against?

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

If I'm going to dd this onto one of my nand partitions i NEED to know it's byte for byte exactly what it should be. I also feel that the checksum should be part of the instructions.

EDIT: me and a few others checked it and got {7669AE12DC2FAA10AE555A164980EFD0} if anyone was wondering.
[G2 and Desire Z Android Development] guhl99:
Hi!

The MD5 sum is 7669ae12dc2faa10ae555a164980efd0

And as I stated in the instructions, installing the engineering hboot is optional unnecessary and the most dangerous part of the whole processes.

I would only recommend to do it if you really need fastboot flash functionality. And you should only do it after you got radio s-off using gfree.

And if you want to add it to the wiki, go ahead, it's a wiki

have fun
[G2 and Desire Z Android Development] skiptomylou11:
Oh, awesome. I'm happy to have made that mistake. Thanks!
[G2 and Desire Z Android Development] adrienspawn:
So if I get "Your Sim card does not allow a connection to this netwrok? am I doing something wrong?
[G2 and Desire Z Android Development] guhl99:
Did you do the check procedure to check if you are SIMLOCK: 00?

There is a new easier verify procedure available ( see the gfree_verify section at http://www.thinkthinkdo.com/trac/project1/wiki/gfree )

If the output of gfree is not as specified there then try to do the gfree procedure again. And if you are already using a different kernel then the original stock kernel (i.e. pershoots kernels are known not to work) than try it using a stock kernel.
[G2 and Desire Z Android Development] mrbmg:
Cool. Used visionary awhile back and went back over with this and worked perfect. Did the verify, A+!!
[G2 and Desire Z Android Development] ctraywick1:
So does that mean I could leave tmobile and get a cheap prepaid plan on virgin mobile or something like that?
[G2 and Desire Z Android Development] steviewevie:
Yes, if you are SIM Unlocked then you can use a SIM from another carrier, e.g. someone cheaper. You can still switch to a different SIM from your same carrier if you're still SIM locked though - e.g. if my phone was locked to Vodafone I could get a SIM-only plan from Vodafone and use that SIM.
[G2 and Desire Z Android Development] Perduabo23:
Allright GD it!

:confused: I m frustrated! I am not a developer and so ive a natural learning curve. I've been trying to research and learn to root my HTC tmobile G2. Problem 1; much of what is 'understood' by developers needs to be stated in an obvious way for idiots like me. Problem 2 i cant seem to get my frikkin' digits on sdk tools WITH adb in it even though i reg'd with ANDROID DEVELOPERS. Problem 3 they put instructions on their site to 'create development environments on your machine'; as i stated before, im an illiterate ape when it comes to development. How the hell do I know what package of what 1s and 0s to download? all i wanna do is root my G2 which brings me to problem 4 is there a @#$! Android for Idiots book or ebook, pdf SOMETHING for pete's sake im losing sleep here! HELP!!:eek:
[G2 and Desire Z Android Development] gee one:
Here's the guide:

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

SDK download- no registration required.

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

installation instructions - I think you just want step 2 and 5, skip the rest.

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

Welcome to the forum!
[G2 and Desire Z Android Development] guhl99:
Some of us did not sleep at all or an average of 3-4 hours for about 1.5 month to bring you root and to document the rooting as good as possible.

rooting the G2 is a serious thing and nothing that should be done by a one-click, don't know what I am doing here, way.

You could really try to learn some things about what it means to root and unlock your phone and how it can be achieved before you do it.

Having root access to a linux device that is permanently connected to the internet needs at least a little bit of knowledge and responsibility!

Please read the instructions at http://xdaforums.com/wiki/index.php?title=HTC_Vision#Rooting_the_G2 again.
[G2 and Desire Z Android Development] Perduabo23:
I swear! I really am trying to learn! That's why I have ONLY been reading thus far but, for an unwashed monkey it gets confusing! Thanks anyway for pointers
[G2 and Desire Z Android Development] fattire:
Don't worry... Take a day, do a little reading. It's just a matter of following a series of instructions. The hardest part is probably to understand what your goal is-- ie, do you want to root, get s-off, what is supercid, etc. Be sure to read the wiki linked from the first post.
[G2 and Desire Z Android Development] Ghostcreamy:
Doesn't seem that you can run ADB from a Mac. Do the instructions change for OS X?
[G2 and Desire Z Android Development] gee one:
I always wondered why there was a different version for Mac vs Linux since Macs run Linux under the GUI. Luckily the Mac version of adb is probably the easiest to install.

I'm running adb on OS 10.6.5. You might have to either move adb to someplace in your path, or add android_sdk/tools to your path.

Use the terminal app (Applications/utilities/terminal):

to show you your path if you want to move adb

"echo $PATH"

You might have to use chmod to make the file executable

or you can edit .profile to include your path by adding:

PATH=${PATH}:/somewhere_on_your_Mac/android_sdk/tools

Lastly, Mac have some sort of quarrantine for files that get downloaded from the internet.

"ls -al" might show an @ sign after the permissions

you can use "xattr some_file" to see the restrictions and "xattr -d com.apple.quarantine some_file" to remove them (assuming it's com.apple.quarantine).
[G2 and Desire Z Android Development] wyfha:
thanx for ur help
[G2 and Desire Z Android Development] steviewevie:
I'm working on an adb guide, it's at http://xdaforums.com/showthread.php?t=865685

One thing that I've covered in there, which I haven't seen mentioned elsewhere, is that in the new version of the Android SDK (version 9, covering 2.3), adb is now *missing* from the "Starter" package of the SDK. You have to install the platform-tools add-on to the SDK to get adb now. I mention it in my guide :)
[G2 and Desire Z Android Development] misquia:
I'm having trouble with gfree. Here's the output I'm getting. Could anyone help shine some light on what I'm doing wrong?

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\ED> cd c:\android\platform-tools

C:\android\platform-tools>adb push gfree /data/local
2100 KB/s (134401 bytes in 0.062s)

C:\android\platform-tools>adb shell
$ su
su
su: permission denied
$ cd /data/local
chmod 777 gfree
./gfree -f
synccd /data/local
chmod 777 gfree
./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.17-g814e0a1
New .modinfo section size: 204
Attempting to power cycle eMMC... Failed.
Module failed to load: Operation not permitted
$
[G2 and Desire Z Android Development] steviewevie:
Did you get temp root ok (i.e. a # prompt) before those steps ?

Because your "su" command has failed, so after that the rest won't work (doesn't have the correct permissions). If you got temp root ok, when you run "su" then the Superuser app pops up on the phone and asks if you want to give permission to Terminal Emulator to be root. If you don't say "yes" to that pretty quickly, it gives up then you come back with "permission denied". It helps also to tick the box to ask Superuser to remember that, so it doesn't ask you each time.
[G2 and Desire Z Android Development] olearyp:
<offtopic>Mac OS's Darwin underpinnings are derived from BSD, not Linux, and with very heavy modifications at that, so executables are linked to a different set of system libraries than under a standard Linux system. That's why it's a different download.</offtopic>
[G2 and Desire Z Android Development] Mikey:
If we want to update to the new version, we just follow the instructions as we did for version 01?
[G2 and Desire Z Android Development] steviewevie:
I'm not clear what you're asking. Are you asking about the new version of gfree ? Because the instructions in the first post have changed slightly to reflect the new gfree.
[G2 and Desire Z Android Development] Mikey:
:o They seem the same

Although, just follow the "new" directions even if we have version 01 done?
[G2 and Desire Z Android Development] steviewevie:
Where you run gfree in the latest instructions there's a new "-f" option that's used ;)

Don't run it again if you've already gone through gfree, you won't get anything new. There are new options to undo gfree with the new version now though, see the Wiki.
[G2 and Desire Z Android Development] misquia:
Thanks steviewevie! Just woke up and the first thing I did was read your post. I got it to work after I temprooted with visionary. Now I just need to verify it...
[G2 and Desire Z Android Development] taizh21038:
* SuperCID - enables the flashing of any carrier's firmware for the phone.

So does that means T-mobile G2 could flash the stock Desire Z firmware?

Thang U!
[G2 and Desire Z Android Development] misquia:
It's strange how even after I g-verified my G2 after temprooting it with visionary and using gfree, that after I reboot my superuser permissions are gone and my root is undone. Should I use a different method of temproot or should I just use the permanent root option in the visionary app?

Edit: Okay nevermind, I got it. I just use the temproot method from the XDA-wiki and got it to work even after rebooting!
[G2 and Desire Z Android Development] guhl99:
Yes it means that you could flash it because the security checks that prevent you from doing so are removed.

But this does not mean that it would work. As far as I know the Desire Z firmware has to be modified in some aspects to run on the G2. And it is not definitely not a good idea to flash the complete rom as this would contain hboot and radio which are different.
[G2 and Desire Z Android Development] steviewevie:
Flashing the "wrong" hboot doesn't sound like a good idea. But do we have any evidence that flashing the radio from a DZ to a G2, or vice versa, is harmful ? It would be useful if someone experienced could verify this for sure. The version numbers are in exactly the same numbering sequence across both, e.g. :

T-Mo G2 radio version 12.21.60.09b_26.02.01.15

DZ radio version 12.28b.60.140e_26.03.02.26

The G2 radio just looks like an older version of the same radio on the DZ. Which would be consistent with the fact that it came out earlier.

I suspect the radios can be flashed across both, e.g. just like how radios on my previous phone, WM TP2 could be flashed across different models from different carriers with different radio bands. But it would be nice to know for sure.

I AM NOT RECOMMENDING THAT PEOPLE JUST FLASH AWAY HERE THOUGH. As I said, we really need someone very experienced to try it (i.e. someone who may be able to recover a semi-brick/brick if it doesn't work).

I think the only other problem is because of the different partitioning across the G2 and DZ, and in the days soon after release folks that found flashing a DZ ROM on a G2 (could have been the other way round ?) produced a "too big" error because of the slightly different partitioning sizes.
[G2 and Desire Z Android Development] steviewevie:
Glad you got it working. The fact that you lost it after a reboot means the stuff wasn't actually written to the internal storage of the phone, i.e. the factory write-protection was still on. Probably when the "insmod" command was run it didn't work and you got the "wrong" error message. This is the problem with Visionary, you can't see it working and can't see what it's doing.

Glad it's all working now though, well done :)
[G2 and Desire Z Android Development] renn9420:
My radio is like the DZ. It updated when I installed the OTA then rooted.

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

Rom: Latest Cyanogen

Recovery: CWM waiting for Amon_RA
[G2 and Desire Z Android Development] eViL D::
Now if we were able to customize our NAND layout, this might be really useful. As far as I know, G2 owners will not be able to flash RUU's because of the differing NAND layout. And, yes, all the above is still cool.
[G2 and Desire Z Android Development] stevedawg85:
I am coming from G2 w/ OTA update and would like to have someone help me out.

The wiki states to run gfree temp root and then gfreev02, will this work for me with the specifications I mentioned above?

What does the wiki mean by, "....sdcard is mounted by your phone and not your computer when following these instructions," Is this simply to mount the sd card on the phone and turn the android orange?

Also I am unclear about, "Wait a few seconds for the changes to "take"." Few seconds = 5? 30? What if I wait a minute, any negative affects?
[G2 and Desire Z Android Development] steviewevie:
Use the new version of gfree, as per the Wiki and the first postign in this thread. Yes, it will work for you with the OTA update on a G2.

The bit about your sdcard is telling you to make sure your phone has access to the SD card. Because it will do a small backup onto the SD card. Normally your phone has access to the SD card, including if you connect it to the computer in "charge only" mode, or HTC Sync mode. The phone will prompt you when you connect it to the PC as to which mode to use, unless you told it not to keep asking you - if so, then you can go into Menu->Settings->Connect to PC to change the default connection type (or make it ask you). Don't connect the phone to the PC in the mode that mounts the SD card onto the PC, giving the PC access to the SD card instead of the phone. On the DZ this is called "disk drive" mode, on the G2 I think it's called "USB sharing" or something like that.

The bit about waiting after the sync isn't really something to worry about. It's more not to type "sync" and at the very same time reboot the phone. Waiting literally a few seconds should be fine. No, there will be no negative effects if you leave it for 1 minute, 10 minutes, 1 hour etc.
[G2 and Desire Z Android Development] swags:
To be more clear about the sdcard mounting thing: for most people, simply do nothing when you connect your phone. On the G2, the Android on the USB Mass Storage screen should be green and the message should say "USB Connected".
[G2 and Desire Z Android Development] jclem65:
so i have done this a hundred times....

i cant get adb working on my mac.... so following another thread here i have tried to do this on my phone... i gain temp root with visionary,(open terminal type su and permission is granted) i placed gfree02 file on sd card open terminal type in the comands cd data local...chmod 777 gfree ./gfree -f..and thats where i get access denied? if i had any hair i would be ripping it out right about now.....

any ideas...or is this not going to work with a terminal app on my phone?
[G2 and Desire Z Android Development] sino8r:
This is a bit embrassing but I can't seem to get this method to work. I keep getting error message: "****warning**** did not find brq filter" Everything is set up correctly... proper kernel, adb (of course), files are going to data/local, it makes a backup partition and everything but.... when I run verify, everything is still turned on (shows 1). I already have permanate root from back in the day. This is weird... I know I did everything right. Is it the rom I'm using (stock rooted deodexed) or something stupid like that? I just want to try out some new radios for my G2....

nevermind, turns out you have to be using CM... well at least on the G2. That's kinda stupid, oh well, lol! I lost that last hour, hahhahaha! Flattire, can you update your OP to reflect that? It's quite important to advoid the "brq error"
[G2 and Desire Z Android Development] J-Hop2o6:
^^ gfree didnt work for me at first was because i was using pershoots kernel, which isn't compatible with gfree's sync right now.. so i had to use baconbits (u can use stock kernel also) for gfree to sync.. then i reflashed pershoots kernel again.
[G2 and Desire Z Android Development] renn9420:
Tried to restore Radio S-On, simlock and CID using gfree_02 but won't. Then I think when I renamed my part7-backup.bin to part7-relock.bin it might have made it useless because the md5sum doesn't verify. After I put in last command of dd "of=/dev/block/mmcblk0p7 and press enter it acts like its writing but then all of a sudden reboots. Thought we would be able to unlock/lock thru gfree_02?

NVM: Scotty2 directions were to rename original backup tp something easy like part7-relock.img and keep safe somewhere. And if you want to restore locks then run gfree and when it patches the emmc and makes a backup of the already unlocked phone then you are able to run the dd command assuming you put the original backup back on the root of your sdcard.

So run gfree to make backup of unlocked phone. And patch the emmc.

Then run the command:

dd if=/sdcard/part7-relock.img of=/dev/block/mmcblk0p7

It will relock the phone.

sync (wait about two minutes)

reboot

Well have to go and unlock my phone. Just wanted to see if relock was possible and how to go about it.

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

Rom: Latest Cyanogen

Recovery: CWM waiting for Amon_RA
[G2 and Desire Z Android Development] steviewevie:
It should work fine from a terminal window. Did you place the gfree binary on your phone, not the whole gfree02 zip archive ? The zip file contains a whole load of files, you only need to put "gfree" from there onto your phone, then as you said, chmod it and run it with the appropriate options.
[G2 and Desire Z Android Development] steviewevie:
I don't think it's anything to do with CM, it should work fine on a rooted phone with stock recovery. It may well be a kernel incompatibility as Jhop2o6 said.
[G2 and Desire Z Android Development] steviewevie:
Yes you can, see the new options for this latest version of gfree in the Wiki (would be useful if they were in the first posting too ?) - http://xdaforums.com/wiki/index.php...Phone.2C_Set_SuperCID.2C_and_Turn_Radio_S-OFF

Specifically :

gfree usage:
gfree [-h|-?|--help] [-v|--version] [-s|--secu_flag on|off]
-h | -? | --help: display this message
-v | --version: display program version
-s | --secu_flag on|off: turn secu_flag on or off
-c | --cid <CID>: set the CID to the 8-char long CID
-S | --sim_unlock: remove the SIMLOCK

-f | --free_all: same as --secu_flag off --sim_unlock --cid 11111111

So the "-s" flash can put you back to S-On easily.