• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root On-phone ROM Checksum Verifier

scary alien

not really so scary
Mar 5, 2010
22,305
23,781
Indy
update 5/2/2011: wow...forgot about this old thread...FYI, please check out this thread:

http://androidforums.com/application-announcements/209740-app-afv-android-file-verifier.html#post2637616

for a more up-to-date, current version of this app.

Cheers and enjoy!

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


~-~-~ On-phone ROM Checksum Verifier ~-~-~

Download: View attachment MD5-Checksum-v2.2.apk (new version!)

Changes in the 2.2 version include:

1. larger rows and font for easier/better file-selection
2. sorted list of files displayed in file-selector
3. retain directory between each file-selection
4. verify read-access of selected file to prevent force-close
5. test file's suffix to warn if non jar-type file is selected for jar-verification
6. add menu support (help, change log, acknowledgements)

Download: View attachment MD5-Checksum-v2.1.apk

This version is detailed in a post over at XDA (xda-developers - View Single Post - [Begging] Devs - please publish your MD5's) but its highlights are as follows:

- still includes all of the functionality of the previous versions

- now includes two jar file verification functions (they both basically do the same thing; radio button JV1 selects an explicit jar verification (read jar, calculate SHA1 digest, compare to manifest); radio button JV2 just uses the implicit JarFile Java method of jar verification and is much faster since its not doing a second, separate validation (23 seconds for method JV2 on a 100MB ROM vs. 2.5 minutes for method JV1 (all on my Droid X)).

- now has a file-selector instead of requiring manual filename text input (you can still do this too)

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

Download: View attachment MD5 Checksum v1.1.apk (free!)
Download: View attachment checksumdb.txt (save to either /sdcard/download or /sdcard)

Code:
[FONT=Courier New]Checksums for 'MD5-Checksum-v2.2.apk':[/FONT]
[FONT=Courier New]Size:   36,523 (bytes)[/FONT]
[FONT=Courier New]MD5:   3aec3fd4cae8f200db8457894ae4193f[/FONT]
[FONT=Courier New]SHA1:  b164382f92259aa0726c7fe61178904c58bc5fbc[/FONT]
 
[FONT=Courier New]Checksums for 'MD5-Checksum-v2.1.apk':[/FONT]
[FONT=Courier New]Size:   33,268 (bytes)[/FONT]
[FONT=Courier New]MD5:   667440bb47bd574c4972d1fa6f4cfda1[/FONT]
[FONT=Courier New]SHA1:  394f16a5520dab3ff1f56bd769695040d2447df2[/FONT]
 
[FONT=Courier New]Checksums for 'MD5-Checksum-v2.0.apk':[/FONT]
[FONT=Courier New]Size:   28,951 (bytes)[/FONT]
[FONT=Courier New]MD5:   2fd0d7bf6cd2b43a667592eb4ed83c15[/FONT]
[FONT=Courier New]SHA1:  287419e3e006d514b2f8287b1a0a524e0dd39818[/FONT]
 
[FONT=Courier New]Checksums for 'checksumdb.txt':[/FONT]
[FONT=Courier New]Size:   20,480 (bytes)[/FONT]
[FONT=Courier New]MD5:   a68db3d2e822938fe9f626b82d054a5f[/FONT]
[FONT=Courier New]SHA1:  dc4899c45be32472c925123395c502f3852b9d24[/FONT]
 
[FONT=Courier New]Checksums for 'MD5 Checksum v1.1.apk': [/FONT]
[FONT=Courier New]MD5:   0f70015e405e08470ea705161a1a5253 [/FONT]
[FONT=Courier New]SHA1: f15cf0fb4dca386a154b1eecccc8d7b13267421a[/FONT]
Note: if you have problems downloading via the stock browser, try using a different browser (Opera Mini works just fine).

Our esteemed erisuser1 has long been exhorting folks to verify the size and checksums of the files that they download (see thread over on XDA [Begging] Devs - please publish your MD5's - xda-developers and this post http://androidforums.com/eris-all-things-root/127861-universal-eris-root-dummies-7.html#post1296149).

I originally created the MD5 Checksum (v1.0) app (ref. http://androidforums.com/htc-droid-eris/138831-verify-your-files-md5-checksums.html) to assist in this effort.

To try to take it one step further and in lieu of a real (very difficult at this time to do on the phone) 'jarsigner -verify', I have updated my MD5 Checksum app to now include a basic ROM checksum verification feature. Note: this does not have to be used exclusively for ROMs--this verification can be done on any type of file.

It does this by comparing a selected file's checksum (either MD5 or SHA1) and file size against a database of known values.
 
Here's the details about what has (and has not) changed:

1. The original, basic function of the app remains intact and unchanged.

2. At startup, the app loads a file named "checksumdb.txt". This file contains file name, file size, and checksum (both MD5 and SHA1) information about many (approx. 70) of the well-known Eris custom ROMs.

3. Next, when you input the name of a file (yes, a file-selector feature is still very desireable and is forthcoming), the app will, as before, calculate either an MD5 or an SHA1 checksum depending on which you selected via the radio button.

4. Then, the app will scan through the information from the checksumdb.txt file previously loaded at startup and will look for entries whose filesize and checksum match the entered file.

4a. If the filename, filesize, and selected checksum all match the information loaded from the checksumdb.txt, you will see a pop-up indicating "- VERIFIED -" (with an "Awesome!" button :)).

4b. If only filesize and checksum match the database, then you will see "- verified -" (with an "awesome!" button) displayed. Additionally, the presumed name of the file from the database will be included in the pop-up.

4c. If the file is not found in the database at all, you will see the same information that you normally would (i.e., no pop-up).

That's about it. I'll go back and update the other thread (http://androidforums.com/htc-droid-eris/138831-verify-your-files-md5-checksums.html) when time permits.

Screenshots:

1-splash.jpg 2-file-input.jpg 3-processing-md5.jpg 4-verified-md5.jpg 5-processing-sha1.jpg 6-verified-sha1.jpg 7-verified-md5.jpg 8-verified-md5.jpg
 
Notes:

1. The checksumdb.txt file can be located in either /sdcard (checked first) or /sdcard/download (checked second).

2. A file-selector feature is being worked on so that you don't have to type-in the filename...stay tuned...

3. SHA1 checksums can take a very long time to calculate, especially for very large files (so, be patient or choose MD5). The "Calculate" button will remain red while the checksum is being calculated.

4. There are obviously new custom ROMs being created all the time, so the checksumdb.txt file will need to be updated, but the app will not.

5. If you find a new ROM that is not in the checksumdb.txt and happen to download it, feel free to post in this thread the ROM name, file size (in bytes), and its MD5 and/or SHA1 checksum, and I will update the checksumdb.txt file in this thread for the benefit of all.

6. The old, v1.0 version of this app obviously does not know about the checksumdb.txt file and cannot verify against it.

7. The files that are in the checksumdb.txt file do not have to be ROMs--they can actually be any file type whatsoever.

8. Just like the original v1.0 app, this one was developed to be able to run on Android version 1.5 and higher.

9. The checksumdb.txt file was created for this app by downloading approximately 70 Eris ROMs (more than six gigabytes worth) and calculating both their MD5 and SHA1 checksums. Yeah, it took me a while :eek:.

Click below to view a sample (top portion) of the checksumdb.txt file:
Code:
// ------------------------------------------------------------------------------------------------------------
// checksumdb.txt - for ScaryAlienWare's MD5 Checksum v1.1 app
//                  last updated 05-Sep-2010 14:24
//
// format of non-comment entries:
//        
//    <phonetype> <filetype> <checksumtype> <filename> <filesize> <checksum>
//
//  where    <phonetype> = "desirec" (for the Eris); field is reserved for future use
//
//            <filetype> = "ROM"  for custom ROMs; field is reserved for future use
//                         "upd"  for update.zip-type files
//                         "file" for everything else
//
//        <checksumtype> = "MD5" for MD5 checksums
//                         "SHA1" for SHA1 checksums
// 
//            <filename> = name of the file being registered in this database; do not include spaces/blanks
//                         in the filename or else this line will not be correctly parsed
//
//            <filesize> = size of the file in bytes
//
//            <checksum> = value of either the MD5 or SHA1 checksum of the file
//
// ------------------------------------------------------------------------------------------------------------
// testing files
//
any       file MD5  gscript.zip                          3915189     92796a8c6e61e8f1ee36e315c0acae7d
any       file SHA1 gscript.zip                          3915189     8e624c04db2a7fcbfd48ce5ae015d9ea890fda26
// ------------------------------------------------------------------------------------------------------------
// CPCookieMan's ROMs
//
desirec   ROM  MD5  TheCookieRomV0.34.zip              111685324     1e77c7591987a722464202dfba93b395
desirec   ROM  MD5  TheCookieRom_0.4.zip               112053696     f176d1774ca1c877c26989f6335cb107 
//
desirec   ROM  SHA1 TheCookieRomV0.34.zip              111685324     407adeb11f7822c284d2912d4f48a245a4f71afc
desirec   ROM  SHA1 TheCookieRom_0.4.zip               112053696     fa7f211d75d56bec9c013311c921c6e190d9399b
//
// ------------------------------------------------------------------------------------------------------------
// Conaps's ROMs:
//
desirec   ROM  MD5  CELBFroyo2.1.zip                    53788185     450ab221a13d0890438dee0494c14f6b  
desirec   ROM  MD5  CELBFroyo2.2.zip                    56835915     a83a52344b123ae7c8c32ddb5d93d163  
desirec   ROM  MD5  CELBFroyo2.3.zip                    57785330     f91fed960a3f3f5270271cecd901d802  
desirec   ROM  MD5  CyanogenELB2.8.zip                  54300252     9921f2c41b7ca86180277e39d9d0e915  
desirec   ROM  MD5  DroidDoesPink2.0.zip               104301735     6f1bbcd11060acf9b4c62b41129c973e  
desirec   ROM  MD5  ErisLightning3.02.zip              101481107     3f272f3d859aeeb777163c4fe681efa4  
desirec   ROM  MD5  ErisLightningBolt1.4.zip            97205705     d438f214890b598cc9e9d630b39b61fb 
// 
desirec   ROM  SHA1 CELBFroyo2.1.zip                    53788185     48a4fd29a25a95faa3a685895b14d0b7df6ebc3a
desirec   ROM  SHA1 CELBFroyo2.2.zip                    56835915     5e2fbf7bb6c5d6a96d45702d2fe699aea14c9221
desirec   ROM  SHA1 CELBFroyo2.3.zip                    57785330     5109fe7441ce347229392926dcca1dc373381d7c
desirec   ROM  SHA1 CyanogenELB2.8.zip                  54300252     08bb790eb24665a1f0337f0040c928efcb308f7e
desirec   ROM  SHA1 DroidDoesPink2.0.zip               104301735     d4f81da8699eb414501700858869f13292620113
desirec   ROM  SHA1 ErisLightning3.02.zip              101481107     a2f59baa8b865d2171f40fdcd05572a63c51ab53
desirec   ROM  SHA1 ErisLightningBolt1.4.zip            97205705     3910e88601b3c400623fb25623df4a06550f63dd
I hope this is helpful. Let me know what you think. Cheers!
 
Future features / changes planned:

1. Progress bar during jar file verification
2. Log file output of jar file verification
3. Possibly do jar file certificate checking
4. Add menu functions (display info, help, etc.)
5. Support Nandroid backup directory verifier (calculate MD5 sums for each file (boot.img, data.img, and system.img) and audit against nandroid.md5 file)
6. Sort the filename display in the file-selector
7. Update the OP with new screenshots
 
Upvote 0
All,

I've updated the OP to include the latest 2.1 version of my app. This version should allow you to verify that your custom ROMs that you downloaded are valid.

This new version now includes a file selector (text input is now optional) and two jar-verification functions.

The "JV1" radio button selects jar verification method #1. This method basically does an intrinsic jar verification by virtue of using the JarFile Java methods and an explicit read / re-calculate / compare against the MANIFEST.JF. Verifying Ivan's 1.0 ROM (100MB in size) using this method on my Droid X takes 2.5 minutes.

There is also a "JV2" (jar verification method #2) that simply uses the intrinsic JarFile Java digest verification. This function is MUCH faster and presumably just as valid as the explicit function I originally wrote. Verifying Ivan's 1.0 ROM using this method on my Droid X takes only 23 seconds.
cool.gif


Thanks again and please let me know what you think or if you have any questions.

Cheers!
 
Upvote 0
I've just used Chrome to Phone for the first time, in order to download these file. (Which worked perfectly, by the way.)

Thanks! This is fantastic.

You are most welcome, doogald! Thanks for the encouragement, I very much appreciate it.

I'm really using this as an opportunity to learn Android app development...its kind of funny, the hard stuff is easy, and the easy stuff is hard :D.

I've learned a ton and had a gas doing this... I just wanted to do something to give back to everyone and contribute something useful. I hope this helps some folks avoid some pitfalls by helping to ensure that their files and ROMs are whole and intact.

More tweaks coming as I learn stuff...:)
 
Upvote 0
SA, FYI, the link in the OP for the new version doesn't work.

doogald,

Sorry about that and thanks for the heads-up. I've got it fixed now. I uploaded it to here from work via copy from XDA... I obviously thought it was okay...a fresh copy from my desktop here at home has been uploaded.

The new version has all of the newest toys and took me quite a while to figure-out (the file-selector feature was not easy, lol (but neither was the jar file verification)).

Thanks again and if you guys try it out, let me know what does and does not work and whatever suggestions you might have for improvement. I'd love to hear from you.

Cheers!
 
Upvote 0
The new version has all of the newest toys and took me quite a while to figure-out (the file-selector feature was not easy, lol (but neither was the jar file verification)).

It definitely does work for me. I checked the CFS V5 kernel .zip I downloaded with Dropbox yesterday. MD5 matches, and it passes verification. I'm dowloading xtrROM 4.5 CFS beta right now, so I'll check that as well.

My only comment is that the file selector font size is small - you have to be careful about what you pick. It's not a big deal, really.
 
Upvote 0
It definitely does work for me. I checked the CFS V5 kernel .zip I downloaded with Dropbox yesterday. MD5 matches, and it passes verification. I'm dowloading xtrROM 4.5 CFS beta right now, so I'll check that as well.

My only comment is that the file selector font size is small - you have to be careful about what you pick. It's not a big deal, really.

Thank you very much! And, lol...I really tried to make the rows and font bigger. I actually don't specify a font or size at all ("Android" decided how small to make it).

I tried lots of things a few weeks ago when I worked on the core of the file-selector code, and I could either make it work like it does or not at all (i.e., Yoda must have been imposing a "do, or do not--there is no try" on me ;)). Its just my learning-curve...I'll get there.

This is one of the tweaks that I want to make...along with adding a little icon to identify a file vs. a folder/directory (vs. my current "d: " directory designation).

Thank you very much for your feedback. I'll put that issue at the top of my list. :)
 
Upvote 0
It worked perfectly with xtrROM 4.5. However, I have noticed that the app is a bit weird when rotated landscape - it doesn't seem to pop up the completion dialog for the JV2 check. Is there a way to make it ignore rotation and work portrait only? Does it work differently for you?

I have noticed some odd behavior when I switch from portrait to landscape in the middle (i.e., like it re-launches the app?), but I've never not see the appropriate pop-up dialogs not show up.

I've done the bulk of my testing on my my Droid X and when I launch it in portrait and then switch to landscape before selecting a file, it does give me the "Jar Verfication Success" pop-up. The app's main screen was built with an AbsoluteLayout which might not be best suited for all devices, however, I didn't really notice too much difference in displays between my Eris and my X.

I'll check it out some more and get back with you.

By the way, I've got the larger rows with bigger text (scale-independent font size ;)) that will make file selection MUCH easier. I think the issues I originally with this had were due to me just not having a clue :D. I'll be sure to publish a new version sometime this weekend (I'm going to try to put in a few other little goodies too while I'm at it).

Thanks again...you are really the only one that's given me feedback so far, which I greatly appreciate. I'm hoping other folks have downloaded and tried it (especially eu1, since I built the jar verification feature principally from his "nudgings" :)).
 
Upvote 0
SA, I tried all sorts of rotation - rotating in the middle of a verification, holding it portrait all of the time, holding it landscape all of the time. I think that the landscape, no dialog only happens when the display sleeps in the middle of the check. I just checked a smaller .zip file, and it displayed the dialog; a larger one did not. It worked fine, though, when portrait, even when the display sleeps.

I do also get Force Close/Wait messages if I touch the display while it is doing a verification. That may be sometimes, actually. It happened a few times, but I didn't check for this all of the time.
 
Upvote 0
SA, I tried all sorts of rotation - rotating in the middle of a verification, holding it portrait all of the time, holding it landscape all of the time. I think that the landscape, no dialog only happens when the display sleeps in the middle of the check. I just checked a smaller .zip file, and it displayed the dialog; a larger one did not. It worked fine, though, when portrait, even when the display sleeps.

I do also get Force Close/Wait messages if I touch the display while it is doing a verification. That may be sometimes, actually. It happened a few times, but I didn't check for this all of the time.

I've booted-up my Eris and have been JV1 and JV2 testing some smaller jar's like you and I too get the pop-up dialogs in both landscape and portrait. I'm not exactly sure what happens during the screen rotation, other than I it must do something like a context change (similar to pressing the back key, I presume). I'll have to read-up on how to deal with the rotation issue to see if there's anything I can do regarding this.

I too have seen the Force Close/Wait dialog...I would guess that if you touch the screen (or have any other activity in the background that requires a smidgen of CPU time) that you'll get this message since its such a CPU-intensive application.

By the way, I've just replicated your landscape-mode, large-ROM JV1 test and didn't get the pop-up either. I also know that some of the lines of text that I display at the bottom of the screen won't show up at all in landscape mode (again, due to me designing things initially for portrait-mode).

Man, coding for all contingencies is going to be quite a challenge, lol--I was just happy to make the app actually do what I wanted and display things in a palatable manner ;).

Thanks again!
 
Upvote 0
All,

Uploaded new v2.2 in the OP above.

Lots of minor changes, fixes, enhancements (no major changes--just cleaned and refined things up a bit).

You can also reference eu1's thread and this post over at XDA for more details (xda-developers - View Single Post - [Begging] Devs - please publish your MD5's).

Changes in the 2.2 version include:

1. larger rows and font for easier/better file-selection
2. sorted list of files displayed in file-selector
3. retain directory between each file-selection
4. verify read-access of selected file to prevent force-close
5. test file's suffix to warn if non jar-type file is selected for jar-verification
6. add menu support (help, change log, acknowledgements)

Let me know if you have any questions, comments, issues, suggestions, etc.

Cheers!
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones