Damp the LG G3 Thermal Throttling

As our mobile devices grow thinner and more powerfulwith each passing generation, it’s inevitable … more

Google Play Developer Distribution Agreement Due Tomorrow

Every once in a while, Google updates theGoogle PlayDeveloper Distribution … more

LG to Release Octa-Core “Nuclun” SoC in the LG G3 Screen

LG is set to follow the likes of Samsung and other manufacture its own … more

Lockdown Pro 2 Brings Material Design and Media Support

Back in March of this year, we took a look at a rather innovated security application … more
Post Reply

FixFlash - Flash Verify and Repair Tool by SavvyX4 (Updated 9/9/10)

OP SavvyX4

26th August 2010, 08:03 PM   |  #1  
OP Junior Member
Thanks Meter: 0
 
26 posts
Join Date:Joined: Mar 2010
FixFlash - Flash Verify and Repair Tool by SavvyX4

I was always running into problems getting my Hero CDMA to boot custom ROMs. After eventually getting frustrated enough with what seemed like inexplicable errors, I finally determined that on my phone, I would occasionally end up with corrupt files after the flash process was done. If I was lucky, it would be an unimportant file or two that would end up corrupt, but sometimes it would be a critical framework, which is why I was having trouble booting.

Enter FixFlash, a shell script that runs on the phone after flashing a new ROM image from recovery. FixFlash will verify the integrity of the files copied to the phone during the flash process and in the event of a problem, automatically make a fresh copy of the corrupt file in an effort to resolve the problem.

I developed this tool because of my own problems, but I think that I may be able to help some other people who's phones are giving them them same sorts of problems that mine does me. I am open to any suggestions on improvements, and welcome any feedback!

FixFlash is very easy to use, and only requires that you do the following:

1. Copy FixFlash.sh to the root of your sdcard
2. Extract the zip of the ROM you want to flash to your phone on your computer. This is necessary for the verification process.
3. Copy both the original .zip file and the extracted folder of the .zip to the root of your sdcard
4. Boot into recovery and follow your normal flash procedure.
5. Once the flash has finished, but before doing anything else in Recovery, run this command from your computer's terminal/command prompt:

adb shell sh /sdcard/FixFlash.sh

You should see output in your terminal/command prompt indicating if there were any corrupted files encountered, and whether or not they were repaired. The whole process is fairly quick, and should only take a minute or so, depending on your sdcard speed.
6. Reboot your phone and enjoy!

At this point you can remove the extracted copy of the zip from your sdcard, its job is done!

** Updated Script available ** Download from link below and replace existing copies with that file to update.
Sep 9 2010 - 1.1 - Fixed problem with files like AVRCP.kl showing as bad because of case change of filename between phone and zip


More information (including full changelog) is available here:
http://notepad.cc/fixflash

Direct Download Link:
http://db.tt/GPssIoe

If you have any problems with FixFlash PLEASE post your recovery.log to PasteBin along with a description of the issue so that I may look into whatever is causing the problem. Thanks!
Last edited by SavvyX4; 9th September 2010 at 10:45 PM. Reason: Info on Update
26th August 2010, 09:55 PM   |  #2  
Senior Member
Flag Detroit
Thanks Meter: 113
 
356 posts
Join Date:Joined: Dec 2007
Donate to Me
More
Quote:
Originally Posted by SavvyX4

I was always running into problems getting my Hero CDMA to boot custom ROMs.

I have always wondered what people might be doing wrong, because I have *never* had an issue booting a known good ROM.

Perhaps the internet connection or SD card is to blame?
26th August 2010, 10:46 PM   |  #3  
mrinehart93's Avatar
Senior Member
Flag Chicago
Thanks Meter: 299
 
1,835 posts
Join Date:Joined: Oct 2009
Donate to Me
More
Hmm, this is a very good idea. Maybe it will be incorporated into future CyanogenMOD builds?
26th August 2010, 10:50 PM   |  #4  
OP Junior Member
Thanks Meter: 0
 
26 posts
Join Date:Joined: Mar 2010
Quote:
Originally Posted by x99percent

I have always wondered what people might be doing wrong, because I have *never* had an issue booting a known good ROM.

Perhaps the internet connection or SD card is to blame?

I always verify hashes on downloaded ROMs, and as the files are extracted to the sdcard they are verified by Recovery. The problem is that they aren't verified after they are copied to the phone's internal storage, which is where with my phone I'm seeing corruption. I have been dealing with this problem for a long time, and tried numerous different combinations before finally catching a break with a flash that corrupted one of the frameworks that gets called immediately when booting. that narrowed down the number of files to check manually and once I found a bad hash on my phone's internal storage, I knew for sure what was wrong and set about automating a workaround.
27th August 2010, 01:30 PM   |  #5  
Senior Member
Flag Detroit
Thanks Meter: 113
 
356 posts
Join Date:Joined: Dec 2007
Donate to Me
More
Quote:
Originally Posted by SavvyX4

... once I found a bad hash on my phone's internal storage, I knew for sure what was wrong and set about automating a workaround.

Is it fair to say that, in your case, this workaround is a software fix for a hardware problem?
27th August 2010, 02:29 PM   |  #6  
OP Junior Member
Thanks Meter: 0
 
26 posts
Join Date:Joined: Mar 2010
Quote:
Originally Posted by x99percent

Is it fair to say that, in your case, this workaround is a software fix for a hardware problem?

I would agree, this would certainly qualify as a software fix for a hardware problem.

Sent from my HERO200 using XDA App
27th August 2010, 03:03 PM   |  #7  
Member
Flag Tampa, FL
Thanks Meter: 18
 
93 posts
Join Date:Joined: Sep 2007
Donate to Me
Quote:
Originally Posted by mrinehart93

Hmm, this is a very good idea. Maybe it will be incorporated into future CyanogenMOD builds?

Even better, this should be incorporated into Clockwork & Amon RA!
27th August 2010, 04:39 PM   |  #8  
OP Junior Member
Thanks Meter: 0
 
26 posts
Join Date:Joined: Mar 2010
I would agree, having the recovery automatically verify the flashed files in a similar manner to what I've done with this script would be ideal. Even though I believe that FixFlash is easy to use, not having to do anything other than a normal flash would be easier and possibly save people who may not be aware of a lurking issue with their phones a lot of grief.

Sent from my HERO200 using XDA App
28th August 2010, 03:44 AM   |  #9  
mrinehart93's Avatar
Senior Member
Flag Chicago
Thanks Meter: 299
 
1,835 posts
Join Date:Joined: Oct 2009
Donate to Me
More
Savvy, you should contact Koush and have him add this into ClockwordMOD... you would help SO many people out with this. Quick question just so I can learn something: How does the script know how to repair the framework files? I mean how can it tell what ROM it is, and know the correct file to repair?
28th August 2010, 04:46 AM   |  #10  
OP Junior Member
Thanks Meter: 0
 
26 posts
Join Date:Joined: Mar 2010
I am using the recovery.log that is generated during the flash process to figure out which files belong where. Inside the zip for the rom the files are in the same directory structure so it ended up only requiring some minor work to get it to locate everything. And the same log identifies what is being flashed which is how it knows which directory to work with.



Sent from my HERO200 using XDA App

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes