Jump to content

Repacking UPDATA.APP (was New version of split_updata.pl)


Guest ZeBadger

Recommended Posts

Guest TJ Style
Yes it looks like they've changed the format for the U8800 slightly. There seems to be some extra data before each file (I briefly looked into it but gave up). I just hope they haven't been modifying bin2app.exe for different devices.

I have to debug the bin2app.exe but it seems the device specific tools. i see is just for E600 device. but i hope this bin2app.exe can be used with other devices.

and for U8800 i see the updata is missing 55 AA 5A A5 signature on some partition.

Edited by TJ Style
Link to comment
Share on other sites

  • 1 month later...
Guest goodoane
I have to debug the bin2app.exe but it seems the device specific tools. i see is just for E600 device. but i hope this bin2app.exe can be used with other devices.

and for U8800 i see the updata is missing 55 AA 5A A5 signature on some partition.

Have you succeded to unpack the new type of updata.app file?...

If anyone has a solution for this please post here.

Thank you.

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 months later...
Guest projectshadow

file02.mbn appears to contain CRC checksums for some of the files. I'm guessing that it's not a 4096 byte checksum in this one, coz I can't find the checksum for larger files, so I just need to work out the size used... leave me on it :lol:

eg for the Time Machine rom

$ hd file02.mbn

00000000  27 91 42 fd f9 ac 26 fc  87 21 01 3e 48 9a de c9  |'.B...&..!.>H...|

00000010  d1 64 af 9f 4d 42 4f 10  04 1d 09 9d	  		|.d..MBO.....|

0000001c


boot_versions.txt 2791  (bytes 1 and 2)

upgradable_versions.txt 099D (last 2 bytes)

version.txt 099D  (last 2 bytes as well... ahem)

file01.mbn 2109 

file02.mbn 7A7A (It can't contain the checksum for itself)

file04.mbn 42FD (bytes 3 and 4)

file05.mbn 01C9

i need your help if you can

I want to return to the original version (U8510-1 V100R001C02B827 (Portugal Vodafone)) U8510

I have update to this U8650 V100R001C223B826 (Malaysia General) U8650

Please help, i dont wont noting else tks

Edited by projectshadow
Link to comment
Share on other sites

Guest McSpoon

I want to return to the original version (U8510-1 V100R001C02B827 (Portugal Vodafone)) U8510

I have update to this U8650 V100R001C223B826 (Malaysia General) U8650

Have you tried installing the original firmware for your U8510?

In case you haven't, the links can be found at the wiki: http://wiki.modaco.c..._Firmware_U8510

Within the zip file there will be a .PDF document explaining how to flash it. If it works it will restore your phone back to it's original state thereby losing any changes you've made. If it doesn't then you're screwed. Good luck.

Link to comment
Share on other sites

Guest projectshadow

Have you tried installing the original firmware for your U8510?

In case you haven't, the links can be found at the wiki: http://wiki.modaco.c..._Firmware_U8510

Within the zip file there will be a .PDF document explaining how to flash it. If it works it will restore your phone back to it's original state thereby losing any changes you've made. If it doesn't then you're screwed. Good luck.

yes i try and he say update fail, the possible problem is the "time machine"... if you read the U8650 and U8510 pdf you see compatibility models (upgradable_versions.txt i think)

file02.mbn appears to contain CRC checksums for some of the files. I'm guessing that it's not a 4096 byte checksum in this one, coz I can't find the checksum for larger files, so I just need to work out the size used... leave me on it :lol:

eg for the Time Machine rom

$ hd file02.mbn

00000000  27 91 42 fd f9 ac 26 fc  87 21 01 3e 48 9a de c9  |'.B...&..!.>H...|

00000010  d1 64 af 9f 4d 42 4f 10  04 1d 09 9d  			|.d..MBO.....|

0000001c


boot_versions.txt 2791  (bytes 1 and 2)

upgradable_versions.txt 099D (last 2 bytes)

version.txt 099D  (last 2 bytes as well... ahem)

file01.mbn 2109 

file02.mbn 7A7A (It can't contain the checksum for itself)

file04.mbn 42FD (bytes 3 and 4)

file05.mbn 01C9

Edited by projectshadow
Link to comment
Share on other sites

  • 4 weeks later...

Hi TwRock,

I've done some tests with the Kitchen (very nice tools to create custom ROM and easy to play with)

I still miss the perl script to repack an UPDATA.APP file.

The reason for is that the last BYTEL upgrade "messed" the bootloader (below the boot & recovery image, the one that has the u-boot if I'm correct).

Upgrade from UPDATA can upgrade the bootload (I've check the output folder of the unpack and found the file but cannot flash it with fastboot).

Therefore the only possibility left is to modified a previous original UPDATA.APP file by adding the last BYTEL version in the list of ROM (boot_versions.txt & upgradable_versions.txt) and to start a standard upgrade.

THX for your helping to find the repack perl scripts.

Link to comment
Share on other sites

Hi TwRock,

I've done some tests with the Kitchen (very nice tools to create custom ROM and easy to play with)

I still miss the perl script to repack an UPDATA.APP file.

The reason for is that the last BYTEL upgrade "messed" the bootloader (below the boot & recovery image, the one that has the u-boot if I'm correct).

Upgrade from UPDATA can upgrade the bootload (I've check the output folder of the unpack and found the file but cannot flash it with fastboot).

Therefore the only possibility left is to modified a previous original UPDATA.APP file by adding the last BYTEL version in the list of ROM (boot_versions.txt & upgradable_versions.txt) and to start a standard upgrade.

THX for your helping to find the repack perl scripts.

Even thought the first post mentions repacking, I am unaware that anyone ever was successful in doing it. I do not have anything more than the split scripts.

Link to comment
Share on other sites

  • 2 weeks later...
Guest ZeBadger

Oups !

Seems that the two links to the file download are broken

Whoops, zebadger.com dns messed up somehow. Sorted now.

I haven't got any time to look at this at the moment... I bought a HTC Desire a while back too, so interest has waned a little!

Link to comment
Share on other sites

  • 3 months later...
Guest PaulMilbank

Hi Zebadger, how did you determine the locations for the files referenced in the updata.app file? I am wanting to modify your script to pull the correct files out of a u8800 update.app and make a flashable zip for CWM. Any help would be appreciated.

*edit* heh, looks like I am not the only one, guess this is more complicated than I thought it would be.

Edited by PaulMilbank
Link to comment
Share on other sites

Guest PaulMilbank

Yeah, I'm gonna look at producing something for the u8800 next week... Stay tuned!

That would be amazing if you could get it working, so keen to start getting the kitchen working for this phone.

Link to comment
Share on other sites

Guest ZeBadger

That would be amazing if you could get it working, so keen to start getting the kitchen working for this phone.

Looks easy enough, but I'm not sure what you'll do with it once the files are split out.

Link to comment
Share on other sites

Guest ZeBadger

Looks easy enough, but I'm not sure what you'll do with it once the files are split out.

I have run the code as-is... and it extracts okay. Maybe some of the files aren't named correctly, but they do extract.

Link to comment
Share on other sites

Hi ZeBadger,

cool to have you around.

It looks like official roms (UPDATA.APP) are able to somehow repartition ROM memory.

We are installing UK Pulse rom from year 2010 only to obtain 100MB system partition to somehow fit our ever increasing in size custom roms.

Question: may be you have an idea which part of UPDATA.APP is responsible for repartitioning and if it possible to use that part separately from the other rom components. Like flash something with fast boot for example...

Ideally we would want to control partitions sizes ourselves (looks G1 people can do that...) In short we need bigger system partition in expense of data partition for our future roms, as sd card is used for app storage anyway...

What are your thoughts?

Link to comment
Share on other sites

Guest PaulMilbank

I have run the code as-is... and it extracts okay. Maybe some of the files aren't named correctly, but they do extract.

I have run the script too on the b522 update.app and have a semi working system.img as well as a couple of user/appdata files that extract. It is not pulling the correct boot.img out. I am getting four unknown files named unknown_file.0-3. they dont seem to come from the file name/hash list and I think one of them is the boot.img, but I dont know how to tell if one of them it is.

I have looked at the system.img and oddly it does not have odex files for the apk's so I am wondering if there is another file for the odex information?

If we could get this update.app extracted, we could make use of the good huawei enhancements for existing GB roms and hopefully speed up development of new roms. I would also like to have this to begin testing .35 kernels on GB.

Thanks again

Link to comment
Share on other sites

Guest ZeBadger

Question: may be you have an idea which part of UPDATA.APP is responsible for repartitioning and if it possible to use that part separately from the other rom components. Like flash something with fast boot for example...

I'm afraid I have no idea. I have never looked at what each file is or what it does. I was just up for the challenge of splitting them out effectively (and repacking them, but I failed on that one :( )

I have run the script too on the b522 update.app and have a semi working system.img as well as a couple of user/appdata files that extract. It is not pulling the correct boot.img out. I am getting four unknown files named unknown_file.0-3. they dont seem to come from the file name/hash list and I think one of them is the boot.img, but I dont know how to tell if one of them it is.

I have looked at the system.img and oddly it does not have odex files for the apk's so I am wondering if there is another file for the odex information?

I don't know either I'm afraid, you'll have to work it out based on the content of the files extracted. I think you're best just treating the filenames as file1.bin file2.bin file3.bin etc and working it out from scratch.

I also don't know what an odex is.

Link to comment
Share on other sites

  • 3 weeks later...

Hi,

I have extracted the following files from the U8800Pro UPDATE.APP:

0xf3000000 (MD5_RSA)

0xf4000000 (crc.mbn)

0xf6000000 (dbl.ver)

0xa0000000 (dbl.mbn)

0xe0000000 (osbl.mbn)

0xf5000000 (osbl.ver)

0x60000000 (adsp.mbn)

0x80000000 (modem_st1.mbn)

0x90000000 (modem_st2.mbn)

0x40000000 (system.img.ext3)

0x00000000 (userdata.img.ext3)

0x20000000 (splash_5x480x595.rgb565)

0xf7000000 (?)

0xb0000000 (fat.mbn)

0xf9000000 (?)

The names in parentheses are the file names I have found parsing the osbl.mbn (0xe0000000) file.

I think that the upgrade more or less just copies the following files to emmc partitions:

0xa0000000 (dbl.mbn) to /dev/block/mmcblk0p2

0xe0000000 (osbl.mbn) to /dev/block/mmcblk0p3

0x60000000 (adsp.mbn) to /dev/block/mmcblk0p9

0x80000000 (modem_st1.mbn) to /dev/block/mmcblk0p10

0x90000000 (modem_st2.mbn) to /dev/block/mmcblk0p11

0x40000000 (system.img.ext3) to /dev/block/mmcblk0p12

0x00000000 (userdata.img.ext3) to /dev/block/mmcblk0p13

0xb0000000 (fat.mbn) file isn't an image of a fat partition, but rather a custom archive. It is unpacked and its contents (/image directory) written to fat partition /dev/block/mmcblk0p1.

The boot process (as I have found elsewhere on the net) looks something like this:

The boot code in rom first loads dbl (Device Boot Loader) from /dev/block/mmcblk0p2, the dbl then loads osbl (OS Boot Loader) from /dev/block/mmcblk0p3. osbl checks if there is dload folder on the sdcard and if found, does the upgrade. Otherwise it mounts /dev/block/mmcblk0p1, loop mounts /image/boot.img, loads zImage and android takes off...

Upgrade itself (as you have already found out) first verifies crc.mbn against MD5_RSA and then uses crc.mbn to verify each file as it gets extracted and processed...

Link to comment
Share on other sites

@llogar,

can you assemble back the update? I mean a modified version.

I'd like to change for example splash screen, to begin with... May be switch bootloaders between roms, to achieve different partition sizes...

Link to comment
Share on other sites

@llogar,

can you assemble back the update? I mean a modified version.

I'd like to change for example splash screen, to begin with... May be switch bootloaders between roms, to achieve different partition sizes...

No, UPDATE.APP si digitally signed with a private key only Huawei has.

What could probably be done, is patch osbl to ignore signature verification and save it to /dev/block/mmcblk0p3

Then it would be possible to do an upgrade from a non huawei UPGRADE.APP...

Link to comment
Share on other sites

  • 1 month later...
Guest jgilalonso

No, UPDATE.APP si digitally signed with a private key only Huawei has.

What could probably be done, is patch osbl to ignore signature verification and save it to /dev/block/mmcblk0p3

Then it would be possible to do an upgrade from a non huawei UPGRADE.APP...

Hi,

I tried to use 3 downgrade time machine files and UK, Hungarian 2.1 stok rom but none of them worked.

I still have the same error log on my SD Card :

**** SD download log ****

Failure: MD5_RSA verify failure.

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!

@llogar, is possible generate a UPDATA.APP without MD5_RSA verification?

I only want install a ROM.

At this moment I can't access with fastboot, either.

Thanks

Link to comment
Share on other sites

Guest terrex

Hey man! I'm trying to make a packer, firstly based on your unpacker. It is at https://github.com/terrex/unupdatapp

I will appreciate any help you can lead to me, i. ex., source code for your crc program, to be included itself in the packer/unpacker.

At this moment, I have finished the unpacker side; I will start with the packer soon.

Thanks to you very much.

I've been working on examining UPDATA.APP and have pretty much got most of the file format identified.

I've modified the original split_updata.pl to extract the correct filenames out every time (based on McSpoon's filenames) and also CRC check the extracted file.

Script is here EDIT: I have had to move it to here as my crazy new hosting tries to execute the perl script.

It needs this crc checking binary to be in the same directory (linux only, until I get time to convert the c code to perl)

...

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.