| 1 | ###CHAPTER ONE - UGLY WINDOWS STUFF | 
|---|
| 2 |  | 
|---|
| 3 | #How to open a cmd in platform-tools: | 
|---|
| 4 | open 'my computer' and navigate to your 'AndroidSDK' folder | 
|---|
| 5 | hold the shift button and right click on your 'platform-tools' folder | 
|---|
| 6 | choose 'open cmd here' from the dropdown | 
|---|
| 7 |  | 
|---|
| 8 | #How to pastebin: | 
|---|
| 9 | right click in your cmd and select 'mark all' | 
|---|
| 10 | hit enter to copy | 
|---|
| 11 | go to pastebin.com, paste there and hit 'submit' | 
|---|
| 12 | give us the url | 
|---|
| 13 |  | 
|---|
| 14 | # md5 for windows | 
|---|
| 15 | http://getmd5checker.com/ | 
|---|
| 16 | http://db.tt/6v8JWBa | 
|---|
| 17 |  | 
|---|
| 18 | #adb for noobs | 
|---|
| 19 | http://forum.xda-developers.com/showthread.php?t=865685 | 
|---|
| 20 |  | 
|---|
| 21 | #get rom.zip from ruu.exe | 
|---|
| 22 | start the exe, don't click 'next', start explorer and type %temp% in the adress bar. | 
|---|
| 23 | look in all the folders starting with a { sign and also in the sub directories if it also starts with a { sign, in one of the | 
|---|
| 24 | subdirectories there should be a rom.zip file | 
|---|
| 25 | copy this rom.zip to your SD-Card and rename | 
|---|
| 26 |  | 
|---|
| 27 |  | 
|---|
| 28 | ###CHAPTER TWO - random cool stuff. | 
|---|
| 29 |  | 
|---|
| 30 | #CHECK THE RADIO - gfree does not work on new radios!!!!!!!!!!!!!!! | 
|---|
| 31 | #sdcard is not executable, so no chmod on it. it is possible in /data/local/tmp | 
|---|
| 32 | #there is no SHIP HBOOT with FAKE S-OFF | 
|---|
| 33 |  | 
|---|
| 34 |  | 
|---|
| 35 |  | 
|---|
| 36 | #check the md5 of an img (recovery in this case) that is smaller than the partition it resides in | 
|---|
| 37 | dd if=/dev/block/mmcblk0p21 bs=<size of the .bin in bytes> count=1 | md5sum | 
|---|
| 38 | #mmcblk0p<partition number here> | 
|---|
| 39 |  | 
|---|
| 40 |  | 
|---|
| 41 |  | 
|---|
| 42 | #dz 2.2 downgrade guide: | 
|---|
| 43 | http://wiki.cyanogenmod.com/wiki/HTC_Desire_Z:_Firmware_Downgrade_%28Froyo%29 | 
|---|
| 44 |  | 
|---|
| 45 | #gingerbread 2.3.3 and 2.3.4 downgrade | 
|---|
| 46 | http://forum.xda-developers.com/showthread.php?t=1178912 | 
|---|
| 47 |  | 
|---|
| 48 | #ACE 3.1x (sense 3) downgrade: | 
|---|
| 49 | http://forum.xda-developers.com/showthread.php?t=1424023 | 
|---|
| 50 |  | 
|---|
| 51 |  | 
|---|
| 52 | #goldcard | 
|---|
| 53 | http://www.thinkthinkdo.com/trac/project1/wiki/flashgc | 
|---|
| 54 |  | 
|---|
| 55 | download flashgc to your platform-tools folder: http://www.thinkthinkdo.com/trac/project1/raw-attachment/wiki/flashgc/flashgc | 
|---|
| 56 | adb push flashgc /data/local/tmp/ | 
|---|
| 57 | adb shell | 
|---|
| 58 | cd /data/local/tmp | 
|---|
| 59 | chmod 755 flashgc | 
|---|
| 60 | ./fre3vo -debug -start FAA90000 -end FFFFFFFF      (or ./psneuter) | 
|---|
| 61 | when it kicks you out of the shell | 
|---|
| 62 | adb shell | 
|---|
| 63 | cd /data/local/tmp | 
|---|
| 64 | ./flashgc | 
|---|
| 65 | exit | 
|---|
| 66 | flash the rom | 
|---|
| 67 |  | 
|---|
| 68 | #find the software version (to check if misc_version did its job) | 
|---|
| 69 | dd if=/dev/block/mmcblk0p17 skip=160 bs=1 count=10 2>/dev/null; echo | 
|---|
| 70 | dd if=/dev/block/mmcblk0p17 bs=1 skip=160 count=10 | 
|---|
| 71 |  | 
|---|
| 72 | #find the cid stored in partition7 | 
|---|
| 73 | dd if=/dev/block/mmcblk0p7 bs=1 count=8 skip=512 2>/dev/null ; echo | 
|---|
| 74 |  | 
|---|
| 75 |  | 
|---|
| 76 | #find the cid stored in partition17 | 
|---|
| 77 | dd if=/dev/block/mmcblk0p17 bs=1 count=8 | 
|---|
| 78 |  | 
|---|
| 79 |  | 
|---|
| 80 |  | 
|---|
| 81 |  | 
|---|
| 82 | #check s-off with dd (Guhl, 07.11/11) | 
|---|
| 83 | dd if=/dev/block/mmcblk0p7 bs=1 count=2 skip=2559 | /data/local/tmp/busybox hexdump -C | 
|---|
| 84 | # if the output is (first line): 00000000 ff 00  - S-OFF | 
|---|
| 85 | #                                00000000 ff 01  - S-ON | 
|---|
| 86 |  | 
|---|
| 87 |  | 
|---|
| 88 |  | 
|---|
| 89 | #mount /system as rw | 
|---|
| 90 | mount -o remount,rw /dev/block/mmcblk0p25 /system | 
|---|
| 91 | mount -o remount,rw /system                             (because it is in the fstab - Guhl) !!!!!!!! | 
|---|
| 92 | #mount /system ro | 
|---|
| 93 | mount -o remount,ro /dev/block/mmcblk0p25 /system | 
|---|
| 94 | mount -o remount,ro /system | 
|---|
| 95 | #mount /cache | 
|---|
| 96 | mount /dev/block/mmcblk0p27 /cache | 
|---|
| 97 | #mount /data | 
|---|
| 98 | mount /dev/block/mmcblk0p26 /data | 
|---|
| 99 | #mount a partition as executable | 
|---|
| 100 | mount -o remount,exec /dev/block/<partition> | 
|---|
| 101 |  | 
|---|
| 102 |  | 
|---|
| 103 |  | 
|---|
| 104 |  | 
|---|
| 105 | #install dz hboot, recovery and radio | 
|---|
| 106 | http://www.virtuousrom.com/2011/06/t-mobile-g2-users-migrating-to-desirez.html | 
|---|
| 107 |  | 
|---|
| 108 |  | 
|---|
| 109 |  | 
|---|
| 110 |  | 
|---|
| 111 |  | 
|---|
| 112 | *fastboot binary download locations | 
|---|
| 113 |  | 
|---|
| 114 | http://www.thinkthinkdo.com/trac/project1/raw-attachment/wiki/vision_utilities/fastboot | 
|---|
| 115 | http://www.thinkthinkdo.com/trac/project1/attachment/wiki/vision_utilities/fastboot.exe | 
|---|
| 116 |  | 
|---|
| 117 | #usage: http://wiki.cyanogenmod.com/wiki/Fastboot | 
|---|
| 118 | #the .img files can be taken from a nandroid backup | 
|---|
| 119 |  | 
|---|
| 120 | #to flash a pc10img.zip: | 
|---|
| 121 | #- IF NOT IN RUU MODE, SHIP HBOOT WILL NOT FLASH THE ZIP!!!! ## RUU MODE RECREATES PARTITIONS! ## | 
|---|
| 122 |  | 
|---|
| 123 | adb reboot bootloader or fastboot reboot bootloader | 
|---|
| 124 | fastboot oem rebootRUU | 
|---|
| 125 | fastboot flash zip <zipname>.zip | 
|---|
| 126 |  | 
|---|
| 127 | #if fastboot flash zip is run in bootloader mode (eng-hboot needed!), it will only write to partitions, not                             recreate them. #To recreate partitions - fastboot oem rebootRUU | 
|---|
| 128 |  | 
|---|
| 129 | fastboot flash recovery <recovery>.img | 
|---|
| 130 | fastboot flash boot <boot>.img | 
|---|
| 131 | fastboot flash radio <radio>.img | 
|---|
| 132 |  | 
|---|
| 133 | fastboot erase boot | 
|---|
| 134 | fastboot erase userdata | 
|---|
| 135 | fastboot erase cache | 
|---|
| 136 |  | 
|---|
| 137 |  | 
|---|
| 138 | fastboot reboot | 
|---|
| 139 | fastboot reboot bootloader | 
|---|
| 140 |  | 
|---|
| 141 | fastboot boot (boot.img, recovery.img)- for test boot of boot.img or kernel or whatever | 
|---|
| 142 |  | 
|---|
| 143 |  | 
|---|
| 144 | #manual update howto (s-on, no root) | 
|---|
| 145 | http://forum.xda-developers.com/showthread.php?t=1202060 | 
|---|
| 146 |  | 
|---|
| 147 | # check /system, /data and /cache for errors (from root CLOCKWORKMOD RECOVERY console, 'unmount /data' 'unmount /cache' 'unmount /system' first if they are mounted): | 
|---|
| 148 | # e2fsck /dev/block/mmcblk0p25   #- /system | 
|---|
| 149 | # e2fsck /dev/block/mmcblk0p26   #- /data | 
|---|
| 150 | # e2fsck /dev/block/mmcblk0p27   #- /cache | 
|---|
| 151 | #repair with -f | 
|---|
| 152 |  | 
|---|
| 153 | #format system (or any other partition that should be ext 3) | 
|---|
| 154 | mke2fs -m 0 -j -L system /dev/block/mmcblk0p25 | 
|---|
| 155 | #for /cache | 
|---|
| 156 | mke2fs -m 0 -j -L cache /dev/block/mmcblk0p27 | 
|---|
| 157 |  | 
|---|
| 158 |  | 
|---|
| 159 | #tmpfs in recovery, exec /data (Guhl, #g2root, 08.19.2011) | 
|---|
| 160 |  | 
|---|
| 161 | 1. boot to recovery | 
|---|
| 162 | adb shell | 
|---|
| 163 | mount tmpfs -t tmpfs /data -o size=10m | 
|---|
| 164 | 2. in a second terminal: | 
|---|
| 165 | adb push misc_version /data/ | 
|---|
| 166 | 3. in the first terminal (still #-shell) | 
|---|
| 167 | cd /data/ | 
|---|
| 168 | chmod 777 * | 
|---|
| 169 | mount /sdcard | 
|---|
| 170 | ./misc_version -s 1.00.000.0 | 
|---|
| 171 | - thats basically it. reboot the phone and do a normal downgrade using hboot or fastboot RUU | 
|---|
| 172 |  | 
|---|
| 173 |  | 
|---|
| 174 | # mount points in cwm recovery  /etc/fstab | 
|---|
| 175 |  | 
|---|
| 176 | /dev/block/mmcblk0p22 /boot emmc rw | 
|---|
| 177 | /dev/block/mmcblk0p27 /cache auto rw | 
|---|
| 178 | /dev/block/mmcblk0p26 /data auto rw | 
|---|
| 179 | /dev/block/mmcblk0p25 /system auto rw | 
|---|
| 180 | /dev/block/mmcblk1p1 /sdcard vfat rw | 
|---|
| 181 |  | 
|---|
| 182 |  | 
|---|
| 183 |  | 
|---|
| 184 |  | 
|---|
| 185 | #to find the numbers that should be reversed for goldcard | 
|---|
| 186 | cat /sys/class/mmc_host/mmc2/mmc2:*/cid | 
|---|
| 187 |  | 
|---|
| 188 |  | 
|---|
| 189 |  | 
|---|
| 190 |  | 
|---|
| 191 |  | 
|---|
| 192 |  | 
|---|
| 193 | # for people with broken LCD: (thanks to laga_). | 
|---|
| 194 | #the pre-made roms can be found at http://ratherphallic.co.cc/ Say thanks to Nipqer for modifying and uploading the roms. | 
|---|
| 195 | # Guide: http://forum.xda-developers.com/showthread.php?t=1442988 | 
|---|
| 196 |  | 
|---|
| 197 | 58ab6de42f18943c2fec341183396fab  G2_PC10IMG.zip | 
|---|
| 198 | b582005fcb5b88f99eea7a6e6528dedd  MT4G_PD15IMG.zip | 
|---|
| 199 | 621f7c807cde340f1353fc43f34a4ea4  DZ_PC10IMG.zip | 
|---|
| 200 | 8c2f79f0566c5f8965e1540a1f3084d3  DHD_PD98IMG.zip | 
|---|
| 201 |  | 
|---|
| 202 |  | 
|---|
| 203 | Modify a RUU so USB debugging is enabled: | 
|---|
| 204 | * extract rom.zip from RUU.exe (can provide details). | 
|---|
| 205 | * unzip rom.zip | 
|---|
| 206 | * mkdir system && mount -o loop system.img /system/ | 
|---|
| 207 | * add the following lines to system/build.prop: | 
|---|
| 208 | ??? persist.service.usb.setting = 1 ???? | 
|---|
| 209 | persist.service.adb.enable = 1  # last line is the relevant one, i believe | 
|---|
| 210 | * umount system | 
|---|
| 211 | * zip rom.zip * | 
|---|
| 212 | * fastboot oem rebootRUU && fastboot flash zip rom.zip && fastboot reboot | 
|---|
| 213 | This works only on S-OFF devices as the rom.zip is not signed. | 
|---|
| 214 |  | 
|---|
| 215 |  | 
|---|
| 216 |  | 
|---|
| 217 |  | 
|---|
| 218 |  | 
|---|
| 219 | # mt4g root and unlock | 
|---|
| 220 | http://wiki.cyanogenmod.com/index.php?title=TMobile_myTouch_4G:_Full_Update_Guide#Rooting_the_HTC_Glacier | 
|---|
| 221 |  | 
|---|
| 222 | # DHD (incl. 2.3) temproot and downgrade | 
|---|
| 223 | http://forum.xda-developers.com/showthread.php?t=905003 | 
|---|
| 224 |  | 
|---|
| 225 | # Ace rooting | 
|---|
| 226 | http://wiki.cyanogenmod.com/wiki/HTC_Desire_HD:_Rooting | 
|---|
| 227 |  | 
|---|
| 228 |  | 
|---|
| 229 | # cyanogen vision rooting | 
|---|
| 230 | http://wiki.cyanogenmod.com/wiki/TMobile_G2:_Rooting | 
|---|
| 231 |  | 
|---|
| 232 | # rmk's ril automatcher | 
|---|
| 233 | http://forum.xda-developers.com/showthread.php?t=1021463 | 
|---|
| 234 |  | 
|---|
| 235 | # gapps | 
|---|
| 236 | http://goo-inside.me/gapps | 
|---|
| 237 |  | 
|---|
| 238 | # md5 for windows | 
|---|
| 239 | http://getmd5checker.com/ | 
|---|
| 240 |  | 
|---|
| 241 |  | 
|---|
| 242 |  | 
|---|
| 243 | # partition table | 
|---|
| 244 | fdisk /dev/block/mmcblk0 | 
|---|
| 245 | # in the fdisk prompt - p to list the partition table, q to quit). The message "Warning: deleting partitions after 60" does not         matter | 
|---|
| 246 | # sloppy fingers and enter can screw up the emmc partitioning (m for list of all bad stuff that can be done to the emmc) | 
|---|
| 247 |  | 
|---|
| 248 |  | 
|---|
| 249 | # kmsg | 
|---|
| 250 | cat /proc/kmsg | 
|---|
| 251 |  | 
|---|
| 252 | # emmc name | 
|---|
| 253 | cat /sys/devices/platform/msm_sdcc.2/mmc_host/mmc0/mmc0:0001/name | 
|---|
| 254 |  | 
|---|
| 255 |  | 
|---|
| 256 | # the dead M4G2DE emmc cases | 
|---|
| 257 | cat /proc/kmsg | grep mmc0      #search for "mmc0: Deferred resume failed" | 
|---|
| 258 |  | 
|---|
| 259 | # gfree 0.8 to flash hboot. (-w is not the same as in gfree 0.7) | 
|---|
| 260 | In recovery (3.0.2.4) | 
|---|
| 261 | download gfree and gfmod.ko from http://www.thinkthinkdo.com/trac/project1/wiki/gfree_experimental#no1 | 
|---|
| 262 | adb shell mount /data | 
|---|
| 263 | adb push gfree /data/local/tmp/ | 
|---|
| 264 | adb push gfmod.ko /data/local/tmp/ | 
|---|
| 265 | adb push hboot-eng.img /data/local/tmp/ | 
|---|
| 266 | adb shell chmod 755 /data/local/tmp/gfree | 
|---|
| 267 | adb shell | 
|---|
| 268 | mount /sdcard | 
|---|
| 269 | cd/data/local/tmp | 
|---|
| 270 | cat /proc/kmsg > /sdcard/kmsg.log | 
|---|
| 271 | insmod gfmod.ko | 
|---|
| 272 | ./gfree -w no -k no -f -b hboot-eng.img | 
|---|
| 273 |  | 
|---|
| 274 |  | 
|---|
| 275 | # efs wipe | 
|---|
| 276 | http://forum.xda-developers.com/showthread.php?t=1028405 | 
|---|
| 277 |  | 
|---|
| 278 | #desire z, dhd, mt4g unroot and return to stock: | 
|---|
| 279 | two user case scenarios: | 
|---|
| 280 |  | 
|---|
| 281 | 1. you have stock gingerbread on the phone | 
|---|
| 282 | in this case you need to downgrade to froyo:  http://forum.xda-developers.com/showthread.php?t=1178912 -which brings us | 
|---|
| 283 | to: | 
|---|
| 284 | 2. you have a gfreeable froyo: | 
|---|
| 285 | follow this: http://forum.xda-developers.com/wiki/index.php?title=HTC_Vision#Unrooting_and_Returning_to_Stock | 
|---|
| 286 | skip "Install the stock image" - you already have that | 
|---|
| 287 | -scenario 2.1 : you have your partition 7 backup - follow "radio S-ON and original CID" by the word, down to (but not including) | 
|---|
| 288 | "Alternative: Use gfree to get radio S-ON and the original CID" | 
|---|
| 289 | -scenario 2.2 : you don't have your partition 7 backup | 
|---|
| 290 | do the temproot part, then (in adb shell) issue the following command: 'dd if=/dev/block/mmcblk0p17 bs=1 count=8' | 
|---|
| 291 | the output of that command is your CID (8 symbols) - put that one in the place of "T-MOB010' in the | 
|---|
| 292 | '/data/local/tmp/gfree -s on -c T-MOB010' command | 
|---|
| 293 | then finish the guide | 
|---|
| 294 |  | 
|---|
| 295 |  | 
|---|
| 296 |  | 
|---|
| 297 | #ril libs (made for n00b_) | 
|---|
| 298 | # to pull the files from your current rom: | 
|---|
| 299 | adb pull /system/lib/libhtc_ril.so | 
|---|
| 300 | adb pull /system/lib/libreference-ril.so | 
|---|
| 301 | adb pull /system/lib/libril.so | 
|---|
| 302 | # get these files and place them in a folder (on your pc) named "stock_rom_ril" | 
|---|
| 303 |  | 
|---|
| 304 | # to push them in your new rom: | 
|---|
| 305 | # get the rils from a stock rom, move the three files to a folder named "custom_rom_ril" | 
|---|
| 306 | # then open a cmd/shell, navigate to your first folder (the "stock_rom_ril" one) and from there: | 
|---|
| 307 | adb remount | 
|---|
| 308 | adb push libhtc_ril.so /system/lib/ | 
|---|
| 309 | adb push libreference-ril.so /system/lib/ | 
|---|
| 310 | adb push libril.so /system/lib/ | 
|---|
| 311 | # wipe efs data: http://forum.xda-developers.com/showthread.php?t=1028405 | 
|---|
| 312 |  | 
|---|
| 313 |  | 
|---|
| 314 |  | 
|---|
| 315 | #guide to recovery and stuff | 
|---|
| 316 | http://forums.virtuousrom.com/index.php?topic=33.0 | 
|---|
| 317 |  | 
|---|