[TOOL] NEW <<--->> OLD Bootloader ROM Converter v1.0

Search This thread

spyrosk

Senior Member
Jan 4, 2012
457
1,065
Athens
P990 ROM Converter
from New BootLoader to Old and vice versa

Actually this tool is Tonyp’s idea. All credits to him.

He asked me if I am interested in making a script and automating the rom porting from one bootloader to the other and he assisted me with all the changes that need to be done.

Due to different EOL (end of line) termination in text files between UNIX-Linux (LF) and windows (CRLF), I had to make bash (linux) scripts necessarily. The good thing is that the tool can be used in both windows and linux systems.
Installation:
Download and extract the attached ROM-Converter-tools.zip package anywhere you like.
Download and extract in the same folder, a newer ROM-Converter-scripts.zip if exists.

For Windows systems only:
Install Cygwin following the instructions below:

Download setup-x86.exe from here http://cygwin.com/install.html
Attention!! Even if you are running x64 windows system install the x86 version. DO NOT install the x64 cygwin version because two binaries (mkbootfs.exe & mkbootimg.exe used to pack boot.img do not work properly).

Run the setup-x86.exe, when the list of packages is shown make sure you add the following:
  • Expand Archive and select zip & unzip to be installed
  • Expand Utils and select cpio to be installed
  • Expand Perl and select ‘perl: Larry Wall’s Practical..’ and perl_vendor to be installed
(If you are already using cygwin run setup again and add the above packages to be installed.)

For Linux systems only:
Download the attached linux-mkboot-binaries.zip (mkbootfs, mkbootimg), extract them in tool folder and remove the windows ones (mkbootfs.exe, mkbootimg.exe).
How to use it:

Put the source ROM.zip(s) in the 'source_zips' folder (otherwise you’ll be prompted to drag n’ drop it in terminal)
Open Cygwin. Type cd (leave a space after cd) and type /cygdrive/c/dir1/dir2/../ROM-Converter-tools
where “c/dir1/dir2/../ROM-Converter-tools” is the full path of the folder you extracted the convert-tool package (e.g C:\dir1\dir2\..\ROM-Converter-tools) and press enter.

In case of long pathname, instead of typing the whole of it, use one of the following tips to easily change to tool's path.
Tip#1: After you type cd , drag n’ drop from windows explorer into cygwin terminal, the folder "ROM-Converter-tools" and it wiil automatically be converted to ‘/cygdrive/c/dir1/dir2/../ROM-Converter-tools’ press enter and that’s it.
Tip#2: After cd /cygdrive/c/ type the 1st one or two letters of the next subdir and autocomplete it's name with TAB.

Type one of these commands in cygwin terminal:
Code:
./convert_rom.sh -stepmode   #--> starts in step-mode for debugging purposes
./convert_rom.sh             #--> runs unattended (with no pauses).

What it does:
The scripts use as input the 'files2convert.txt' which contains all possible files needed to be converted.
This is for compatibility purposes to support as many roms as possible and for future changes.
files2convert.txt
Code:
/ramdisk/fstab.star 
/ramdisk/fstab.p990 
/ramdisk/init.cm.rc 
/ramdisk/init.cm-star.rc 
/ramdisk/init.star.rc 
/system/etc/vold.fstab 
/system/bin/setup-recovery 
/system/bin/check_sdcard.sh 
/META-INF/com/google/android/updater-script

More files can easily be added for conversion if needed.
The converter:
  1. Extracts source ROM zip
  2. Unpacks the boot.img
  3. Reads the above files, replacing partitions' mount points, among some othe things, for the selected bootloader
  4. Replaces the kernel image for the selected bootloader
  5. Builds new boot.img
  6. Creates new converted ROM zip

Under 'kernels' folder there are already included the two latest Kowalski kernel images (zImage) for old & new BL and its modules.
You can add more kernels and you’ll be prompted to choose the desired one when converting a ROM (if more than one is found ).
Read how to do this:
kernels folder contains all kernel images (zImage), kernel modules and any other file the kernel needs.
for each kernel there are:
file(s) named: prefix-KernelName[-ver].zImage
folder(s) named: [prefix-]KernelName[-ver]Kernel
where:
prefix must be oldbl or newbl (depending on which bootloader this kernel is for.
KernelName[-ver] is whatever you like [and optionaly its version].
zImage is the extension of the kernel image.

How to maintain kernels folder

A. Update existing kernels
  1. Download the desired kernel package and open it.
  2. Replace its kernel zIamge in kernels folder
  3. Extract its modules and any other file needed and replace all existing ones

B. Add kernels
  1. Download the kernel package and open it.
  2. Find the zImage inside package and extract it into kernels
  3. Rename it this format: prefix-KernelName[-ver].zImage
  4. Create a folder named: prefix-KernelName[-ver]. It will be used to keep kernel's modules and other files needed. If this kernel is released for both bootloaders and its modules are identicaly on both bootloaders (like the existing kowalski one) then name the folder only KernelName[-ver] (without prefix).
  5. Inside this [prefix-]KernelName[-ver] folder create a subdir tree lib\modules
  6. Extract in lib\modules all kernel's modules from kernel package.
  7. If any other file is needed by kernel then create it's subdir tree (assuming that [prefix-]KernelName is the system folder of the kernel package) and extract it there.
Attention: Current version will hopefully work on CM-based ROMs.
Stock based ROMs need more files to be changed, but they are not included yet, because I don't have the whole info needed.

Hopefully @rugglez or someone else will be willing to help.
Till then avoid converting stock-based roms, (or if you do try, then after converting replace the boot.img in converted rom and "system/lib/modules/*" at least with a working boot.img and modules from another stock-based rom, for this bootloader of course. This could work but I am not the expert to say)
 

Attachments

  • linux-mkboot-binaries.zip
    21.2 KB · Views: 905
  • ROM-Converter-tools-v1.0.zip
    9 MB · Views: 3,379
Last edited:

spyrosk

Senior Member
Jan 4, 2012
457
1,065
Athens
ChangeLog:
Version 1.0 Aug 23, 2013
- The two convert2xxx_bl.sh scripts are now integrated into one script convert_rom.sh.
- The new convert_rom.sh also accepts an optional switch [-stepmode].
Code:
./convert_rom.sh -stepmode   #--> starts in step-mode for debugging purposes
./convert_rom.sh             #--> runs unattended (with no pauses).
- A technique added to preserve whitespaces in converted lines. So converted files keep margins and whitespaces of the source ones.
- Script checks whether source rom is a newbl or an oldbl one, displays an error message if rom is not for the expected bootloader and exits.

Version 0.3b Aug 23, 2013
-a typo fixed in converting scripts

Version 0.2b Aug 23, 2013
-liblgeril.so is also replaced with the one for the oldbl or newbl accordingly.
-A forced removal (switch -f) added when removing files and dirs just in case.
-Converted ROM name will be built automatically from the source name suffixed by -oldbl or -newbl accordingly. (If source rom's name contains 'newbl' or 'oldbl' it will be substituted by 'oldbl' or 'newbl' accordingly)
-Converted ROMs are now created under 'converted_roms' folder.
-Converting to oldbl: Files 'check_sdcard.sh' and 'lgdrm.img' are being removed if exist (as they are not used)
-Converting to newbl: Charger dependent images are also copied in ramdisk (not only the charger binary).
-Kernel modules will also be replaced with the ones coming with specific kernel image.
-Kowalski Kernel images & modules, in kernels folder, are replaced with latest ones dated:2013072013. (it was my fault, the previous ones were downloaded from "releases" download folder and were dated 20230303)
-Some changes in display messages.

Version 0.1b Aug 19, 2013
-1st beta version
 
Last edited:

tonyp

Inactive Recognized Developer
Feb 3, 2011
5,019
34,902
I really don't want to have all of the credits.

While it's been my idea to create such a script and I provided the input on what needs to be changed by the script, I couldn't have done it on my own.
I both lack the skills(!) and time.


Steve would say:


:D


Anyways, don't leech. If this helps someone, donations are appreciated:

Donate to spyrosk

Donate to me
 
Last edited:

SREEPRAJAY

Retired Forum Moderator
Jul 9, 2010
4,567
5,985
CITY OF PARKS
Samsung Galaxy S23 Ultra

To convert a new-bl rom to an old-bl rom: Type ./convert2old_bl.sh
To convert an old-bl rom to a new-bl rom: Type ./ convert2new_bl.sh

Thanks Android tool guru @spyrosk....and thanks @tonyp
just trying it out. A small comment....people might mistake this....there is no space between the / AND convert2new_bl.sh command line....should be the same with oldbl.sh command....isnt it?
thought of giving a feedback about this.

thanks once again

EDIT: battery charge script cannot be opened error....and cannot be removed error....
Creating new ROM zip ... zip warning: Permission denied
zip warning: Permission denied
something went wrong please zip contents in rom folder manually
done.
 
Last edited:
  • Like
Reactions: spyrosk

spyrosk

Senior Member
Jan 4, 2012
457
1,065
Athens
Thanks Android tool guru @spyrosk....and thanks @tonyp
just trying it out. A small comment....people might mistake this....there is no space between the / AND convert2new_bl.sh command line....should be the same with oldbl.sh command....isnt it?
thought of giving a feedback about this.

thanks once again

EDIT: battery charge script cannot be opened error....and cannot be removed error....
Creating new ROM zip ... zip warning: Permission denied
zip warning: Permission denied
something went wrong please zip contents in rom folder manually
done.

Hi my friend,
First of all sorry again for deleted post(s)..
and thank you.

The "typo" is corrected. Actually it was not a typo but I have noticed that it happens when pasting text from another editor.

Which ROM did you try to convert?
battery charge script cannot be opened error??? On which step did it happen?
I don't try to open any battery charge script
Did you add any file in "files2convert.txt"?
 

wals46

Senior Member
Jan 4, 2012
586
213
Very interesting tool.
Last july 7th I asked you if this were possibile and didn't have any reply. Now I'm happy that Tonyp convinced you.

Sent from my LG-P990 using xda app-developers app
 

spyrosk

Senior Member
Jan 4, 2012
457
1,065
Athens
Very interesting tool.
Last july 7th I asked you if this were possibile and didn't have any reply. Now I'm happy that Tonyp convinced you.

Sent from my LG-P990 using xda app-developers app

I was on vacation sorry and when I came back I forgot to reply.
By that time I couldn't tell for sure anyway, before I have the total "picture" of the work that must be done, I mean.
 
  • Like
Reactions: cuweps

SREEPRAJAY

Retired Forum Moderator
Jul 9, 2010
4,567
5,985
CITY OF PARKS
Samsung Galaxy S23 Ultra
@spyrosk,
my friend


  • Which ROM did you try to convert? Latest Avatar 3.1 Nightly OLD to NEW BL

  • battery charge script cannot be opened error??? On which step did it happen?I don't try to open any battery charge script It happened just the step before making the new ROM Zip

  • Did you add any file in "files2convert.txt"? NO
Nevertheless, I will try to flash the ROM and see what happens ;)

EDIT:
Just now, I tried to do the PAC Man by Metallica for the Old BL and had the same error of battery charge script....
Same in Django Adios Amigo 1.6.5 to OldBL....see the script error below:

STEP 2: EXTRACTING BOOT.IMG ...
Press [enter] when ready

rm: remove write-protected regular file `out/ramdisk/charger'?
rm: cannot remove `out/ramdisk': Directory not empty
mkdir: cannot create directory `out': File exists

STEP 5: PACKING NEW BOOT.IMG ...
Press [enter] when ready

Selected kernel: kernels/oldbl-Kowalski-126.zImage
Using base address 0x10000000
Using command line ''
error: cannot open './ramdisk/charger' for read

rm: remove write-protected regular file `out/ramdisk/charger'?
rm: cannot remove `out/ramdisk': Directory not empty



Hope this helps in checking....
 
Last edited:

spyrosk

Senior Member
Jan 4, 2012
457
1,065
Athens
@spyrosk,
my friend


  • Which ROM did you try to convert? Latest Avatar 3.1 Nightly OLD to NEW BL

  • battery charge script cannot be opened error??? On which step did it happen?I don't try to open any battery charge script It happened just the step before making the new ROM Zip

  • Did you add any file in "files2convert.txt"? NO
Nevertheless, I will try to flash the ROM and see what happens ;)

EDIT:
Just now, I tried to do the PAC Man by Metallica for the Old BL and had the same error of battery charge script....
Same in Django Adios Amigo 1.6.5 to OldBL....see the script error below:

STEP 2: EXTRACTING BOOT.IMG ...
Press [enter] when ready

rm: remove write-protected regular file `out/ramdisk/charger'?
rm: cannot remove `out/ramdisk': Directory not empty
mkdir: cannot create directory `out': File exists

STEP 5: PACKING NEW BOOT.IMG ...
Press [enter] when ready

Selected kernel: kernels/oldbl-Kowalski-126.zImage
Using base address 0x10000000
Using command line ''
error: cannot open './ramdisk/charger' for read

rm: remove write-protected regular file `out/ramdisk/charger'?
rm: cannot remove `out/ramdisk': Directory not empty



Hope this helps in checking....

I just converted Avatar-3.1 from old to new. No errors at all.

I don't like the write-protected error: rm: remove write-protected regular file `out/ramdisk/charger'
So it tries after that to remove the out directory but of course it's not empty.

Well,
Remove out directory manually and try again from the beginning..
After step 5, Before you continue to next step try to remove the whole out directory manually again.

Try also to give your account full control to the converter's folder.
This problem seems to he a windows security permission issue. Are you an administrator on the system you use?

-------------------------------------------------------------------
Stock based ROMs need more files to be changed, but they are not included yet, because I don't have the whole info needed.
Hope @rugglez or someone else will be willing to help.
Till then avoid converting stock-based roms,( or after converting replace the boot.img in converted rom with a working boot.img from another stock-based rom for the same bootloader of course. This may work)
Try ONLY CM-based roms.
I forgot to write it in OP. I'll do it asap.
 

SREEPRAJAY

Retired Forum Moderator
Jul 9, 2010
4,567
5,985
CITY OF PARKS
Samsung Galaxy S23 Ultra
I just converted Avatar-3.1 from old to new. No errors at all.

I don't like the write-protected error: rm: remove write-protected regular file `out/ramdisk/charger'
So it tries after that to remove the out directory but of course it's not empty.

Well,
Remove out directory manually and try again from the beginning..
After step 5, Before you continue to next step try to remove the whole out directory manually again.

Try also to give your account full control to the converter's folder.
This problem seems to he a windows security permission issue. Are you an administrator on the system you use?

-------------------------------------------------------------------
Stock based ROMs need more files to be changed, but they are not included yet, because I don't have the whole info needed.
Hope @rugglez or someone else will be willing to help.
Till then avoid converting stock-based roms,( or after converting replace the boot.img in converted rom with a working boot.img from another stock-based rom for the same bootloader of course. This may work)
Try ONLY CM-based roms.
I forgot to write it in OP. I'll do it asap.

I have a list of files/folders which I was using to port...Thanks to @rugglez ofcourse...
If you have seen the dev section....I was porting a few ROMs from Old to New BL including the stock ROMs.
So, I will send you the list by PM.

I will try the CM based ones with manual clearing...and will check that

EDIT: I am the administrator...so normally only one account and I have that rights too

thanks once again
 
Last edited:

tonyp

Inactive Recognized Developer
Feb 3, 2011
5,019
34,902
Okay, I just used the converter on Win8 x64 to create an oldbl version of my CM10.2 ROM.
I have uploaded the resulting zip here: http://tonyp.basketbuild.com/index.php?dir=main/CM-10.2/oldbl-untested-builds/
It is untested - so do a backup!

I will post the steps I took, this might help some people who never worked with tools like this.
Please try it out with different ROMs - and if the resulting zips work a) post that here and b) share the zip in the respective threads for others to use :)

If you have any erros post the complete cygwin output here.
To get it do a right-click into the cygwin window, then press Enter - it's now copied into the clipboard!


Okay, off we go:

Preparation (one time only):
  1. Downloaded cygwin. and install it
    The path C:/cygwin is perfecly fine.

  2. Just press Next until you get to the paket selection, then use the searchbox to quickly get to the tools needed:
    (just click once on it, the first checkbox will get checked. The second one is for the sourcecode, you don't need that).
    - zip (Archive)
    - unzip (Archive)
    - cpio (Utils)
    - perl: Larry Wall’s Practical (perl) (you might have to open "perl" and look for it manually)
    - perl_vendor (perl)

  3. Downlaod the zip attached at the OP, extract it.
    I extracted it to C:/temp/ROM-Converter-tools/

  4. done


ROM conversion:

  1. Open the Cygwin Terminal (either in the start menu or execute the Cygwin.bat at C:/cygwin/)

  2. Put the ROM zip into the source_zips folder


  3. Type:
    Code:
    cd /cygdrive/c/temp/ROM-Converter-tools
    Needs to get adapted to your path if you extracted the ROM-Converter-tools somewhere else.
    My path is: C:/temp/ROM-Converter-tools/

    (Hint: after /cygdrive/c/ autocompletion with TAB will work!)
    I didn't try the drag&drop tip of spyrosk.

  4. Type:
    Code:
    ./convert2old_bl.sh
    (or convert2new_bl of course if you're going the other direction)

  5. Follow the instructions on the screen,
    As it's still in the debug mode you need to press [enter] a couple times.
    This will change in the future.

  6. Done, your converted ROM will be in the out_oldbl or out_newbl folder.

 
Last edited:

trocopassu

Senior Member
Jan 2, 2011
1,644
994
Lisboa
"...I just converted Avatar-3.1 from old to new. No errors at all.

I don't like the write-protected error: rm: remove write-protected regular file `out/ramdisk/charger'
So it tries after that to remove the out directory but of course it's not empty.

Well,
Remove out directory manually and try again from the beginning..
After step 5, Before you continue to next step try to remove the whole out directory manually again..."
Hummmmm, I tried experimenting, and it happened to me the same as the partner "SREEPRAJAY"! ...
Here are the errors I had during the experiments (three files *. pdf);
 

Attachments

  • Error's.rar
    272.7 KB · Views: 13

Ultramanoid

Senior Member
Apr 24, 2011
3,902
6,773
東京都 Tokyo Metro

trocopassu

Senior Member
Jan 2, 2011
1,644
994
Lisboa

Ultramanoid

Senior Member
Apr 24, 2011
3,902
6,773
東京都 Tokyo Metro
But...that ROM is for NEW BootLoader!!!...
Use All-In-One Toolkit to reattach the situation (reinstall again CWM Recovery);
http://xdaforums.com/showpost.php?p=34809475&postcount=1

I know ! ( NEVER flash anything as soon as you wake up without checking twice, kids. )

I saw the one for old bootloader for the 20th, moved up a directory, happily flashed the one for the 21th... and for the NEW bootloader.

Don't have access to a laptop to tinker and won't for a few days. Sigh.
 

tonyp

Inactive Recognized Developer
Feb 3, 2011
5,019
34,902
do this tool work with CM7 :confused:
No, and it never will.
GB relies on the old bootloader. It would be a lot of work to make it compatible, which isn't worth the trouble at all.





uhm ... in my case it got stuck at CM booting logo ... is flashing it recovery sensitive?
Ah that's a shame. spyrosk needs to have a look at that when he gets some free time.

You did a full wipe didn't you?
If you did it sound like an error in the fstab.





I know ! ( NEVER flash anything as soon as you wake up without checking twice, kids. )

I saw the one for old bootloader for the 20th, moved up a directory, happily flashed the one for the 21th... and for the NEW bootloader.

Don't have access to a laptop to tinker and won't for a few days. Sigh.
Your partitions are borked and you will have to use nvflash.
I'm sorry about that although I don't really know how you came to the idea to try the untested oldbl builds when you got no PC around to recover.
This could have even happened with the correct rom - again, it is completely untested.


Sent from my LG-P990 using Tapatalk 4
 
Last edited:
  • Like
Reactions: millionsun93

flat__line

Senior Member
Mar 27, 2012
326
116
Trento
Ah that's a shame. spyrosk needs to have a look at that when he gets some free time.

You did a full wipe didn't you?
If you did it sound like an error in the fstab.

I did the full wipe (I checked: I used the ext4 full wipe zip by dr4go for the old bootloader, as I usually do, using CWM 5.0.2.8)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 75
    P990 ROM Converter
    from New BootLoader to Old and vice versa

    Actually this tool is Tonyp’s idea. All credits to him.

    He asked me if I am interested in making a script and automating the rom porting from one bootloader to the other and he assisted me with all the changes that need to be done.

    Due to different EOL (end of line) termination in text files between UNIX-Linux (LF) and windows (CRLF), I had to make bash (linux) scripts necessarily. The good thing is that the tool can be used in both windows and linux systems.
    Installation:
    Download and extract the attached ROM-Converter-tools.zip package anywhere you like.
    Download and extract in the same folder, a newer ROM-Converter-scripts.zip if exists.

    For Windows systems only:
    Install Cygwin following the instructions below:

    Download setup-x86.exe from here http://cygwin.com/install.html
    Attention!! Even if you are running x64 windows system install the x86 version. DO NOT install the x64 cygwin version because two binaries (mkbootfs.exe & mkbootimg.exe used to pack boot.img do not work properly).

    Run the setup-x86.exe, when the list of packages is shown make sure you add the following:
    • Expand Archive and select zip & unzip to be installed
    • Expand Utils and select cpio to be installed
    • Expand Perl and select ‘perl: Larry Wall’s Practical..’ and perl_vendor to be installed
    (If you are already using cygwin run setup again and add the above packages to be installed.)

    For Linux systems only:
    Download the attached linux-mkboot-binaries.zip (mkbootfs, mkbootimg), extract them in tool folder and remove the windows ones (mkbootfs.exe, mkbootimg.exe).
    How to use it:

    Put the source ROM.zip(s) in the 'source_zips' folder (otherwise you’ll be prompted to drag n’ drop it in terminal)
    Open Cygwin. Type cd (leave a space after cd) and type /cygdrive/c/dir1/dir2/../ROM-Converter-tools
    where “c/dir1/dir2/../ROM-Converter-tools” is the full path of the folder you extracted the convert-tool package (e.g C:\dir1\dir2\..\ROM-Converter-tools) and press enter.

    In case of long pathname, instead of typing the whole of it, use one of the following tips to easily change to tool's path.
    Tip#1: After you type cd , drag n’ drop from windows explorer into cygwin terminal, the folder "ROM-Converter-tools" and it wiil automatically be converted to ‘/cygdrive/c/dir1/dir2/../ROM-Converter-tools’ press enter and that’s it.
    Tip#2: After cd /cygdrive/c/ type the 1st one or two letters of the next subdir and autocomplete it's name with TAB.

    Type one of these commands in cygwin terminal:
    Code:
    ./convert_rom.sh -stepmode   #--> starts in step-mode for debugging purposes
    ./convert_rom.sh             #--> runs unattended (with no pauses).

    What it does:
    The scripts use as input the 'files2convert.txt' which contains all possible files needed to be converted.
    This is for compatibility purposes to support as many roms as possible and for future changes.
    files2convert.txt
    Code:
    /ramdisk/fstab.star 
    /ramdisk/fstab.p990 
    /ramdisk/init.cm.rc 
    /ramdisk/init.cm-star.rc 
    /ramdisk/init.star.rc 
    /system/etc/vold.fstab 
    /system/bin/setup-recovery 
    /system/bin/check_sdcard.sh 
    /META-INF/com/google/android/updater-script

    More files can easily be added for conversion if needed.
    The converter:
    1. Extracts source ROM zip
    2. Unpacks the boot.img
    3. Reads the above files, replacing partitions' mount points, among some othe things, for the selected bootloader
    4. Replaces the kernel image for the selected bootloader
    5. Builds new boot.img
    6. Creates new converted ROM zip

    Under 'kernels' folder there are already included the two latest Kowalski kernel images (zImage) for old & new BL and its modules.
    You can add more kernels and you’ll be prompted to choose the desired one when converting a ROM (if more than one is found ).
    Read how to do this:
    kernels folder contains all kernel images (zImage), kernel modules and any other file the kernel needs.
    for each kernel there are:
    file(s) named: prefix-KernelName[-ver].zImage
    folder(s) named: [prefix-]KernelName[-ver]Kernel
    where:
    prefix must be oldbl or newbl (depending on which bootloader this kernel is for.
    KernelName[-ver] is whatever you like [and optionaly its version].
    zImage is the extension of the kernel image.

    How to maintain kernels folder

    A. Update existing kernels
    1. Download the desired kernel package and open it.
    2. Replace its kernel zIamge in kernels folder
    3. Extract its modules and any other file needed and replace all existing ones

    B. Add kernels
    1. Download the kernel package and open it.
    2. Find the zImage inside package and extract it into kernels
    3. Rename it this format: prefix-KernelName[-ver].zImage
    4. Create a folder named: prefix-KernelName[-ver]. It will be used to keep kernel's modules and other files needed. If this kernel is released for both bootloaders and its modules are identicaly on both bootloaders (like the existing kowalski one) then name the folder only KernelName[-ver] (without prefix).
    5. Inside this [prefix-]KernelName[-ver] folder create a subdir tree lib\modules
    6. Extract in lib\modules all kernel's modules from kernel package.
    7. If any other file is needed by kernel then create it's subdir tree (assuming that [prefix-]KernelName is the system folder of the kernel package) and extract it there.
    Attention: Current version will hopefully work on CM-based ROMs.
    Stock based ROMs need more files to be changed, but they are not included yet, because I don't have the whole info needed.

    Hopefully @rugglez or someone else will be willing to help.
    Till then avoid converting stock-based roms, (or if you do try, then after converting replace the boot.img in converted rom and "system/lib/modules/*" at least with a working boot.img and modules from another stock-based rom, for this bootloader of course. This could work but I am not the expert to say)
    17
    ChangeLog:
    Version 1.0 Aug 23, 2013
    - The two convert2xxx_bl.sh scripts are now integrated into one script convert_rom.sh.
    - The new convert_rom.sh also accepts an optional switch [-stepmode].
    Code:
    ./convert_rom.sh -stepmode   #--> starts in step-mode for debugging purposes
    ./convert_rom.sh             #--> runs unattended (with no pauses).
    - A technique added to preserve whitespaces in converted lines. So converted files keep margins and whitespaces of the source ones.
    - Script checks whether source rom is a newbl or an oldbl one, displays an error message if rom is not for the expected bootloader and exits.

    Version 0.3b Aug 23, 2013
    -a typo fixed in converting scripts

    Version 0.2b Aug 23, 2013
    -liblgeril.so is also replaced with the one for the oldbl or newbl accordingly.
    -A forced removal (switch -f) added when removing files and dirs just in case.
    -Converted ROM name will be built automatically from the source name suffixed by -oldbl or -newbl accordingly. (If source rom's name contains 'newbl' or 'oldbl' it will be substituted by 'oldbl' or 'newbl' accordingly)
    -Converted ROMs are now created under 'converted_roms' folder.
    -Converting to oldbl: Files 'check_sdcard.sh' and 'lgdrm.img' are being removed if exist (as they are not used)
    -Converting to newbl: Charger dependent images are also copied in ramdisk (not only the charger binary).
    -Kernel modules will also be replaced with the ones coming with specific kernel image.
    -Kowalski Kernel images & modules, in kernels folder, are replaced with latest ones dated:2013072013. (it was my fault, the previous ones were downloaded from "releases" download folder and were dated 20230303)
    -Some changes in display messages.

    Version 0.1b Aug 19, 2013
    -1st beta version
    13
    !! New version 1.0 is now uploaded !!
    After the 1st successful convertion, this can be the 1st released version.

    Last changes:
    - The two convert2xxx_bl.sh scripts are now integrated into one script convert_rom.sh.
    - The new convert_rom.sh also accepts an optional switch [-stepmode].
    Code:
    ./convert_rom.sh -stepmode   #--> starts in step-mode for debugging purposes
    ./convert_rom.sh             #--> runs unattended (with no pauses).
    - A technique added to preserve whitespaces in converted lines. So converted files keep margins and whitespaces of the source ones.
    - Script checks whether source rom is a newbl or an oldbl one, displays an error message if rom is not for the expected bootloader and exits.

    It starts with this menu:
    ========================================
    P990 ROM Converter v1.0
    Converting script by SpyrosK
    Converting info by TonyP
    Date: Aug 23, 2013
    ========================================

    Converts a ROM for the other bootloader.

    Select the desired convertion:
    ----------------------------------------
    1 - Convert ROM for OLD BootLoader
    2 - Convert ROM for NEW BootLoader

    X - Cancel

    Please type your selection [1,2,X]:

    and after making a selection it continues as you know it.

    Cheers ;)
    8
    New version 0.2b is uploaded

    ChangeLog:
    Code:
    Version 0.2b Aug 22, 2013
    -liblgeril.so is also replaced with the one for the oldbl or newbl accordingly.
    -A forced removal (switch -f) added when removing files and dirs just in case. 
    -Converted ROM name will be built automatically from the source name suffixed by -oldbl or -newbl accordingly. 
     (If source rom's name contains 'newbl' or 'oldbl' it will be substituted by 'oldbl' or 'newbl' accordingly)
    -Converted ROMs are now created under 'converted_roms' folder.
    -Converting to oldbl: Files 'check_sdcard.sh' and 'lgdrm.img' are being removed if exist (as they are not used)
    -Converting to newbl: Charger dependent images are also copied in ramdisk (not only the charger binary).
    -Kernel modules will also be replaced with the ones coming with specific kernel image.
    -Kowalski Kernel images & modules, in kernels folder, are replaced with latest ones dated:2013072013
     (it was my fault, the previous ones were downloaded from "releases" download folder and were dated 20230303)
    -Some changes in display messages.
    
    Version 0.1b Aug 19, 2013
    -1st beta version
    6
    Great, thanks to spyrosk and to exec92 for pointing out the problem with the kernel version ...

    Managed to convert latest CM10.2 newbl by tonyp to oldbl, booting fine with wifi, connected to my account.
    Rebooted. But I get a message regarding internal sdcard

    Blank SD card

    UPDATE: When using the FileManager to access it I am told that the operation requires elevated permissions ...
    and when I use Gallery it tells me no external storage (the one that I can actually browse with the file manager)??

    Did I miss some important step?

    I missed something. sorry
    I will post here the new scripts to replace and retry.

    Edit: Replace the scripts with the attached ones
    Edit2: Whole package is uploaded as v0.3b