Go Back   Android Forums > Android Phones > HTC Thunderbolt > Thunderbolt - All Things Root
Gamers - Check out our new sister sites!
Nintendo Wii U!    |    OUYA - $99 Android System!

test: Reply
 
LinkBack Thread Tools
Old January 9th, 2012, 06:21 AM   #1 (permalink)
Senior Member
Thread Author (OP)
 
scotty85's Avatar
 
Join Date: Jul 2010
Posts: 8,926
 
Device(s):
Carrier: Not Provided

Thanks: 5,325
Thanked 5,422 Times in 3,423 Posts
Default an easier way to flash PG05IMG files

all htc phones utilize a PxxxIMG file system to flash RUUs and such in hboot. having guides up here,the inc,and merge forums, and being active on the board i see alot of folks have trouble getting PxxxIMG(PG05IMG in case of the TB) to work. the prollem usually has simple fix,but sometimes causes folks an extreme amount of confusion.

but there is an easier way

i mess with my various htc devices alot,and have found using fastboot is a much faster,easier way to flash PxxxIMG files. you dont need to transfer files to your SD,or boot to change files if youve got a couple to do.

in a nutshell,youre going to place your file into the folder where adb and fastboot live(prolly platform tools or tools if youre an advanced user that has the sdk installed),place the phone in fastboot,put it in RUU mode and flash the file with this command: fastboot flash zip <filename>.zip

if you rooted with revolutionary,and have no idea what fastboot or adb even are,heres a step by step:

1)set up adb and fastboot download this file,wich contains adb and fastboot.
http://www.mediafire.com/?hzf1u4bowjewhdq
md5 sum: 9d1c0e2a98f09bb65521889870334b65

extract it,and place the extracted(not zipped) mini-adb folder on the root of the C drive of your PC. in windows 7,you should be able to just right click,then extract files. if not,you may need a utility such as 7 zip

re-install revolutionarys drivers,if you dont still have them on your PC from when you rooted.

open a command window. in windows 7,just click the start bubble,then type "command" in the search box. this should open a small black window.

change to your mini-adb directory(folder) by the entering the following command at the prompt in your command window: cd c:\mini-adb this should change your prompt to "mini-adb>" indicating that youve changed to that directory.

2)flash your file put the file that you want to flash into the mini adb-folder. you can copy/paste,drag/drop or move it however you are comfortable moving files.

plug in your phone. enable usb debugging,if its not allready.

enter the following commands. from here on,commands will be bold and italics,comments will be blue. each line is one command,enter them one at a time. you can copy/paste or type them in.

md5sums <filename> this will output the md5 sum of the file you will flash. make sure it matches that listed for your download

adb devices should output your phones serial number

adb reboot bootloader will boot you into the fastboot screen(white with colored letters)

fastboot devices will again output serial number

fastboot erase cache

fastboot oem rebootRUU

fastboot flash zip <filename>.zip

you will see a green line on your phone as the file flashes.youll see outut in your cmd window. sometimes when flashing a complete RUU you will get an error that says "failed,reflush immediately". dont panic,just run the above line again to reflash your file

after you get a "finished" message:

at this point,ycould actually flashe more files if you wanted. for example,a radio and a recovery. just repeat the "fastboot flash zip" command untill youve flashed all your files. then:

fastboot reboot-bootloader this will take you back to the white fastboot screen

fastboot reboot your phone should reboot

and of course,heres what the outputs will look like in the command window. red are my inputs. in this example,im installing twrp recovery,with a .zip file called: twrp111rbox1_PG05IMG

Code:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Scott>cd c:\mini-adb

c:\mini-adb>md5sums twrp111rbox1_PG05IMG.zip

MD5sums 1.2 freeware for Win9x/ME/NT/2000/XP+
Copyright (C) 2001-2005 Jem Berkes - http://www.pc-tools.net/
Type md5sums -h for help

[Path] / filename                              MD5 sum
-------------------------------------------------------------------------------
[c:\mini-adb\]
twrp111rbox1_PG05IMG.zip                       31ae566360d4729ff1be2a5a67952777

c:\mini-adb>adb devices
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached
HT12CS012936    device


c:\mini-adb>adb reboot bootloader

c:\mini-adb>fastboot devices
HT12CS012936    fastboot

c:\mini-adb>fastboot erase cache
               erasing 'cache'... OKAY [  0.262s]
finished. total time: 0.263s

c:\mini-adb>fastboot oem rebootRUU
                              ... OKAY [  0.222s]
finished. total time: 0.223s

c:\mini-adb>fastboot flash zip twrp111rbox1_PG05IMG.zip
       sending 'zip' (5573 KB)... OKAY [  0.907s]
                 writing 'zip'... INFOzip header checking...
INFOzip info parsing...
INFOchecking model ID...
INFOchecking custom ID...
INFOstart image[recovery] unzipping & flushing...
INFO[RUU]UZ,recovery,0
INFO[RUU]UZ,recovery,15
INFO[RUU]UZ,recovery,27
INFO[RUU]UZ,recovery,37
INFO[RUU]UZ,recovery,47
INFO[RUU]UZ,recovery,60
INFO[RUU]UZ,recovery,70
INFO[RUU]UZ,recovery,82
INFO[RUU]UZ,recovery,98
INFO[RUU]UZ,recovery,100
INFO[RUU]WP,recovery,0
INFO[RUU]WP,recovery,100
OKAY [  7.010s]
finished. total time: 7.918s

c:\mini-adb>fastboot reboot-bootloader
     rebooting into bootloader... OKAY [  0.151s]
finished. total time: 0.151s

c:\mini-adb>fastboot reboot
                     rebooting...
finished. total time: 0.150s

c:\mini-adb>
seems a lil complicated,but once you do it a couple times,its quick and easy.

__________________
The Delivery Guy
If someone has helped you,please click the THANKS button on that post.
Please post questions so others can benefit from the answers.
donate to my device fund
scotty85 is online now  
Last edited by scotty85; April 22nd, 2012 at 09:40 AM.
Reply With Quote
The Following 5 Users Say Thank You to scotty85 For This Useful Post:
mfflannery (April 17th, 2012), RedheadTarn (January 23rd, 2012), rexdog1888 (February 6th, 2012), tensazan (January 11th, 2012), thornev (February 4th, 2012)
Sponsors
Old January 11th, 2012, 10:50 PM   #2 (permalink)
Member
 
Join Date: Apr 2011
Location: Indiana
Posts: 222
 
Device(s): Samsung Galaxy S III HTC Thunderbolt
Carrier: Verizon

Thanks: 3
Thanked 41 Times in 27 Posts
Default

Worked like a charm, thank you very much.
tensazan is online now  
Reply With Quote
Old January 12th, 2012, 06:15 AM   #3 (permalink)
Senior Member
Thread Author (OP)
 
scotty85's Avatar
 
Join Date: Jul 2010
Posts: 8,926
 
Device(s):
Carrier: Not Provided

Thanks: 5,325
Thanked 5,422 Times in 3,423 Posts
Default

youre welcome. glad you found it useful
scotty85 is online now  
Reply With Quote
Old January 12th, 2012, 10:03 AM   #4 (permalink)
Junior Member
 
Join Date: Apr 2011
Location: Florida
Posts: 31
 
Device(s): HTC Thunderbolt
Carrier: Not Provided

Thanks: 2
Thanked 8 Times in 8 Posts
Default

Wow good stuff Scotty!
BDBMike is offline  
Reply With Quote
Old January 23rd, 2012, 04:09 PM   #5 (permalink)
Junior Member
 
RedheadTarn's Avatar
 
Join Date: Jul 2011
Location: Colorado Springs
Posts: 45
 
Device(s): EVO 4g MikG 3.1/ ChopSuey 9.2.7/ V6 Supercharger option #7 Nook Color / CM 7.2 Mirage
Carrier: Not Provided

Thanks: 32
Thanked 16 Times in 10 Posts
Default

Quote:
Originally Posted by scotty85 View Post

enter the following commands. from here on,commands will be bold and italics,comments will be blue. each line is one command,enter them one at a time. you can copy/paste or type them in.

md5sums <filename> this will output the md5 sum of the file you will flash. make sure it matches that listed for your download

adb devices should output your phones serial number

adb reboot bootloader will boot you into the fastboot screen(white with colored letters)

fastboot devices will again output serial number

fastboot erase cache

fastboot oem rebootRUU

fastboot flash zip <filename>.zip

you will see a green line on your phone as the file flashes.youll see outut in your cmd window. sometimes when flashing a complete RUU you will get an error that says "failed,reflush immediately". dont panic,just run the above line again to reflash your file

after you get a "finished" message:

at this point,ycould actually flashe more files if you wanted. for example,a radio and a recovery. just repeat the "fastboot flash zip" command untill youve flashed all your files. then:

fastboot reboot-bootloader this will take you back to the white fastboot screen

fastboot reboot your phone should reboot

seems a lil complicated,but once you do it a couple times,its quick and easy.
Do these adb commands work just for the thunderbolt or can I use this same method on my EVO 4G? (obviously using the correct PGxxxIMG.zip file)
RedheadTarn is offline  
Reply With Quote
Old January 23rd, 2012, 08:44 PM   #6 (permalink)
Senior Member
Thread Author (OP)
 
scotty85's Avatar
 
Join Date: Jul 2010
Posts: 8,926
 
Device(s):
Carrier: Not Provided

Thanks: 5,325
Thanked 5,422 Times in 3,423 Posts
Default

They should work for pretty much any HTC phone,just use appropriate PxxxIMG files

You can even use them on stock,s-on phones if you use signed HTC files
scotty85 is online now  
Reply With Quote
The Following User Says Thank You to scotty85 For This Useful Post:
RedheadTarn (January 24th, 2012)
Old February 4th, 2012, 08:54 AM   #7 (permalink)
Member
 
Join Date: May 2010
Location: Pace FL
Posts: 136
 
Device(s): HTC Rezound Rooted Stock ROM (for now)
Carrier: Not Provided

Thanks: 12
Thanked 17 Times in 11 Posts
jamesglewis3@gmail.com
Default

I am coming from the Rezound forum. This seems like a great way to get the IMG onto the device!

however...here's what I am encountering.
Ran the first few steps just fine.
Got the to flashboot flash zip PH98IMG.zip
(I had renamed the file to PH98IMG.zip)
Got the following error message:

error: cannot load 'PH98IMG.zip'

Bummer.

EDIT: SUCCESS! FINALLY! User error. When I renamed the file, it got an extra ".zip" appended to the file name. Checked the properties of the file and saw that, got rid of the extra zip and this method (of course) worked great.

Thanks so much for this method which worked awesomely.
turbomentor is offline  
Last edited by turbomentor; February 4th, 2012 at 10:08 AM. Reason: update
Reply With Quote
Old February 4th, 2012, 10:00 AM   #8 (permalink)
Member
 
thornev's Avatar
 
Join Date: Nov 2011
Location: Hudson Valley, NY
Posts: 309
 
Device(s): Samsung Galaxy S3 16GB, Stock ROM (VRBMA2), KT747 kernel o/c'ed to 2.1Ghz, Go Launcher EX, TWRP2 rec
Carrier: Verizon

Thanks: 78
Thanked 94 Times in 83 Posts
Default

Scotty... I have a question... I completely understand your commands.

What I don't understand is what is a "flashable RUU"? What's in it and what is its purpose?

I know it has to be a .zip file and I'm guessing that on a Rezound it's something analogous to PH98IMG.zip. But I've seen a lot of PH98IMG files floating around that contain different content. It would help if you could explain all that can be contained in the zip and what each item does.

Thanks in advance. I'm "prolly" asking for a lot, but your response I'm sure would be helpful to everyone.

As a starting point, here's what I see in zip files:

data folder
kernel folder
META-INF folder - usually contains com.google.android files but they can be different
system folder
android-info.txt - I know this contains the mainver and I've seen this in the kernel folder too
recovery.img - this is the recovery
boot.img - is this the booted code when you fastboot reboot? I've seen this in kernel folder and am wondering if this IS the kernel.
firmware.zip - can the PHxxIMG.zip file really contain and update firmware such as the radio?
thornev is online now  
Last edited by thornev; February 4th, 2012 at 11:54 AM.
Reply With Quote
Old February 5th, 2012, 08:04 AM   #9 (permalink)
Senior Member
Thread Author (OP)
 
scotty85's Avatar
 
Join Date: Jul 2010
Posts: 8,926
 
Device(s):
Carrier: Not Provided

Thanks: 5,325
Thanked 5,422 Times in 3,423 Posts
Default

Quote:
Originally Posted by turbomentor View Post
I am coming from the Rezound forum. This seems like a great way to get the IMG onto the device!

however...here's what I am encountering.
Ran the first few steps just fine.
Got the to flashboot flash zip PH98IMG.zip
(I had renamed the file to PH98IMG.zip)
Got the following error message:

error: cannot load 'PH98IMG.zip'

Bummer.

EDIT: SUCCESS! FINALLY! User error. When I renamed the file, it got an extra ".zip" appended to the file name. Checked the properties of the file and saw that, got rid of the extra zip and this method (of course) worked great.

Thanks so much for this method which worked awesomely.
glad you found it useful. as youve found,you have to use exactly the name in the command that your zip file is. the extra ".zip" will definately throw it off!

Quote:
Originally Posted by thornev View Post
Scotty... I have a question... I completely understand your commands.

What I don't understand is what is a "flashable RUU"? What's in it and what is its purpose?

I know it has to be a .zip file and I'm guessing that on a Rezound it's something analogous to PH98IMG.zip.
actually,RUU is HTC's Rom Updater Utility,and is refering to the .exe files that are run on a computer with your phone plugged in. however,the term "RUU" has become more generic- when you see it,it is tpically just refering to factory images and could be refering to the .exe file,or it could be refering to a PxxxIMG file that is flashed in hboot.

i couldnt find right off where id made a reference to a "flashable RUU",but if i did,i was prolly just refering to a file that is flashable on the phone,and not a utility run on the PC. if you want to quote me more directly or refer me to where you saw that,i can possibly add more details

youre exactly right,a flashable RUU on the rezound would be a PH98IMG.zip. or a PG05IMG on the thunderbolt

Quote:
Originally Posted by thornev View Post
But I've seen a lot of PH98IMG files floating around that contain different content. It would help if you could explain all that can be contained in the zip and what each item does.

Thanks in advance. I'm "prolly" asking for a lot, but your response I'm sure would be helpful to everyone.

As a starting point, here's what I see in zip files:

data folder
kernel folder
META-INF folder - usually contains com.google.android files but they can be different
system folder
android-info.txt - I know this contains the mainver and I've seen this in the kernel folder too
recovery.img - this is the recovery
boot.img - is this the booted code when you fastboot reboot? I've seen this in kernel folder and am wondering if this IS the kernel.
firmware.zip - can the PHxxIMG.zip file really contain and update firmware such as the radio?
something like the above is a rom that you would flash in a custom recovery. you wouldnt have a kernel folder,the META-INF folder,or any folder in a PxxxIMG file,you will only have the android info text doccument,and a bunch of images.

the important images in a "full" RUU wuld be:
hboot(bootloader)
reovery
boot(where the kernel lives)
system(the rest of the code for the rom)
radio(for cdma)
mdm9k(for LTE)
splash1(the "HTC" screen)

and there will be a handful of others depending on the complexity of the phone. a signed PxxxIMG file suitable for an s-on phone to upgrade from version x.xx.xxx.x to y.yy.yyy.y will have all of those,plus the aforementioned others. download a PH98IMG file for 2.01.605.11(or any other) and crack it open with 7 zip if you never have. there are actually 21 different .img/.nb0 files in the 2.01.605.11 file

typically you dont see signed PxxxIMG files that arentt full RUUs,but it is possible. the "update" PH98IMG for the rezound linked on xda only contains firmware updates,and is flashable via a locked s-on phone. phones that are being added to HTCdev unlock support all have an RUU that upgrades only the hboot,to the same **locked** style that the rezound and thunderebolt have.

an s-off device lets you pack up literally any of these together. in the thunderbolt forums,we are able to change our radios and splash images with a PG05IMG file.prior to radio s-off on my thunderbolt, i used to frequently pull the hboot and recovery out of leaked RUUs and flash the rest of them in their entirety.

without complicating things too much,if the device in question has a radio s-off,you can even change hboots. i spent alot of time flashing different entire european factory RUUs on my inspire 4g. global phones typically have alot of different factory images for different regions that typically contain their own specific radios and hboots. devices that are s-off becasue of an "engineering hboot" you obviously dont want to ever flash a different hboot,as you wont be s-off anymore after.

with HTCdev unlock,we unfortunately do not have access to anything more than boot/system/recovery. you cannot flash radios,splash images,or any of the other images other than boot/system/recovery. i know... i have tried

so i guess the answer as far as an htcdev phone is concerned,is a PxxxIMG file may contain any combination of boot,system,or recovery images.

further questions?
scotty85 is online now  
Last edited by scotty85; February 5th, 2012 at 08:27 AM.
Reply With Quote
The Following User Says Thank You to scotty85 For This Useful Post:
thornev (February 5th, 2012)
Old April 17th, 2012, 06:48 PM   #10 (permalink)
New Member
 
Join Date: Jan 2012
Posts: 1
 
Device(s):
Carrier: Not Provided

Thanks: 4
Thanked 1 Time in 1 Post
Default

Just helped a Rezound user, thanks all!!
mfflannery is offline  
Reply With Quote
The Following User Says Thank You to mfflannery For This Useful Post:
scotty85 (April 17th, 2012)
Sponsors
Old April 22nd, 2012, 09:30 AM   #11 (permalink)
Senior Member
 
angldvl81's Avatar
 
Join Date: Feb 2011
Location: AZ
Gender: Female
Posts: 1,504
 
Device(s): Galaxy SIII, JellyBlur 1.3 TB(ret), Kindle Fire
Carrier: Verizon

Thanks: 209
Thanked 360 Times in 314 Posts
Default

Hey scotty, the download link in the OP doesn't want to work.
__________________
i'm awesome and i know it
"The fact that the right way is also my way is a happy concidence" Sheldon Cooper
If you're going to be annoying, can you do it away from me?
angldvl81 is offline  
Reply With Quote
Old April 22nd, 2012, 09:40 AM   #12 (permalink)
Senior Member
Thread Author (OP)
 
scotty85's Avatar
 
Join Date: Jul 2010
Posts: 8,926
 
Device(s):
Carrier: Not Provided

Thanks: 5,325
Thanked 5,422 Times in 3,423 Posts
Default

Quote:
Originally Posted by angldvl81 View Post
Hey scotty, the download link in the OP doesn't want to work.
oops,sorry
mini-adb.zip
scotty85 is online now  
Reply With Quote
The Following User Says Thank You to scotty85 For This Useful Post:
angldvl81 (April 22nd, 2012)
Reply


Go Back   Android Forums > Android Phones > HTC Thunderbolt > Thunderbolt - All Things Root
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


LinkBacks (?)
LinkBack to this Thread: http://androidforums.com/thunderbolt-all-things-root/480350-easier-way-flash-pg05img-files.html
Posted By For Type Date
[Q] Is my Thunderbolt Bricked?? - xda-developers This thread Refback June 1st, 2012 10:23 PM


All times are GMT -5. The time now is 09:55 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.