yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] fnordprefect:
For using Linux to generate and write the image (full version of QMAT):

get sdcard serial (using adb shell, or terminal emulator within android): cat /sys/class/mmc_host/mmc1/mmc1:*/cid

start QMAT using wine

byte-wise reverse the serial string using QMAT: Cryptoanalysis Tools/Crypto Toolbox, enter serial in the box left of the "reverse string" button, click button, copy reversed serial string

generate goldcard image: click Hardware Forensics/Generate HTC Goldcard, enter reversed serial string into the "Serialnumber of SD-card" field, press "Save Goldcard Image to file" button, remember filename "goldcard.img" and path ;)

check filesize < 440 byte (otherwise writing this to the beginning of the sdcard would corrupt the partition table): ls -l goldcard.img

if < 440 byte, use dd and a usb cardreader (g1 with usb cable does also work, verified!) (probably you need to be root for that to work) to write the contents of the file "goldcard.img" to the beginning of the sdcard (assumes sdcard is /dev/sdb, might be other, check!): dd if=goldcard.img of=/dev/sdb

done
[G1 Android Development] jaapschaap:
Same here... Someone said it's because i try to flash a img with the wrong CID, but tried both EN (for EU en aus right?) and tried US both not allow error.

In qmat i get the error that i have to register but says that it is flashed so what is it? Not flashed or it does?
[G1 Android Development] viperbjk:
It doesn't flash then. Flashing under unregistered version is only allowed for older goldcards.

Cya,

Viper BJK
[G1 Android Development] jaapschaap:
That' kinda sucks (for me) the only WM mobile in the house right now is a diamond... Without any SD support :P Have to wait :D for a good hack for my G1 without using this tool i ques :S

PS: so is my device (NL) the same as UK/AUS/DE?
[G1 Android Development] viperbjk:
New QMAT version 4.27 fixes issues under linux and some windows pcs not to start.

Cya,

Viper BJK
[G1 Android Development] viperbjk:
New version 4.28 improves GUI.

For older versions ...

CID in QMAT is not the SD Card Serial (CID) but Country ID !!!

Cya,

Viper BJK
[G1 Android Development] Markus31415:
Is it still possible to root the german g1 with QMat 4.28 or was this only possible with version 4.24??
[G1 Android Development] finran:
once more.... :)

i bought qmat... works nice... trying to follow the steps above using linux dd with the generated goldcard.img... everything would be fine if my goldcard would not be only 384 bytes... how would I make it bigger not to kill the partition table? -.-

silly question? i hope not...

thanks guys ;)
[G1 Android Development] viperbjk:
FORGET about the size. It's a fixed size that is needed. It won't kill any partition table.

New version 4.29 out ... fixes some problems with new sd cards.

Cya,

Viper BJK
[G1 Android Development] viperbjk:
Using registered version 4.29, it is now possible not only to write sd card via activesync, but also into a image file.

Cya,

Viper BJK
[G1 Android Development] Markus31415:
And is it also possible to root my g1 with the trail version of QMat?? For example with ActiveSync.
[G1 Android Development] viperbjk:
No. The trial version of QMAT does no longer support it. In respect to HTC, secrecy and our further reversing problems to come with newer devices, we had to remove it. With the generation now in the full version, we are able to limit the generation of cards. Nice side-effect of this is of course the money : We will use the money earned with QMAT ONLY for buying new hardware and donations to support reversing of newer devices to come.

Cya,

Viper BJK
[G1 Android Development] finran:
hmm every time i try to dd if=goldcard.img of=/dev/xyz ... i get no error no problem blah... after that i copy the uk rc7 image to the sd card... works fine as well... but after unmounting the card isnt readable anymore till i reformat it fresh... :/
[G1 Android Development] viperbjk:
Try to unmount and remount first before writing the rom image to sd card.

If that doesn't work, first format sd-card with fat32, make a backup of the card with dd and manually patch the first 0x200 sectors by overwriting with the goldcard image and then dd it back.

Cya,

Viper BJK
[G1 Android Development] Markus31415:
And is it possible to use my mobile car navigation which is based an windows ce instead of a windows mobile device.
[G1 Android Development] viperbjk:
Should also work, although it hasn't been confirmed so far. WM 5/6.x devices are fine.
[G1 Android Development] Markus31415:
I tried it with my mobile navigation yesterday. But i always got the message "not allow". Could it also be, that it doesn't work with the sd card which is getting delivered with the g1??
[G1 Android Development] viperbjk:
Then you didn't use new qmat version OR you didn't select the right device OR the serial ID you entered is wrong (that's why standard cardreader do not work as they generate fake serials).

Cya,

Viper BJK
[G1 Android Development] Markus31415:
But i read out the id with an windows ce based device and everything seems to be correct. So i can't be because of a wrong sd card. Does it matter what manufacture the sd card is from??
[G1 Android Development] viperbjk:
It is independent from the manufacturer, although some people wrote sandisk ones wouldn't work. I got a sandisk, and mine works fine.

Be sure that you set the right security privileges on your pda. See QMAT manual for instructions. Otherwise, the needed dll for raw write cannot be loaded.

Cya,

Viper BJK
[G1 Android Development] Tuxguevara:
When you read out the Serial Number with Qmat, it could be possible (like in my case) that two serial numbers appear in the Input Field. One for the internal Storage of WM Device and one for the SD Card. Could be possible that you have to choose manually the right one (you will notice the right one, because Disk Size is displayed, too).

And, but i don't know if it matters... you should check when you insert the SD Card that it's named also as "Storage Card" or "Speicherkarte" in the File Manager. Mine was renamed as "Speicherkarte2" as i plugged it in. After deleting the existing directory and plugging it in again, it got mounted as "Speicherkarte" again...
[G1 Android Development] jaapschaap:
He Viper... There is comming a Touch pro this way... But he will leef within 3/4 hours, hope you saw my registraytion for QMAT. Can't wait to start (read: get root)!

NEVER MIND I GOT IT :)

Now waiting for the TP to enter the building :P
[G1 Android Development] viperbjk:
jaapschaap, done :)

I got some reports that some sandisk 2gb sd cards do not work. However, we're going to evaluate to see why.

In order to ensure that goldcards aren't spread too much, new goldcard generation has been limited to a number of max. 5 each registered user.

This limit might be increased soon, but we have to stop people trying to sell goldcards on Ebay right now, so sorry for that.

For those trying, remember that in some countries it might be illegal to sell goldcards.

(private use and/or generation of goldcard should not be a problem, but you should check legal issues in your country first)

O.o

Cya,

Viper BJK
[G1 Android Development] phogl:
Hey out there,

tried using a 2gig SanDisk SD -> Didn't work for me. I got a 512 mb one here, also made by sandisk - I'll give it a shot ... I'm getting the CID using the Terminal-Emulator App directly on the G1, this is used to work, isn't it?
[G1 Android Development] Ceased2Be:
Hmm this might be the problem with my g1 too, I was using a 2gb sandisk yesterday and it didn't work. Will try a 1Gb I have lying around somewhere tonight (if I can find it)
[G1 Android Development] phogl:
Still doesn't work, even using the 512mb one. Partition table gets corrupted after dd'ing, so I'll have to reformat ..
[G1 Android Development] jaapschaap:
I'm gonna try a 512Mb M2 card (Sandisk) if it gets killed i don't care :) and maybe it workes so that something for the list with working cards besides micro sd...

NEVER MIND (again) m2 does not fit in a touch pro :P but flashing with my 8gb went perfect!

Otherwise i have to do it on a 8Gb sandisk micro sd but don't want to kill him (yet)
[G1 Android Development] Gedomania:
I really need your help "No Image Found"

I have bought a new Mini SD Card and formated it with FAT32 using Windows ,

afterwards i used Qmat 4.24 to generate a Goldcard for dream with my old Windows Mobile Device,

it said that that was sucessfull.

Then downoaded the RC7 and copied the DREAIMG.NBH to the root of the SD Card using my Cardreader.

I inserted the Card into the G1 and powerd On the Device by holding Camera Button and Power button,

and then it comes:

No Image File Found and I got stucked in the Boot Loader.

I even tryed another Card (the one originally shipped with the G1)

and also the RC29 DREAIMG.NBH i got the same result,

can somebody pleas tell me what i do wrong?

I also searched the forum but I did not get an proper answer because i really formated with FAT32 , maybe I need to do that with the console?

Help is very much appreciated :)
[G1 Android Development] viperbjk:
Try the following :

- Generate Gold Card (no need if it was already generated to regenerate it)

- Then format goldcard with FAT32

- write DREAIMG.NBH on it ... be sure that it isn't called DREAIMG.nbh or dreaimg.nbh

- be sure that no other file is on it than the DREAIMG.NBH

Cya,

Viper BJK
[G1 Android Development] buffos:
i have tried to create a goldcard, always getting an error...something like tempsd.img wurde nichts gefunden... that i could not understand... and now it says goldcard creation is limited

Well. Limited yes, but after success. Not after errors!!! What can i do now?
[G1 Android Development] Plastriq:
Worked like a charm :) Thanks all of you!
[G1 Android Development] viperbjk:
@buffos:

We'll sort it out. Please contact me via mail or in the revskills.de forum.

This error only occurs if tempsd.img cannot be created. Maybe your disk is full ?

Cya,

Viper BJK
[G1 Android Development] buffos:
Thx.. I did sent an email..

EDIT : No. Disk is over 700GB free and tempsd.img was created, at least i see one in the directory.
[G1 Android Development] dirty_:
I paid for QMAT...got the serial, yeah;)
[G1 Android Development] buffos:
well since all these is manual, it takes about an hour or more.

I also think that probably the way it caused me the trouble was a bad sd (perhaps) but i cannot try it now , so i have to wait. :)

I am certain though , that the counter should reduce after a succesfull image creation.
[G1 Android Development] infl00p:
Just a note, for all of you that still have problems.

Create a partition on the SD card, this method does not work with unpartitioned sd cards. Give a valid partition type. (FAT16, FAT32 etc)

Format that partition on MS Windows as usual.

Transfer files from a Windows PC only. Linux vfat filesystem puts the archive flag on files, thus they are ignored by the bootloader.

Most SD cards already have a partition table but they usually have invalid sizes. Windows partioning tool sucks, either use linux fdisk or a commercial product.
[G1 Android Development] viperbjk:
@buffos

New version 4.30 out

--------------------

What's new :

-------------

- Increased counter to generate max. 15 goldcards

If any errors occur, counter will not increase

- Fixed AT Async Bugs

- Autokill QC Tools and Activesync for easier connection

Cya,

Viper BJK
[G1 Android Development] buffos:
Thx a lot viper. Now it works fine!
[G1 Android Development] Gedomania:
Hey Viper,

I tryed with two cards (formated the goldcard with DREAIMG.NBH and then copied it again on the card)

and still get the same Message "No Image File",

one thing i noticed,

when I generate Goldcard it says Error in the title bar of the messagebox but the message is SD Card Sucessufully created on WinCe Device.
[G1 Android Development] infl00p:
Gedo,

Please read my post,

The reasons that your nbh is ignored are mentioned there.

The bootloader can't locate it, so it displays the no image message.
[G1 Android Development] Ceased2Be:
Ok tried that one as well, partitioned my 1Gb SD card into two 512Mb partitions. put the goldcard.img and DREAIMG.NBH on the primary partition but to no avail. Still get the 'not allowed' error...
[G1 Android Development] viperbjk:
goldcard.img has to be written to the RAW sectors, not as a file to the filesystem !!!
[G1 Android Development] Ceased2Be:
ah okay, how do I do that from windows?

*feels like a complete n00b*
[G1 Android Development] viperbjk:
Using QMAT, Hardware Forensics, WINCE sd card tools. First press Get SD Serial, choose correct Serial ID, then press Write SD Card.

SD Card has to be inserted to the mobile and the mobile has to be connected via ActiveSync / WMDC. Ensure that the mobile is security unlocked.

Using G1 : Use Command Interface under linux and read this thread !!!

Cya,

Viper BJK
[G1 Android Development] Ceased2Be:
yeah I've read the thread and when it started there was a method without using a windows mobile device which I'm still trying to use.

I only have a G1 a Windows Desktop and no Windows Mobile device...
[G1 Android Development] charlestoepoel:
is rooting a one time job ?

Other question, can i clone my microsd and give the image to somebody else who does not have a windows mobile device, so he/she can forget step 4 ??

Btw, the guide works like charm!

And for those who need qmat 4.24(which worked for me), pm me
[G1 Android Development] Gedomania:
Hey I did what you suggested I formated the SD Card using this Tool:

http://panasonic.co.jp/pavc/global/cs/sd/download/sd_formatter.html

to get an SD Card with primary partition afterwards I formated the Card with Fat32 under Windows and then generated the Goldcard and copied the File DREAIMG.NBH back on the SD Card , still got No Image File Found :( ,

any suggestions ?

Is the Formating Tool maybe not useable to generate a new Partition on the SD Card?
[G1 Android Development] moneytoo:
No, the image is based on the serial number of your sd card.

Use fdisk or format in some other device (digital camera etc...).
[G1 Android Development] viperbjk:
First, go to http://wiki.xda-developers.com/index.php?pagename=Elf_GoldCard

and see section about format.

Then go into tricolor bootloader, use qmat (async modem) or mtty and enter "password BsaD5SeoA" and see if there is displayed "g_cKeyCardSecurityLevel=0". If yes, then goldcard is fine.

be sure that the image is called DIAMIMG.NBH and not Diamimg.nbh or diamimg.nbh or anything else ... and be sure that no other file is on the sd card.

Cya,

Viper BJK

P.S.: In Wiki's and other pages, there are lots of infos about what we are discussing here ...
[G1 Android Development] Markus31415:
I don't understand this. I put in my SD Card in my car navigation which is based on Windows CE and everything seems fine. He read out the ID and writed the Goldcard on it. I get the Message: Write Goldcard complete or something like that, although there stands "Error" in the title bar. Then I copied the Dreamimg file to the root of my SD card with active sync. But everytime when I try to flash there stands "Not allow" and when I press the power key there stands "Serial0" in the Bootloader.
[G1 Android Development] Gedomania:
I have the same error with the error in the titlebar , is maybe a device needed which runs a Windows Mobile newer then Win CE 4.2 , both of my devices have this kernel (one is a Windows Mobile Smartphone 2003 edition and the Other is Windows for Pocket PC with Win CE 4.2 Core) , i tryed both devices,

and even formated withthe devices and generated goldcrads with qmat on both of them but it won´t let me see the image when i put in the sd card in my G1 ,

any help (I used the format tool in the commandline after i formated the sd card in the phone and vice versa no changes :( )
[G1 Android Development] raw235:
it worked with an Acer n30 windows mobile 2003 SE (4.21.1088) PDA here
[G1 Android Development] dirty_:
Hm.

Could please any of the registred users who made this actually happen try putting up a howto somewhere ?

I can't image what i did wrong, but my bootloader keeps saying "File not found" or something like that.

Could it be that we have to get he first to numbers of the reversed serial to "00" (NULLNULL) when entering them to QMAT?

(I even tried with or without.) Or does the "File not Found" message, which is also showing the numbers "00078002" indicate, that I did everything the right way, just having trouble with the DREAIMG.NBH file?

I really tried everything i can imagine:

i formated the card, before I dd'd the image to the card and tried the other way round. i put the DREAIMG.NBH on the card afterwards via drag and drop in OS X(and erased all the Spotlightfiles via commandline afterwards), i copied the file via Drag and drop in windows vista, i copied the files via terminal "cp", i even tried formatting in windows, OS X, linux.

PM welcome also!
[G1 Android Development] wk-de:
"file not found" has nothing to do with a (perhaps) wrong CID. I used an "out of the box" sd-card and placed a "DREAIMG.NBH" in its root-directory: The boot loader found that file! (But it was obviously not validated ;))

Sorry that I can't help more, but I can tell you for sure, that writing the image to the card _before_ formatting is the wrong way, since you most likely overwrite your changes with formatting.
[G1 Android Development] infl00p:
It did work for me on a HP iPaq 910

but strangely it didn't with a HP iPaq 510.

Also tried on HTC Diamond Pro and qmat kept asking for Registry changes.

If you get the "Not allowed message" then either you put the wrong Card Serial for the goldcard generation or you didn't write the img to the sdcard.

If you get the "not found" message the format of the card is not recognised, or the file has wrong name or wrong flags.

This is what I did,

On linux:

- Zeroed my 2GB sd card with dd. I won't write the command since it's almost certain that someone will paste it and zero their hard disk instead.

- fdisk, deleted all partitions, created a new primary one with type FAT16.

On windows Xp (sdcard recognized as H:) :

Format H: /FS:FAT32 /A:4096

copy dreaimg.nbh H: (it's the same with explorer, but I prefer cmd)

did the qmat procedure that moneytoo wrote, with a HP smartphone.

As you see I saved the nbh before the qmat, so to verify it I doublechecked that it had the same md5sum as the original in my hd.

That'it.
[G1 Android Development] dirty_:
Depends on where i dd:

If i dd to the masterbootrecord, e.g.: /dev/disk1

i can format afterwards i thought:

I come to this conclusion because i also tried dd'ing to /dev/disk1s1 (the partition obviously). And that resultet in the card not beeing readable anymore.

With the first method i can dd the formatted card an it will still be readable!

Ah, didnt see the second posting!

Ok, so again from the beginning;)

One more question: do I understand this right: If i get the message "file not found" i am more likely to have messed up the NBH-File or the fat32 but have the goldcardstuff done the right way?
[G1 Android Development] dirty_:
Wohhoo, it worked!!!

What I did:

FIRST: DD THE CARD WITH ZEROS via linux console

1.) format the sdcard with windows: fat32

2.) in windowze: copy DREAIMG.NBH to sdcard

3.) with some LINUX-Terminal: dd the goldcard.img to the card:

4.) restart phone, press cam button to launch the bootloader

THX!
[G1 Android Development] Gedomania:
Yeah it finally worked for me , i used an USB Card Reader to reformate the SD Card and then copied the image on the card and it worked ,

i have no idea why it worked with the usb card reader anyway I have root now and I´m sooooooooo thankfull , thank you to all who made this possibly :) THANKS A MILLION
[G1 Android Development] Ceased2Be:
I've given up, tried about 40 times in different ways with different sd cards and nothing is working.

I'll just have to wait until there's a method that won't require a Windows Mobile device.
[G1 Android Development] alex#23:
I also tried it but just get "Cecking .... Not Allowed" from the Boot Loader

The Serial of the Card is right.

i also make dd if=image of=/dev/sda with this message

0+1 Datensätze ein

0+1 Datensätze aus

384 Bytes (384 B) kopiert, 0,0284366 s, 13,5 kB/s

Can anyone give me support ?

Regards

Alex
[G1 Android Development] dirty_:
<ou got the worng serial maybe for the creation of that goldcard.img?
[G1 Android Development] emiliosdance:
Succsess after a long learning prosses

Finally i did it ,:):):D

love u all guys,these posts were the best.

I have to recorded my steps:

Registered the QMAT (4.29):D

Connected my WINCE (QTEC) worked for me.;)

After having problems writing the gold image (registry permissions) to the device i found this: http://xdaforums.com/attachment.php?attachmentid=91644&d=1213100403

Successfully writing the goldcard.img , taking the card from Qtek to G1,

adding the DREAIMG:nbh...........

Reboot the phone holding the camera button, and :D:D:D:D

Here it goes ALL DONE:

G1 with German firmware v. 123099(originally)

;)I have to say that was easy to do but i had to find the right tools for it, so dig to the forum guys to find all the answers because its all here.:)
[G1 Android Development] Francisco00:
It works!! [was: Also getting "not alllowed"]

Update: I was using QMAT from Linux, and discovered that Wine was not allowing me to select "Dream" when creating the goldcard. By using the very latest Wine, I could do that and then everything worked.

========================================================

I tried:

* Using 2Gb SD card included with G1.

* Got card ID using G1's console, I copied the value by doing a

cd /sys/class/mmc_host/mmc1/mmc1:8fe4

cat cid > /sdcard/cid.txt

* Used QMAT 4.30 to reverse bytes. Wrote reversed bytes into "Serialnumber of SD-card (CID):" Saved goldcard.img

* Zeroed the SD card: "dd if=/dev/zero of=/dev/sdb bs=1M"

* On Linux using fdisk created partition with FAT16

* On Windows XP formated with:

format E: /FS:FAT32 /A:4096

* On WinXP, copied file DREAIMG.NBH

copy DREAIMG.NBH E:

* Went back to Linux, wrote the goldcard.img file

dd if=goldcard.img of=/dev/sdb bs=384

==================================

RESULT: "Not allowed" and a multicolored boot thing. I can only get out of that by removing the battery.

Note that:

- I actually read back the first 384 bytes and they do match the goldcard.img.

- I used diff to compare the DREIMG.NBH image from the card and it matches as well.

FWIW: cid from card:

035344535530324780507c96ab008b40

Using Continental European G1, with 1.1 firmware running build RC33.

====================================

Any ideas? Should I give it a try with another card?
[G1 Android Development] kilasin:
HELP!!!

hi guys i need some help here.

i just purchased qmat and what not it was for version 4.26 ok i did all of the aboved mentioned did the reverse serial and everything but uner windows since my qmat was registered on that machine neways i got the file to save and then copied that file to my folder in my linux box and did the dd on it and wen i flash it im stuk in the red blue white it goes like is rdy to flash but says no file i think it goes really fast so i cant c wat it says if you can help me in any way possible that would be good i just want to root my phone for tethering, and multi touch which would be nice and i hate iphone so i got the g1. ne help would be great. thnx for your time
[G1 Android Development] domino11:
This is how far i got too. Would love to know if it worked with another card.
[G1 Android Development] Francisco00:
Information request

Could the folks that had success (and that are still reading this thread) inform us:

* the size and brand of their SD cards

* the formating hardware used (camera, dedicated USB reader, G1 connected through USB, Windows Mobile smartphone)

* formating command, and or formatting details.