Jump to content

Gen1 to Gen2 TPT upgrade


Guest wbaw
 Share

Recommended Posts

Guest Rotmann
Ok, its just I have had bad expiriences with amonra.

New Question:

Does the cache2tmpfs thingy for froyo roms while using a 2mb cache work on gen2?

Gen2 ROMs don't need that anymore. SS and CM7 redirect the /cache partition automatically.

Link to comment
Share on other sites

IMPORTANT: you have to be Gen1, if you are already converted to Gen2 it may fook your device.

Just out of curiosity: why is that?

To all personell (developer and tester) involved creating these TPT files: thank you all so very much, your work is tremendously appreciated.

Link to comment
Share on other sites

First off, nice switching idea!

To be clear, the rest of this post only applies to "full gen2" phones and the discussion above.

Apparently there's a relation between partition.mbn and oemsbl. It doesn't seem to be a very obvious one, especially since the gen1 and gen2 partitions aren't that different (only FOTA seems different, probably affecting the partitions defined after it as well, which would explain why NV backup/restore is needed, as those are stored in EFS2).

As i understand, going back to gen1 from a fully converted phone only fails at restoring the NV items, which happens after a reboot into the code that was just put in. To be honest, i would have expected CWM in the update package to be a problem here, since the NV items seem to get restored using the FTM protocol, but the problem doesn't appear with gen1->"full gen2" it seems, so there's more to it. Which recovery images were used for the attempts to go back to gen1?

A tool was posted in another thread that includes a NV backup and restore option. (Actually, if you open both the official downloader and that tool with a resource hacker or disassembler, you'll find many similarities. The tools really are the same, but the official one just has a lot of buttons and other controls hidden and the flashing process automated. The backup/restore options can be enabled in the official downloader fairly easily). With this, you can always restore the NV backup containing the IMEI to the phone. If that works, a "full gen2"->gen1 conversion can already be done.

Either way, until we find out what the relation between oemsbl and partition.mbn is, i think it would not be safe to mix those up. I could imagine a gen1 image with a gen2 partition+oemsbl could work, but TPT still wouldn't. On that matter, i wanted to find out the image.bin format before switching my phone to gen2. I think i found the format, but i won't be able to test it, since i'll probably stick to this method to convert my phone now. If someone really wants to test it, i could share my findings, but it's still TPT and can be dangerous to experiment with.

Link to comment
Share on other sites

First off, nice switching idea!

To be clear, the rest of this post only applies to "full gen2" phones and the discussion above.

Apparently there's a relation between partition.mbn and oemsbl. It doesn't seem to be a very obvious one, especially since the gen1 and gen2 partitions aren't that different (only FOTA seems different, probably affecting the partitions defined after it as well, which would explain why NV backup/restore is needed, as those are stored in EFS2).

As i understand, going back to gen1 from a fully converted phone only fails at restoring the NV items, which happens after a reboot into the code that was just put in. To be honest, i would have expected CWM in the update package to be a problem here, since the NV items seem to get restored using the FTM protocol, but the problem doesn't appear with gen1->"full gen2" it seems, so there's more to it. Which recovery images were used for the attempts to go back to gen1?

A tool was posted in another thread that includes a NV backup and restore option. (Actually, if you open both the official downloader and that tool with a resource hacker or disassembler, you'll find many similarities. The tools really are the same, but the official one just has a lot of buttons and other controls hidden and the flashing process automated. The backup/restore options can be enabled in the official downloader fairly easily). With this, you can always restore the NV backup containing the IMEI to the phone. If that works, a "full gen2"->gen1 conversion can already be done.

Either way, until we find out what the relation between oemsbl and partition.mbn is, i think it would not be safe to mix those up. I could imagine a gen1 image with a gen2 partition+oemsbl could work, but TPT still wouldn't. On that matter, i wanted to find out the image.bin format before switching my phone to gen2. I think i found the format, but i won't be able to test it, since i'll probably stick to this method to convert my phone now. If someone really wants to test it, i could share my findings, but it's still TPT and can be dangerous to experiment with.

The TPT method won't let you alter partition.mbn it has to be the same as is already on the phone, otherwise it refuses to flash it. This is why a plain Gen2 files TPT wont flash. In my first attempt I tried using all the gen2 .mbn files along with gen1 partition.mbn partition_zte.mbn appsboot.mbn & appsboothd.mbn - That didn't work, I'm fairly sure it was mixing gen2 oemsbl.mbn & gen1 partition.mbn that broke it. I lost access to the sd card, mobile network, tpt mode & it also made the windows flashing program fail at between 8 & 13%, so no way to recover. I think I ended up flashing a gen2 partition.mbn along with a gen1 oemsbl.mbn at my final attempt to fix it, that made the phone show no sign of life at all, totally dead. So, don't do that!

oemsbl.mbn controls TPT mode, but it's more than just that, if oemsbl is broken then your phone is dead. it's what loads everything else in the radio partitions in the boot process, so it needs to know where those partitions are to work properly. there might be a partition table in it that has to match partition.mbn, like there is with appsboot.mbn & partition_zte.mbn

The package I posted contains a Gen1 partition.mbn & no oemsbl.mbn, so if you flash it to your (windows upgraded or stock) Gen2 phone without including a Gen1 oemsbl.mbn then you've just killed your phone. It might work if you include the missing Gen1 .mbn files, but then you're going to have just the same risk of losing your IMEI as in a Gen1 downgrade.

I'd love to hear about the image.bin file format.

Edited by wbaw
Link to comment
Share on other sites

Guest burstlam

is that mean the GEN2 upgrade thr TPT is not identical to the upgrade thr official downloader?

does the TPT image upgraded the radio?

edit

Indeed , I manage to use the official download program (login as Adminstrator)

to backup my nvr data. but it seems that data size is different from gen1 to gen2

the one i get with the upgrade downloader is 70k (suppose it is a GEN1 backup )

and the one with the official downloader is 69k (suppose it is a GEN2 backup )

Edited by burstlam
Link to comment
Share on other sites

is that mean the GEN2 upgrade thr TPT is not identical to the upgrade thr official downloader?

does the TPT image upgraded the radio?

It upgrades the radio & the appsboot bootloader, which is all that matters for a rom (ril, kernel base address & user partition layout), but leaves everything else as Gen1 (radio partition layout, qcsbl, oemsbl, cefs).

Link to comment
Share on other sites

This might be a stupid uestion, but wth.

Will this be a genuine upgrade to Gen2, you will be able to submit bugs and logs to the official issue tracker?

Link to comment
Share on other sites

This might be a stupid uestion, but wth.

Will this be a genuine upgrade to Gen2, you will be able to submit bugs and logs to the official issue tracker?

As far as CM7 or any other rom is concerned there is no difference between this upgrade & an official gen2 phone, appsboot & amss are both gen2 & they're the only things in memory when cm7 loads.

The difference is this is still using a Gen1 radio partition layout, Gen1 oemsbl & other firmware files, but that only matters for using the windows flashing program or TPT mode.

Link to comment
Share on other sites

Guest slitz

So this allows Gen1 users to use Gen2 roms, but the the extra features that come with Gen2 aren't available? i.e. the extra band

But I guess if TPT still works and you can revert to Gen1 without your IMEI screwing up this is fantastic, I'm glad I haven't upgraded to Gen2 yet.

Link to comment
Share on other sites

Guest Rotmann

All advantages of Gen2 (HSUPA, extra band and better signal, if there is any) are available with this method. The disadvantages of Gen2 (like not being able to safely revert to Gen1 and the high risk of bricking it) are not available with this method.

Link to comment
Share on other sites

I have another stupid question: Will my splash image change ?

not such a stupid question actually ... I forgot to include a splash image & it's location changes on the nand ... so does it change or mess up the splash image?

Link to comment
Share on other sites

Guest stoke1863

Think this might of messed up my device.

i got the green screen it said flash done now my screen is all messed up and is flashing on and off.

anyway of undoing this? i cant get in recovery anymore

Link to comment
Share on other sites

Guest lmnt55
Think this might of messed up my device.

i got the green screen it said flash done now my screen is all messed up and is flashing on and off.

anyway of undoing this? i cant get in recovery anymore

Same here.

Green text telling me it was Updating from T-Flash card, update succesful and then a constant loop of white noise flashing on and off at the bottom of my screen :)

Link to comment
Share on other sites

Think this might of messed up my device.

i got the green screen it said flash done now my screen is all messed up and is flashing on and off.

anyway of undoing this? i cant get in recovery anymore

Try the gen2 to gen1 tpt that should fix it for now. You'll need an sdcard reader to get it on your sd card if your phone wont boot.

I'll update it later this evening.

Link to comment
Share on other sites

... So, don't do that!

Agreed :)

oemsbl.mbn controls TPT mode, but it's more than just that, if oemsbl is broken then your phone is dead. it's what loads everything else in the radio partitions in the boot process, so it needs to know where those partitions are to work properly. there might be a partition table in it that has to match partition.mbn, like there is with appsboot.mbn & partition_zte.mbn

As i understood, OEMSBL is sort of a plugin to QCSBL (which is fixed and signed by qualcomm). It probably is the vendor-specific part to locate at least AMSS and possibly the rest of the software on the phone (and it also takes care of TPT and maybe a part of download mode). So it would make sense it has some partition information in it, though i haven't been able to find it so far.

The package I posted contains a Gen1 partition.mbn & no oemsbl.mbn, so if you flash it to your (windows upgraded or stock) Gen2 phone without including a Gen1 oemsbl.mbn then you've just killed your phone. It might work if you include the missing Gen1 .mbn files, but then you're going to have just the same risk of losing your IMEI as in a Gen1 downgrade.

It makes sense to include as little as possible for TPT. With what you describe in mind, TPTs should really never include oemsbl for the blade, as there only are 2 different versions and they both need a different partition.mbn. Currently, though, full gen2 phones won't even accept the TPT images you posted, so people will have to really do something wrong to accidentally put it in their phones :)

Attached is some simple source code that *might* create a valid image.bin. The format seems simple enough and many parts of the TPT flasher code haven't been changed. Again, make sure you know what you're doing if you decide to experiment with it (for example, try it first with high-level images, like boot.img/system.img), and please double-check the code if you're able to. The important part is the type id. Partition table locations are fixed and i gave them an id of 0, since those entries are ignored by the flasher logic.

Edit: attachment removed - newer version at this location

Edited by cpg
Link to comment
Share on other sites

Agreed :)

As i understood, OEMSBL is sort of a plugin to QCSBL (which is fixed and signed by qualcomm). It probably is the vendor-specific part to locate at least AMSS and possibly the rest of the software on the phone (and it also takes care of TPT and maybe a part of download mode). So it would make sense it has some partition information in it, though i haven't been able to find it so far.

It makes sense to include as little as possible for TPT. With what you describe in mind, TPTs should really never include oemsbl for the blade, as there only are 2 different versions and they both need a different partition.mbn. Currently, though, full gen2 phones won't even accept the TPT images you posted, so people will have to really do something wrong to accidentally put it in their phones :)

Attached is some simple source code that *might* create a valid image.bin. The format seems simple enough and many parts of the TPT flasher code haven't been changed. Again, make sure you know what you're doing if you decide to experiment with it (for example, try it first with high-level images, like boot.img/system.img), and please double-check the code if you're able to. The important part is the type id. Partition table locations are fixed and i gave them an id of 0, since those entries are ignored by the flasher logic.

The windows flash program will probably accept the files & will brick a gen2 phone if they're flashed as they are.

The next version will include all the extra Gen1 .mbn files, not including them may be the cause of those two bricks too, or it might be as simple as the missing splash.img. Obviously flashing vital parts of the phone using something that does hardly any checks on the data isn't ideal, but we have to balance that against possible incompatibilities between the mbn files.

The next update to my tpt backup script will include all the mbn files too.

Edited by wbaw
Link to comment
Share on other sites

Guest mamboboy

Holding down vol+ and menu just leaves the little green android guy stuck on mine, any idea why that's happening?

BTW, do I copy the image folder OR it's contents to the root of my sd?

Link to comment
Share on other sites

Holding down vol+ and menu just leaves the little green android guy stuck on mine, any idea why that's happening?

BTW, do I copy the image folder OR it's contents to the root of my sd?

That's happening because you didn't create an image folder on your sd card, your phone is in fastboot mode, pull the battery

You extract the image folder to your sdcard, it should create an image folder ... but hold off for a while until I post my next update, it needs more testing.

Link to comment
Share on other sites

the new file got me into recovery! going to try flash cm7 now. thanks a lot for the update i was very worried at one point

Good, this new version should work more reliably. It worked fine for me.

I'll post a new gen2 to gen1 tpt later, but you will be able to use any gen1 tpt that includes all the gen1 .mbn files.

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
 Share

×
×
  • Create New...

Important Information

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