HTC Desire: Creating Goldcard Using Mac Or Linux   August 9th, 2010

I have been asked by a few people how to make a goldcard using a Mac, but as I do not have access to one at the moment I have not been able to produce a guide however thanks to Johnny and some research using Google you’ll be pleased to know that I have now produced a guide.

Caveat:  I have not been able to test this myself as currently I do not have a Mac to test with; however I have read various comments confirming that this method works.  Please post a comment to let me know how you get on.

PLEASE backup the entire contents of your microSD before proceeding, in one of the first steps you’ll need to reformat.  I will not be accountable for anyone neglecting to do this and loosing data – you have been warned!

So, to create a goldcard using Mac OSX, simple do the following:

  • Backup the data on your microSD
  • Click Menu on your mobile
  • Go to Settings and then SD & Phone Storage
  • Click Unmount SD card
  • Click Format SD card

We now need to know the microSD cards CID number, using this method; we can find it by going to the market and downloading ASTRO File Manager.  Once you have downloaded and installed it, do the following:

  • Open ASTRO File Manager
  • Navigate to sys/class/mmc_host/mmc1/mmc1:82d1 (you’ll find that 82d1 will be different on your device)
  • Long press on the CID file
  • Select Open As and then Text
  • Select File Editor
  • You’ll be given a long number, make a note of this

Next we need this long number in order to create your goldcard image; this can be done by using a simple tool found on this page:

  • Copy the number carefully into the data field and hit Submit
  • Make a note of the new number

Next to create the actual goldcard image by going to this page:

  • Enter the number from above into the SD Card Serial (CID) field
  • Enter the other details and hit Generate Goldcard
  • Check your email and save the attached goldcard image file to your user directory

Connect your Desire to your Mac and do the following:

  • Pull down the notification bar and press Charge Only (if you have previously changed the default option this may be different, i.e. HTC Sync)
  • Select the Disk Drive option and hit Done
  • On your Mac, open Terminal which can be found by clicking through Applications>Utilities>Terminal (or your Linux Terminal)
  • Type the following:
    diskutil list
  • You should be able to see your microSD card; you can recognise it from its size and by the fact that its type is DOS_FAT_32.  You need to make a note of the Identifier for example disk2s1
  • Now you need to unmount the microSD, assuming your Identifier was disk2s1 (change the value ‘2’  based on the number you got after the word ‘disk’) enter the following:
    diskutil unmountDisk /dev/disk2

Finally, to create your individual goldcard do the following:

  • Open Terminal once again and type the following:
    sudo dd bs=512 if=~/goldcard.img of=/dev/disk2
    (remembering to change the ‘2’ if appropriate)
  • You’ll need to enter your password when prompted (or if using Linux, the password for root)

That’s it, goldcard created!



Tags: , , , , ,
This entry was posted on Monday, August 9th, 2010 at 12:59 pm and is filed under Android OS, Apple, Blah, Desire, Google, HTC, Linux, Linux Mint, Mac OS X, Technology Related, Ubuntu. You can follow any responses to this entry through the RSS 2.0 feed.You can leave a response, or trackback from your own site.

26 Responses

August 11th, 2010 at 3:12 pm
joel Says:

Hello!

I accidentaly semi-brick my HTC Desire when updating to Froyo, now I’m stuck in the white screen with green HTC text, I can enter in recovery mode, but.. as I have not a Gold Card I cant reflash my phone.

Is there a way to know the CID of my microSD card? I found some ways in Internet to read it via the CardReader of my laptop, but for some reason the adb server of the Android SDK says “Device not found”.

Could you help me please? could you sell me a gold card (or just the microSD card and a file with the CID number of the card) and send it to mexico?

August 11th, 2010 at 4:53 pm
Mike Says:

Joel, unfortunately it’s not that simple for me to be able to send one as the CID is unique to your phone/microSD combination.

What process did you follow to flash?

Device not found sounds as if you have not got HTC Sync and/or the correct drivers installed?

If you have anymore information I’ll try to help as much as I can.

August 15th, 2010 at 1:09 am
Lee Says:

Mike, I did something rather silly. I flashed my HTC Desire with Unrevoked 3 and rooted it….I then wanted to put it back to the standard o2 version….so I downloaded the public o2 2.1 version which ended version 1….my Desire was revision 3.

I flashed the phone and now I have no screen…..

I did not make a gold card either and I have a pin number on start up.

There is going to be any way to get my screen working again??? I’m really, really stuck….and I certainly won’t be messing with any further phones….

August 15th, 2010 at 6:08 pm
Alex Says:

the last line needs to be changed to sudo dd bs=512 if=~/goldcard.img of=/dev/disk2

otherwise, it wont point to the correct folder for the goldcard.img

August 16th, 2010 at 10:54 am
Mike Says:

Thanks Alex, not sure how I managed to forget to add the ‘=’, I have updated the post accordingly.

August 16th, 2010 at 10:57 am
Mike Says:

Lee, have a look through the comments on this post, from memory someone else had a similar issue and Timi gave a solution, I can’t check any further from here but can look more for you later when I am home – let me know if you need me to do some digging.

September 8th, 2010 at 2:09 am
Zhao Says:

Why write 512 bytes to your sd card? The godcard.img only has 384 bytes. I think the command should be:

sudo dd bs=384 if=~/goldcard.img of=/dev/disk2

or, just type:

sudo dd if=~/goldcard.img of=/dev/disk2

September 8th, 2010 at 10:16 am
Mike Southby Says:

Hi Zhao, as I mentioned in the post itself I haven’t had access to a mac to test myself so used 512 as a ‘ball park’ figure that I know would work; if the image itself is only 384b then of course you are right.

Feel free to change method slightly according to the actual size you want if you feel the need.

Thanks.

September 11th, 2010 at 3:37 am
fixedarm Says:

what password does it require, FYI i did not setup any password for my mac…so how am i suppose to pass this process??

September 15th, 2010 at 3:33 pm
Goldcard for Rooting HTC Desire - Android Forums Says:

[...] I assume you are using Linux or Mac? Here is a guide to create a gold card using either of those systems, HTC Desire: Creating Goldcard Using Mac Or Linux? | Mike Southby [...]

September 15th, 2010 at 4:02 pm
Mike Southby Says:

Fixedarm, the password that I was referring to was the local root password if asked.

September 18th, 2010 at 9:17 pm
Creare una GoldCard con Mac o Linux « thevenny Says:

[...] guida si basa su questo post del sito di Mike Southby [...]

September 18th, 2010 at 9:27 pm
thevenny Says:

Very thanks for your help.
I’ve traslate this post in italian and I’ve posted it on my Blog, please visit it!

http://thevenny.wordpress.com/2010/09/18/creare-una-goldcard-con-mac-o-linux/

If something on my post it’s wrong or not correct please contact me.

Ps sorry for the bad english.;)

Cheers
Venny

November 19th, 2010 at 11:57 pm
InfernalByte Says:

Very Good, but the heading at the top of the page offers a Mac and Linux guide. I’m a Linux user……. can’t see a guide?

January 6th, 2011 at 3:56 pm
MP Says:

Works like a charm. Fantastic guide, thanks very much.

March 25th, 2011 at 2:16 am
David Says:

I went through this entire thing without a hitch, until I got to the VERY last step. I entered the wrong password when prompted. Now it is saying no such file or directory found for goldcard.img. HELP!? Do I need to redo the whole process? Or save the goldcard.img to a specific location?

April 10th, 2011 at 8:46 pm
kmdk Says:

Ive made one using SDK and not using a android device.

Step1:Get a SDcard and format him using unix command in Fat 32:
newfs_msdos -F 32 /dev/your device

Step2:Ive created a image from my SDcard using dd command:
dd if=/dev/disk1 of=sdcard_image.img
Note:This can take up to 20 minuts …

Step3:Now i opened my Android SDK and created new virtual device and at section sdcard loadet from file and loadet “sdcard_image.img”

Step4:Run emulator and let him runing;

Step5: now opened terminal and changed directory to “platform_tools/”

Step6: Using command “./adb devices”..will give you a feedback about runing or connected devices..my response was:
List of devices attached
emulator-5554 offline

Step7:Now using “adb” find out name of your mmc”
“./adb -s emulator-5554 ls /sys/class/mmc_host/”
In my case response was “mmc0″
After list again:
“./adb -s emulator-5554 ls /sys/class/mmc_host/mmc0″
My response was mmc0:e118;

Step8:Create a directory:
First create a directory somwhere:

“mkdir /Users/kmdk/extracted”;
Step 9:etract files:
“sudo ./adb -s emulator-5554 pull /sys/class/mmc_host/mmc0/mmc0:e118 /Users/kmdk/extracted”

Step 10:Now open finder and go to directory where you extracted files and duble click cid,he will be opened with textedit app by default.Now you have your cid folow steps from main post and generate your goldecard.img and using dd command write her to sdcard.

April 18th, 2011 at 10:12 pm
[guida root+rom] root con unrevoked 3.2.1 piu' installazione ROM (BRAND & NO BRAND) - Pagina 98 - Forum Android Italiano Says:

[...] un problema con la creazione della goldcard: sto seguendo questa guida per linux HTC Desire: Creating Goldcard Using Mac Or Linux? | Mike Southby ho trovato il CID nella scheda ora dovrei inserirlo a questo url http://hexrev.soaa.me/ per [...]

June 5th, 2011 at 3:25 pm
princen Says:

when i get to the password part it wont let me type a password. itll let me hit enter and tell me sorry wrong password but other than that it wont let me type anything. what am i doing wrong?

June 12th, 2011 at 10:25 pm
dan Says:

i get this when i get to stage 3? what is wrong?

“Waiting for flashing to complete…
/home/tc/alpharev.sh: line 331: [: -eq: unary operator expected
/home/tc/alpharev.sh: line 343: [: -eq: unary operator expected
/home/tc/alpharev.sh: line 353: [: -eq: unary operator expected
/home/tc/alpharev.sh: line 361: [: -eq: unary operator expected
/home/tc/alpharev.sh: line 366: [: -eq: unary operator expected”

June 17th, 2011 at 1:26 am
Comhippy Says:

Works perfectly! Thanks! :D
Next step: rooting

Inspire 4G

September 14th, 2011 at 9:32 pm
Braincrank Says:

What password do they want ???

September 14th, 2011 at 10:02 pm
i think i messed it up .....(goldcard) - Android Forums Says:

[...] found this : HTC Desire: Creating Goldcard Using Mac Or Linux | Mike Southby Did all that and at the end it asks for a [...]

July 31st, 2012 at 10:17 pm
jordan Says:

what is the cdi file? all i have is mmc:0001:1,2,2 power subsystem type and event. what is the cid?

April 23rd, 2013 at 6:08 am
property business Says:

My brother recommended I may like this website. He was once entirely right. This post actually made my day. You can not consider just how much time I had spent for this information! Thank you!

Leave a Reply