wiki:gfree

Version 25 (modified by admin, 12 years ago) (diff)

--

gfree (by scotty2)

See http://forum.xda-developers.com/wiki/index.php?title=HTC_Vision#How_To_Get_R.2FW_Access_.28Permanent_Root_.2F_.22Permaroot.22.29 for instructions.

gfree version 0.9 contained in gfree_09.zip

Changes:

  • changed the functionality of the -w (or --disable_wp) option. It is now a yes|no option. Default is yes.
    	-w | --disable_wp yes|no: disable write protect on eMMC
    
  • added the -k (or --disable_kf) option. It is a yes|no option that can be used to turn off (or on) the functionality to remove the kernel filter that prohibits writes to low eMMC areas. Default is yes.
            -k | --disable_kf yes|no: remove kernel filter
    
  • changed the functionality of the -b (or --hboot) option. It calculates and checks md5sums of the partition 18 before the installation (md5sum #1), of the hboot image (md5sum #2) that is to be installed and of partition 18 after the installation (md5sum #3).

If md5sum #1 is equal to md5sum #2 the hboot image is already installed and gfree will skip the installation. The output would be something like:

Backing up current partition 18 and installing specified hboot image...
md5sum #1 = 7669ae12dc2faa10ae555a164980efd0
md5sum #2 = 7669ae12dc2faa10ae555a164980efd0
md5sum #1 == md5sum #2 - the hboot image is already installed -> skipping installation

If this is not the case gfree will write the hboot image to partition 18 and calculate md5sum #3 after the installation.

If md5sum #2 is equal to md5sum #3 the installation was successful and the output would be something like:

Backing up current partition 18 and installing specified hboot image...
md5sum #1 = 7669ae12dc2faa10ae555a164980efd0
md5sum #2 = 2ce1bdd5e4c1119ccfcecb938710d742
Backing up partition /dev/block/mmcblk0p18 to /sdcard/part18backup-1348606912.bin ...
Writing image dz_hboot-eng.img to partition /dev/block/mmcblk0p18 ...
md5sum #3 = 2ce1bdd5e4c1119ccfcecb938710d742
md5sum #3 == md5sum #2 - the hboot image was successfully installed -> OK!

If md5sum #2 is NOT equal to md5sum #3 the installation was NOT successful and the output would be something like:

...
md5sum #3 != md5sum #2 - the hboot image was NOT successfully installed -> PANIC!!!
DO NOT REBOOT and join the IRC channel #G2Root on Freenode for further help!!!

gfree version 0.7 contained in gfree_07.zip

Changes:

  • added -y (or --recovery) option to install a recovery image file to partition 21. It will create a backup file of your existing partition 21 named /sdcard/part21backup-<time>.bin. Please make sure that you are using the correct recovery image file for your device! . You can use -y together with -w: This will disable the write protection of the emmc and install the recovery image but will not change anything in partition 7.

gfree version 0.6 contained in gfree_06.zip

Changes:

  • updated wpthis.h so that it should now also work on the devices where gfree 0.5 did not work and that had to use gfree 0.2.

gfree version 0.5 contained in gfree_05.zip

WARNING if you are using the new -b option then i highly recommend that after running it and syncing you create md5sums of the hboot.img that you installed and /dev/block/mmcblk0p18. This can be done using busybox.

adb push busybox /data/local/
adb shell chmod 777 /data/local/busybox

And then in your temp-root shell (the one with the # prompt)

/data/local/busybox md5sum /sdcard/hboot-eng.img
/data/local/busybox md5sum /dev/block/mmcblk0p18

If the md5sums don't match then first of all - DON'T REBOOT and second run for help at the #G2ROOT IRC channel on freenode.

gfree version 0.5 is known to have problems to disable the write protection on some vodafone desire z devices.

Changes:

  • added -b option to install a hboot image file to partition 18. It will create a backup file of your existing partition 18 named /sdcard/part18backup-<time>.bin. Please make sure that you are using the correct hboot image file for your device! . One can use -b together with -w: This will disable the write protection of the emmc and install the hboot image but will not change anything in partition 7.
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
	-w | --disable_wp: disable write protect on eMMC and remove kernel filter only
        -b | --hboot: <hbootFile>: install hboot from image file 
        -r | --restore <backupFile>: restore partition from backup file
	-d | --debug: enable debug output

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

gfree version 0.4 contained in gfree_04.zip

gfree version 0.4 is known to have problems to disable the write protection on some vodafone desire z devices.

Changes:

  • added -w option to ONLY disable the write protection on eMMC and remove the kernel filter. (this will make no changes to partition 7)
  • added -d option to enable debug output
  • added -r option to restore a backup file of partition 7 that was created during a previous run of gfree.
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
	-w | --disable_wp: disable write protect on eMMC and remove kernel filter only
        -r | --restore <backupFile>: restore partition from backup file
	-d | --debug: enable debug output

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

gfree version 0.2 contained in gfree_02.zip

The new gfree version can be used to go back to S-ON and to set the CID back to whatever 8-character string you want.

It is still to be tested so use it with care.

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

gfree_verify

Short guide how to verify that gfree worked.

Download and unpack gfree_verify.zip and unpack it on your PC.

Copy gfree_verify to the phone:

adb push gfree_verify /data/local

Get a shell

adb shell

In the shell

su
cd /data/local
chmod 777 gfree_verify
stop ril-daemon
./gfree_verify

You should see this output:

gfree verify_cid returned: 
@CID: 11111111

OK

gfree verify_secu_flag returned: 
@secu_flag: 0

OK

gfree verify_simlock returned: 
@SIMLOCK= 00

OK

Start the ril-daemon again by using

start ril-daemon

(or reboot your phone)

gfree Experimental

Attachments (12)