[RDU][CWM] BML to MTD Conversion Utility v0.1| [5/17]

Search This thread

RandomKing

Retired Recognized Developer
Mar 4, 2011
1,487
1,461
Random Land
randomkings.wordpress.com
The Goal: To create a CWM flash-able .zip that will convert a BML formatted phone to MTD without the need to be included in a rom, creating a standard and simplicity for end-users.

RDU
ROM DEVELOPERS UNITED
AS ONE


CWM BML to MTD Conversion Utility
Supported ROMs:
- Any BML Setup

So here's how it works:

This file will convert your phone's kernel and boot recovery to MTD. Afterwards, you will be able to flash an MTD rom.
ALWAYS make a backup of your data before flashing anything.

If you flash this over an already MTD rom, it will simply abort.

The Latest Version Here. After it finishes, your phone will be stuck in a loop. Pull the battery and 3-finger back into recovery to flash an MTD rom.

UPDATE: (--/--)

Further ideas or customizations from fellow rom developers welcome.
 
Last edited:

zman519

Senior Member
Oct 27, 2010
2,240
255
the Land of Beer & Cheese
First

This sounds vary usefull on my firends Epics. I think it will speed thing up for me :) at times depending what they want

Sent from the Drivers Seat of my Suby txting and Driving doing 100MPH+ in a school zone! Ha.
 
Last edited:

RandomKing

Retired Recognized Developer
Mar 4, 2011
1,487
1,461
Random Land
randomkings.wordpress.com
First

This sounds vary usefull on my firends Epics. I think it will speed thing up for me :) at times depending what they want

Sent from the Drivers Seat of my Suby txting and Driving doing 100MPH+ in a school zone! Ha.

Please note, this is a test version. :D

It's based on a version I used myself, but being on MTD, I can't test it easily.

There are 3 current scenarios it could yield:

1. Nothing happens.
2. It works perfectly.
3. It works, but puts the phone into a bootloop. This is what the old version did to me... Pop the battery. Boot into recovery. Profit.
 

KennyG123

Senior Moderator / Mod Committee / Spider-Mod
Staff member
Nov 1, 2010
39,955
54,777
Right behind you!
So this would theoretically convert a BML ROM to MTD on a person's phone. Sounds great.

As a note to all remember as always to back up before flashing ANYTHING.

Sent from my SPH-D700 using xda premium
 

RandomKing

Retired Recognized Developer
Mar 4, 2011
1,487
1,461
Random Land
randomkings.wordpress.com
So this would theoretically convert a BML ROM to MTD on a person's phone. Sounds great.

As a note to all remember as always to back up before flashing ANYTHING.

Sent from my SPH-D700 using xda premium

Right now it should format your phone and prep it for a Rom. If it works properly, I'd like to rewrite it to convert and PRESERVE a BML Rom into an MTD Rom.
 

zman519

Senior Member
Oct 27, 2010
2,240
255
the Land of Beer & Cheese
Please note, this is a test version. :D

It's based on a version I used myself, but being on MTD, I can't test it easily.

There are 3 current scenarios it could yield:

1. Nothing happens.
2. It works perfectly.
3. It works, but puts the phone into a bootloop. This is what the old version did to me... Pop the battery. Boot into recovery. Profit.

I understand ;-)

If my budy ever gets a new sdcard, I'll use his phone as a test dumey. The worst that could happen is I have to bust out the usb cable & fire up ODIN

Sent from the Drivers Seat of my Suby txting and Driving doing 100MPH+ in a school zone! Ha.
 

KennyG123

Senior Moderator / Mod Committee / Spider-Mod
Staff member
Nov 1, 2010
39,955
54,777
Right behind you!
Ok so currently no data or apps are preserved. It is mostly a blank MTD slate?

Sent from my SPH-D700 using xda premium
 

RandomKing

Retired Recognized Developer
Mar 4, 2011
1,487
1,461
Random Land
randomkings.wordpress.com
Ok so currently no data or apps are preserved. It is mostly a blank MTD slate?

Sent from my SPH-D700 using xda premium

Yup. I need someone to confirm that it works properly. As I mentioned, I previously used a simpler version to convert myself to MTD and it worked, but it put me in a bootloop. I'm hoping to solve the bootloop so I can create a version to preserve a setup.
 

nikon120

Senior Member
Oct 3, 2010
1,278
340
Yup. I need someone to confirm that it works properly. As I mentioned, I previously used a simpler version to convert myself to MTD and it worked, but it put me in a bootloop. I'm hoping to solve the bootloop so I can create a version to preserve a setup.

Well if you ran this and it put you in a boot loop, then it most likely worked properly since this would have formatted/converted your partition map to MTD. The BML rom would have either been erased or just unable to run due to the conversion.

Just a curious question here:
What would you need to do to actually convert an existing BML install to work on the MTD partition map?
 

flastnoles11

Senior Member
Nov 16, 2011
8,380
4,690
Palm bay
OnePlus 9 Pro
Well if you ran this and it put you in a boot loop, then it most likely worked properly since this would have formatted/converted your partition map to MTD. The BML rom would have either been erased or just unable to run due to the conversion.

Just a curious question here:
What would you need to do to actually convert an existing BML install to work on the MTD partition map?

He said that it worked right in the post you quoted... lol
And I have no diea about the question... I'm kinda curious about this too...
 

styles420

Senior Member
Nov 12, 2010
2,379
1,390
Samsung Galaxy S21
Well if you ran this and it put you in a boot loop, then it most likely worked properly since this would have formatted/converted your partition map to MTD. The BML rom would have either been erased or just unable to run due to the conversion.

Just a curious question here:
What would you need to do to actually convert an existing BML install to work on the MTD partition map?

Because formatting destroys the existing file structure (it doesn't actually erase files, just overwrites the data that maps out the locations of those files), everything would need to be copied to a temporary location before converting the original location to the new partition type. Then the temp data (backup) would need to be copied back to the original location using the new format.

It is not possible to just change the format while leaving the data in place - those warnings on every format command (in every computerized device - windows, mac, etc) were not a design decision, but a result of a design limitation. The backup/format/restore method is the only way.

He said that it worked right in the post you quoted... lol
And I have no diea about the question... I'm kinda curious about this too...

He also said he was trying to solve the boot-loop problem, not a formatting problem. The clarification was not to assert that the formatting worked - the focus was on explaining the cause of the boot loop, to point out that there is no problem to be solved there because a BML kernel should boot loop when the rest of the partitions are freshly formatted MTD partitions.

The standard BML kernel can't read MTD, so the fact that those partitions are empty is irrelevant. Even if the partitions were converted without data loss (via a backup/convert/restore), the kernel would still need to be MTD-capable (so this by itself will not convert a BML rom to MTD)

Hopefully this clears up some of the confusion...

Sent from my SPH-D700 using XDA
 
Last edited:

KennyG123

Senior Moderator / Mod Committee / Spider-Mod
Staff member
Nov 1, 2010
39,955
54,777
Right behind you!
Well if you ran this and it put you in a boot loop, then it most likely worked properly since this would have formatted/converted your partition map to MTD. The BML rom would have either been erased or just unable to run due to the conversion.

Just a curious question here:
What would you need to do to actually convert an existing BML install to work on the MTD partition map?

A kernel that supports MTD and copy all system, data and cache folder then paste it back after the conversion with the new kernel.

Sent from my SPH-D700 using xda premium
 
Last edited:

nikon120

Senior Member
Oct 3, 2010
1,278
340
He said that it worked right in the post you quoted... lol
And I have no diea about the question... I'm kinda curious about this too...
Yes he did. I too read his reply.

My response to Random was that since he's put in the bootloop, then it worked for him due to the lack of converting the rom over. Therefore my reply implied that testing more won't hurt anything at all and would be good protocol, but may not be needed since it worked for him given his output.

Because formatting destroys the existing file structure (it doesn't actually erase files, just overwrites the data that maps out the locations of those files), everything would need to be copied to a temporary location before converting the original location to the new partition type. Then the temp data (backup) would need to be copied back to the original location using the new format.

It is not possible to just change the format while leaving the data in place - those warnings on every format command (in every computerized device - windows, mac, etc) were not a design decision, but a result of a design limitation. The backup/format/restore method is the only way.
Ahh yea, I wasn't 100% sure if this was the case. Good breakdown though. :)
 
Last edited:
  • Like
Reactions: flastnoles11

sonarchist

Senior Member
Mar 27, 2011
689
227
Washington, DC
I understand the theory, prepping a 100% BML setup for it's MTD future; just out of curiosity, Q: would there be a way to reverse this process so that if you arrive at your destination MTD ROM + change your mind, would it be possible to choose to convert an MTD ROM back to BML w/out having to ODIN (md5.tar + pit...........the way we do currently)?

BTW, am looking forward to testing your proposed conversion utility, just wondering.
 

xboxfanj

Recognized Developer
Apr 24, 2011
7,313
7,797
St. Louis
Well if you ran this and it put you in a boot loop, then it most likely worked properly since this would have formatted/converted your partition map to MTD. The BML rom would have either been erased or just unable to run due to the conversion.

Just a curious question here:
What would you need to do to actually convert an existing BML install to work on the MTD partition map?

All I know is that it'd need an mtd kernel. Also, maybe it could work like rfs to ext4 where it backs everything up then restores and flashes an mtd compatible kernel. Theoretically, that should work on samsung tw based roms.
Sent from my SPH-D700 using XDA
 

xboxfanj

Recognized Developer
Apr 24, 2011
7,313
7,797
St. Louis
Randomking, to fix the bootloop issue, try having it reboot recovery like the cm/miui mtd install scripts do (I think).

Sent from my SPH-D700 using XDA
 

KennyG123

Senior Moderator / Mod Committee / Spider-Mod
Staff member
Nov 1, 2010
39,955
54,777
Right behind you!
I understand the theory, prepping a 100% BML setup for it's MTD future; just out of curiosity, Q: would there be a way to reverse this process so that if you arrive at your destination MTD ROM + change your mind, would it be possible to choose to convert an MTD ROM back to BML w/out having to ODIN (md5.tar + pit...........the way we do currently)?

BTW, am looking forward to testing your proposed conversion utility, just wondering.

Not possible since BML is proprietary. Odin is the only way to get this top secret partition information on our phone.

Sent from my SPH-D700 using xda premium
 

Top Liked Posts

  • There are no posts matching your filters.
  • 10
    The Goal: To create a CWM flash-able .zip that will convert a BML formatted phone to MTD without the need to be included in a rom, creating a standard and simplicity for end-users.

    RDU
    ROM DEVELOPERS UNITED
    AS ONE


    CWM BML to MTD Conversion Utility
    Supported ROMs:
    - Any BML Setup

    So here's how it works:

    This file will convert your phone's kernel and boot recovery to MTD. Afterwards, you will be able to flash an MTD rom.
    ALWAYS make a backup of your data before flashing anything.

    If you flash this over an already MTD rom, it will simply abort.

    The Latest Version Here. After it finishes, your phone will be stuck in a loop. Pull the battery and 3-finger back into recovery to flash an MTD rom.

    UPDATE: (--/--)

    Further ideas or customizations from fellow rom developers welcome.
    2
    So this would theoretically convert a BML ROM to MTD on a person's phone. Sounds great.

    As a note to all remember as always to back up before flashing ANYTHING.

    Sent from my SPH-D700 using xda premium

    Right now it should format your phone and prep it for a Rom. If it works properly, I'd like to rewrite it to convert and PRESERVE a BML Rom into an MTD Rom.
    2
    Ok so currently no data or apps are preserved. It is mostly a blank MTD slate?

    Sent from my SPH-D700 using xda premium

    Yup. I need someone to confirm that it works properly. As I mentioned, I previously used a simpler version to convert myself to MTD and it worked, but it put me in a bootloop. I'm hoping to solve the bootloop so I can create a version to preserve a setup.
    2
    Well if you ran this and it put you in a boot loop, then it most likely worked properly since this would have formatted/converted your partition map to MTD. The BML rom would have either been erased or just unable to run due to the conversion.

    Just a curious question here:
    What would you need to do to actually convert an existing BML install to work on the MTD partition map?

    Because formatting destroys the existing file structure (it doesn't actually erase files, just overwrites the data that maps out the locations of those files), everything would need to be copied to a temporary location before converting the original location to the new partition type. Then the temp data (backup) would need to be copied back to the original location using the new format.

    It is not possible to just change the format while leaving the data in place - those warnings on every format command (in every computerized device - windows, mac, etc) were not a design decision, but a result of a design limitation. The backup/format/restore method is the only way.

    He said that it worked right in the post you quoted... lol
    And I have no diea about the question... I'm kinda curious about this too...

    He also said he was trying to solve the boot-loop problem, not a formatting problem. The clarification was not to assert that the formatting worked - the focus was on explaining the cause of the boot loop, to point out that there is no problem to be solved there because a BML kernel should boot loop when the rest of the partitions are freshly formatted MTD partitions.

    The standard BML kernel can't read MTD, so the fact that those partitions are empty is irrelevant. Even if the partitions were converted without data loss (via a backup/convert/restore), the kernel would still need to be MTD-capable (so this by itself will not convert a BML rom to MTD)

    Hopefully this clears up some of the confusion...

    Sent from my SPH-D700 using XDA
    2
    Well if you ran this and it put you in a boot loop, then it most likely worked properly since this would have formatted/converted your partition map to MTD. The BML rom would have either been erased or just unable to run due to the conversion.

    Just a curious question here:
    What would you need to do to actually convert an existing BML install to work on the MTD partition map?

    A kernel that supports MTD and copy all system, data and cache folder then paste it back after the conversion with the new kernel.

    Sent from my SPH-D700 using xda premium