Goldcard

Before You Begin

  • Some SD cards simply will not work as a “goldcard”. The most likely reason is that the SD card does not have a partition table(MBR) and sector 0 of the card starts with the file system boot sector, So writing the Goldcard image on the SD card will overwrite the boot sector of file system thus rendering the card unusable. You can use HP USB Disk Storage Format Tool to format the card correctly with MBR partition scheme, just make sure to format the card with fat32 file system(This will erase everything that is on the SD card, so backup anything that is on it that you consider important). But If you still cannot get the SD card to work properly, try a different SD card.
  • You will need some form of adapter to connect the SD card to the computer, whether it be a microSD to USB adapter, or a microSD to SD adapter plugged into a SD card slot on the computer.
  • You will need to install the Terminal Emulator from the Android Market.

Creating a Goldcard

  1. Insert the SD card you want use for the goldcard into the device.
  2. Unmount the SD card (Settings » SD card & device storage » Unmount SD card) and then format it (Erase/Format SD card).
    NOTE: This will erase everything that is on the SD card, so backup anything that is on it that you consider important.
    NOTE: Make sure your sdcard was formatted to fat32.
  3. On the device, open the Terminal Emulator and type the following command:
    cat /sys/class/mmc_host/mmc1/mmc1:*/cid

    NOTE: If that does not work, try cat /sys/class/mmc_host/mmc0/mmc0:*/cid
    NOTE: For Desire HD / Inspire 4G phones, try cat /sys/class/mmc_host/mmc2/mmc2:*/cid
  4. A 32 character, alphanumeric code will be displayed. Write it down exactly as it is presented.
  • Go to http://huygens.hoxnet.com/goldcard.html and enter the code as a “normal code”.
  • Once you click on “Download Goldcard”, download/save the binary file.
  • Download & install HxD.
  • Take your SD card out of the device and put it into the SD adapter it came with. Then put that into your computer so it shows up on your computer as Removable Disk.
  • Open the Hex Editor (Run as Administrator if one Vista or Windows 7) and click on the Extra tab, then click on Open Disk. Under Physical Disk select Removable Disk (your SD card you just put into the computer). Make sure to UNcheck “Open as ReadOnly”. Click OK.
  • Goto the Extra tab again and click Open Disk Image. Open up the goldcard.img that you saved from your email. You should now have two tabs, one is the SD card (Removable Disk) and the other is the goldcard.img Press OK when prompted for Sector Size 512 (Hard Disks/Floppy Disks).
  • Click on the Goldcard.img tab and click on the Edit tab and click Select All. Then click on the Edit tab again and click Copy.
  • Click on the Removable Disk tab (Your SD Card) and select offset 00000000 to 00000170 then click on the Edit tab and click Paste Write.
  • Click on File then click Save.
  • Close the Hex Editor.
  • Test what we’ve done:
    1. Take out the memory card from the computer, then put it back in.
    2. Try to open the memory card on the computer (Removable Disk), if it lets you, you are all set. If it asks/tells you to reformat the card, then try steps 13 – 19 again. If it gives you the same error again, then try a different memory card (Erlern said it didn’t work for him until he finally went and bought a Kingston 2GB card, then it worked on that card).
  • You can now use this goldcard to root devices that were previously unrootable!
  • Creating a Goldcard on POSIX

    1. Insert the SD card you want use for the goldcard into the device.
    2. Unmount the SD card (Settings » SD card & device storage » Unmount SD card) and then format it (Erase/Format SD card).
      NOTE: This will erase everything that is on the SD card, so backup anything that is on it that you consider important.
      NOTE: Make sure your sdcard was formatted to fat32.
    3. On the device, open the Terminal Emulator and type the following command:
      cat /sys/class/mmc_host/mmc1/mmc1:*/cid

      NOTE: If that does not work, try cat /sys/class/mmc_host/mmc0/mmc0:*/cid
      NOTE: For Desire HD / Inspire 4G phones, try cat /sys/class/mmc_host/mmc2/mmc2:*/cid
  • Go to http://huygens.hoxnet.com/goldcard.html and input the code as “normal”
  • Once you click on “Download Goldcard”, download/save the binary file.
  • Take your SD card out of the device and put it into your computer, you may need a micro to full size SD adapter. If it doesn’t have an SD card slot, you’ll have to buy a USB card reader, these are US$5 for a cheap one
  • Open a Terminal
  • Determine the device that matches the memory card; executing “dmesg” should show any recent cards/card readers connected to the PC, this is written below as /dev/(usbdevice)
  • Umount the SD card; that depends on your OS
    # umount -l /dev/(usbdevice) # on linux
    # umount -f /dev/(usbdevice) #on mac
  • Execute the following command:
    # dd if=goldcard.img of=/dev/(usbdevice)
  • Test what we’ve done:
    1. Take out the memory card from the computer, then put it back in.
    2. Try to open the memory card on the computer (Removable Disk), if it lets you, you are all set. If it asks/tells you to reformat the card, then try steps 13 – 19 again. If it gives you the same error again, then try a different memory card (Erlern said it didn’t work for him until he finally went and bought a Kingston 2GB card, then it worked on that card).
  • You can now use this goldcard to root devices that were previously unrootable!
  • Content of this page is based on informations from wiki.cyanogenmod.org, under CC BY-SA 3.0 licence.