Guest McSpoon Posted December 24, 2009 Report Posted December 24, 2009 (edited) I've created a simple Perl script to unpack the contents of the UPDATA.APP files. So far all of the updates that T-Mobile and Huawei have produced for the Pulse are in the form of an UPDATA.APP file and this script will extract the boot, recovery and system images from that package. This is only useful if you wish to use parts of an update to cook your own customised rom. split_updata.pl.txt The webserver wouldn't allow me to upload a .pl script so I've given it a .txt file extension. You'll have to rename it to just split_updata.pl Useage: perl split_updata.pl updata.app It will extract 25 files. Some of them are obvious, like the boot and system images, but there are many I don't recognise. For the time-being I've used a .mbn file extension for the unknown files because I think they might be appsboot.mbn, oemspl.mbn, amss.mbn and such-like. If you compile the CodeAurora AOSP code you'll notice it produces appsboot.mbn and appsboothd.mbn alongside the boot and system images. I don't know what they are but they have similarities with some of the files in the UPDATA.APP package. I don't often use Perl so I'm sure there are better ways to script this. You are more than welcome to make improvements. And it would be great if we can identify what each file does. Note: This script will only unpack the file. Repackaging it would be very tricky because it contains checksums that would have to match. *** UPDATE *** There is now a much improved version of this script over in this thread. Please use that version as it's far more stable and robust. Full kudos to ZeBadger and all those involved in enhancing it. Edited August 16, 2010 by McSpoon
Guest _Sebastian_ Posted December 25, 2009 Report Posted December 25, 2009 (edited) I've started to write a script yesterday night too - So i don't need to finish it thanks McSpoon :) Edit: Maybe the links will help to clarify some questions: http://translate.google.com/translate?js=y...sl=de&tl=en http://androidenea.blogspot.com/2009/06/an...m-power-on.html Edited December 25, 2009 by _Sebastian_
Guest Timmmm Posted December 25, 2009 Report Posted December 25, 2009 How did you find the format of this file? Guesswork?
Guest McSpoon Posted December 26, 2009 Report Posted December 26, 2009 How did you find the format of this file? Guesswork? Yep, just guesswork from looking at it in a hex editor. I noticed many recurrences of a "HWU8220" string. Each occurrence is surrounded by 92 bytes that are almost identical except a few bytes change each time. The bytes that differ turn out to be the offset to the where an embedded file starts, and it's length. From that we can extract the files. Each section goes like this... Offset Length Description 0x00 4 Always the same identifier 0x55AA5AA5. 0x04 4 The length of this data section. 0x08 4 Always 1. 0x0C 8 The string "HWU8220" followed by 0xFF. 0x14 4 The file length. ...By this stage, we already know the length of the data section (so we can skip the rest of it and go straight to the part where the file starts) and the file length. I haven't bothered to dissect the rest of the section. It mostly seems to be strings containing the date, the version number, the word "INPUT" and a random length of data which I'm guessing is a checksum. I'm certain that checksums exist because, within the file is the T-Mobile splash image you see at boot-up, and I tried changing that to a different one (as it will always be 307200 bytes in length) but it wouldn't install the update. It knew the file was inconsistent and rejected it. So we're stuck with the T-Mobile logo for now. :)
Guest Basher52 Posted March 18, 2010 Report Posted March 18, 2010 (edited) do i have to run it as a simple command in command line? Got the lastest Rom somebody founds on huawei, but dont know how to use your script :) Do both files have to be in the same folder? Edited March 18, 2010 by Basher52
Guest mlove2 Posted May 4, 2010 Report Posted May 4, 2010 I've created a simple Perl script to unpack the contents of the UPDATA.APP files. So far all of the updates that T-Mobile and Huawei have produced for the Pulse are in the form of an UPDATA.APP file and this script will extract the boot, recovery and system images from that package. This is only useful if you wish to use parts of an update to cook your own customised rom. split_updata.pl.txt The webserver wouldn't allow me to upload a .pl script so I've given it a .txt file extension. You'll have to rename it to just split_updata.pl Useage: perl split_updata.pl updata.app It will extract 25 files. Some of them are obvious, like the boot and system images, but there are many I don't recognise. For the time-being I've used a .mbn file extension for the unknown files because I think they might be appsboot.mbn, oemspl.mbn, amss.mbn and such-like. If you compile the CodeAurora AOSP code you'll notice it produces appsboot.mbn and appsboothd.mbn alongside the boot and system images. I don't know what they are but they have similarities with some of the files in the UPDATA.APP package. I don't often use Perl so I'm sure there are better ways to script this. You are more than welcome to make improvements. And it would be great if we can identify what each file does. Note: This script will only unpack the file. Repackaging it would be very tricky because it contains checksums that would have to match. man do you have CHT8000 rom?
Guest ZeBadger Posted June 4, 2010 Report Posted June 4, 2010 Has there been any progress on working out where the checksums are? I'm thinking of having a bash, but if anyone has any more information then that would be appreciated.
Guest ZeBadger Posted June 6, 2010 Report Posted June 6, 2010 (edited) Has there been any progress on working out where the checksums are? I'm thinking of having a bash, but if anyone has any more information then that would be appreciated. Okay... I have no idea how far people have gone with all this, so I've just started from scratch. I've dumped the december update using this script. boot.img contains a ROMFS file and a CPIO image of the filesystem. recovery.img contains an identical ROMFS file and a CPIO image of the filesystem with a few more bits and bobs. I have found the checksums for these files in the UPDATA.APP file. eg "18 89 db e0" is the boot CPIO image checksum (reversed) and is at offset 0145c38A Is this of any use to anyone? Got to go to bed, but I can work on adding more to the file format tomorrow. I'm guessing that we can remove that horrible pink t-mobile logo :) ZeBadger PS Checksum of the dumped splash image is : 69FD5EC9 (C9 5E FD 69 reversed), in both the UPDATA.APP files I've looked at, but I can't find it in the UPDATA.APP file :) Edited June 6, 2010 by ZeBadger
Guest ZeBadger Posted June 7, 2010 Report Posted June 7, 2010 I have found the checksums for these files in the UPDATA.APP file. eg "18 89 db e0" is the boot CPIO image checksum (reversed) and is at offset 0145c38A Okay, while getting ready for work this morning I've realised that these CRCs are part of the gzip in the img files and not part of the UPDATA.APP file. I'll keep working on it!
Guest sreeramu Posted August 14, 2010 Report Posted August 14, 2010 Hi, This script is not working correctly to me, is there is any other tool to extract UPDATE.APP... Thanks in Advance....:D
Guest DanWilson Posted August 14, 2010 Report Posted August 14, 2010 Hi, This script is not working correctly to me, is there is any other tool to extract UPDATE.APP... Thanks in Advance....:D Yes, the new script. It's in the "Repacking UPDATA.APP" thread...
Guest sreeramu Posted August 14, 2010 Report Posted August 14, 2010 (edited) Yes, the new script. It's in the "Repacking UPDATA.APP" thread... Thanks for your replay......i will check that post...... Edited August 14, 2010 by sreeramu
Guest DanWilson Posted August 14, 2010 Report Posted August 14, 2010 Thanks for your replay......i will check that post...... Wait - do you have a Pulse or an HTC Touch 3G (whatever that is)? This only works for T-Mobile Pulse UPDATA.APP's.
Guest Speckles Posted August 14, 2010 Report Posted August 14, 2010 I've also produced a windows program which will extract the contents of UPDATA.APPs, but it has the same restrictions as the perl script.
Guest sreeramu Posted August 14, 2010 Report Posted August 14, 2010 I've also produced a windows program which will extract the contents of UPDATA.APPs, but it has the same restrictions as the perl script. Can i Know the Restriction ... in the latest perl script we need linux system .... what is the restriction you are telling about....
Guest ZeBadger Posted August 14, 2010 Report Posted August 14, 2010 Can i Know the Restriction ... in the latest perl script we need linux system .... what is the restriction you are telling about.... Won't it work with ActivePerl for Windows?
Guest Speckles Posted August 14, 2010 Report Posted August 14, 2010 Can i Know the Restriction ... in the latest perl script we need linux system .... what is the restriction you are telling about....As stated above - It will only work for T-Mobile Pulse UPDATA.APP's.
Guest sreeramu Posted August 14, 2010 Report Posted August 14, 2010 Thanks For All your replays , i used ubuntu and extracted the UPDATE.APP with latest perl script...thanks once again....
Guest Tomas.S Posted August 16, 2010 Report Posted August 16, 2010 Hello there! I'm looking for the boot.img of my phone, bacause I'va flashed the boot image with a wrong one (I have U8220-6), so what I did is download my rom and unzip it. Inside there was the UPDATA.APP so I used your script. I have extracted the files successfully. But the problem is here: The boot.img is only 40 B. I tried to flash it but it is too small (it should be around 1 MB). Maybe one of the other files is the boot image. Do you know something? Thanks!
Guest ZeBadger Posted August 16, 2010 Report Posted August 16, 2010 (edited) Hello there! I'm looking for the boot.img of my phone, bacause I'va flashed the boot image with a wrong one (I have U8220-6), so what I did is download my rom and unzip it. Inside there was the UPDATA.APP so I used your script. I have extracted the files successfully. But the problem is here: The boot.img is only 40 B. I tried to flash it but it is too small (it should be around 1 MB). Maybe one of the other files is the boot image. Do you know something? Thanks! The script linked to in the first post on this topic unpacks the correct filenames... you also need the crc binary downloaded to the same location. It only works on Linux... if you remove the crc checking it'll work on anything running perl. Edited August 16, 2010 by ZeBadger
Guest James Kei Posted May 24, 2011 Report Posted May 24, 2011 (edited) **** SD download log **** Failure: OEMSBL version unmatched. Failure: operation did not succeed. Failure: operation did not succeed. Failure: operation did not succeed. Failure: operation did not succeed. Failure: operation did not succeed. dload_sd_ram_data_proc->(retry >= DLOAD_RETRY) failed! YES. Using the Perl script method, as work around to flash with CWM recovery works. But however, my U8220 was 1.5 ROM partition size, still have small /system ~85mb and large /data ~105mb, which UK 2.1 stock ROM changed size. this still do not resolve all my issues. James Edited May 24, 2011 by James Kei
Guest tittyjohn Posted November 9, 2012 Report Posted November 9, 2012 Great work.. It works with U8100 Canada Wind Update.APP
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now