[TOOLS][script] ROM Tools v2 (Kernel Extractor)(BML15 IMG backup)

Search This thread

iamareebjamal

Senior Member
Aug 7, 2012
3,705
5,117
24
Batcave
www.facebook.com
ROM Tools v2


Version 2 BETA

v2b (Officially v2)
Linux Script
by iamareebjamal

Automated Android script for extracting boot.img and bml15 partition



My PC has issues so I can't use it to build mods and scripts, also, I have a very slow internet connection. That's why I don't upload my ROMs. Provided, I build EACH and EVERY one of my mod on my mobile, including those long scripts with repeating commands and making it easy for other guys to use, I could've just created a script with two commands which rendered error if used incorrectly, but I make it noob proof in every way possible so that there are minimum errors from your side and if something gets wrong, you know what it is. Even uploading 5 mb of mod makes it very difficult as I have to reupload if it fails. Writing scripts on mobile is not easy, you'll know if you have done it, it takes hours. Also, these colorful and easy guides are also made on mobile by writing BB codes ONE BY ONE by hand.
I am telling you because a person day before yesterday posted my Amazing Sounds Mod in another forum without my permission. However, he has removed it now. My work is fully open sourced for you to learn and make your own mods. But taking part of my work and posting as yours is not appreciated.
The MOST you can give me is love, prayers and Thanks

:)



Out of the time I was absent from XDA(13 hours :p) , I was searching for a method of extracting the kernel from your ROM
Imagine, you want to extract boot.img from your ROM but don't know what to do, you don't have internet to download the stock or custom kernel or simply want to extract it?

I did not find anything except the solution of Android Kitchen but what if you want to do it on your android?

As a bi product of this search, I got a lot of knowledge about the partitions used by Android system and the blocks that define them.
I also got basic knowledge about Linux Scripting.

So, I created this script that backs up your boot.img and bml15.img partitions.​




boot.img - kernel of your device
bootextractorv2.sh - Backs up your kernel

bml15.img - IMEI partition
bml15extractorv2.sh - Backs up your IMEI partition

Note:- SGY Toolbox also backs up and restores bml15_EFS.img. And that also with a nice user interface, I just created this mod, because I wanted to but I recommend newbies to use SGY Toolbox for backing up IMEI

However, I found no tool able to backup the kernel, so it may be very useful for some members



ChangeLog

Code:
*More Interactive
*More Intelligent
*Added Option to create Odin Flashable Tar package for kernel
*More Convinient


Requirements :​



Root Acess
Busybox
Android device
Hands
Terminal Emulator or Script Manager
(Script Manager recommended)​



Instructions​





Script Manager Method (Easy):-

1. Download Script Manager.
2.Download desired script and place it on sdcard.
3. Open Script Manager and enable browse as root.
4. Go to the downloaded script and click on the green android icon(root) in the pop up window.
5. Click on Run. Follow Instructions and enjoy






Terminal Emulator Method (Hard):

1. Download Terminal Emulator.
2. Download desired script and place it in the root of the sdcard.
(You can place it anywhere else but the directory should not have spaces and you will have to change the commands accordingly)
3. Open Terminal Emulator and type (After every command you have to press enter)
Code:
su
And Grant Root Access
Then, type
Code:
sh /sdcard/bootextractorv2.sh
or
Code:
sh /sdcard/bml15extractorv2.sh
according to the the script you want to run
4. Now, follow the instructions on screen and enjoy :)





Credits :
Miscellaneous Google search posts showing how to write Linux Script
Me for writing the script
Rafael.Baugis for source
Ryuinferno for guide
 
Last edited:

dabeez98

Senior Member
Jul 2, 2012
370
61
Malmö
I'll test on S5830 and report asap

edit: Script wouldn't run on S5830 with script manager. With terminal emulator it dumps an empty boot.img
 
Last edited:

puntillero

Member
Mar 19, 2009
11
3
Doesn't work for me, S5830i stock firmware. If I use script manager method, a lot of "not found" messages, and finally the boot folder is empty. I give script manager root permission. And if I use a terminal emulator, the same error messages, finally there is a 5MB boot.img file, but "untouchable". I can not copy in any other folder. If I connect to PC, boot.img is missing. Appears again in the mobile when I disconnet the USB. I can not change file permissions with root explorer....

Also when the script ask if I want to create a zip file for recovery, I select 1 and I get "bad integer, run again"

Thank you
 

iamareebjamal

Senior Member
Aug 7, 2012
3,705
5,117
24
Batcave
www.facebook.com
Doesn't work for me, S5830i stock firmware. If I use script manager method, a lot of "not found" messages, and finally the boot folder is empty. I give script manager root permission. And if I use a terminal emulator, the same error messages, finally there is a 5MB boot.img file, but "untouchable". I can not copy in any other folder. If I connect to PC, boot.img is missing. Appears again in the mobile when I disconnet the USB. I can not change file permissions with root explorer....

Also when the script ask if I want to create a zip file for recovery, I select 1 and I get "bad integer, run again"

Thank you
You have busybox?

If no,

You can't run it
 

puntillero

Member
Mar 19, 2009
11
3
Yes, and the script founds it (it says). Finally I zipped boot.img with root explorer and that zip file could be copied to the PC. Guess the file is ok. Thanks.
 
Last edited:

puntillero

Member
Mar 19, 2009
11
3
English is not my language. I explained that boot.img was untouchable. I tried to copy to computer and I always got writing errors. Rebooting wasn't useful. Permissions couldn't be changed with root explorer.. The file was there, but couldn't do anything with It. Tried to zip it and it worked, and I copied the zip to my computer..
 

iamareebjamal

Senior Member
Aug 7, 2012
3,705
5,117
24
Batcave
www.facebook.com
English is not my language. I explained that boot.img was untouchable. I tried to copy to computer and I always got writing errors. Rebooting wasn't useful. Permissions couldn't be changed with root explorer.. The file was there, but couldn't do anything with It. Tried to zip it and it worked, and I copied the zip to my computer..
Sure that there is problem in busybox applet sync

I don't know why script couldn't detect it
 
  • Like
Reactions: puntillero

puntillero

Member
Mar 19, 2009
11
3
I don't know what the problem was. I installed, not without many problems, the last busybox available, and everything worked ok. Out of curiosity, I compared boot.img file extracted with "problems" and the boot.img extracted now cleanly, and are identical.

Regards
 

Top Liked Posts

  • There are no posts matching your filters.
  • 16
    ROM Tools v2


    Version 2 BETA

    v2b (Officially v2)
    Linux Script
    by iamareebjamal

    Automated Android script for extracting boot.img and bml15 partition



    My PC has issues so I can't use it to build mods and scripts, also, I have a very slow internet connection. That's why I don't upload my ROMs. Provided, I build EACH and EVERY one of my mod on my mobile, including those long scripts with repeating commands and making it easy for other guys to use, I could've just created a script with two commands which rendered error if used incorrectly, but I make it noob proof in every way possible so that there are minimum errors from your side and if something gets wrong, you know what it is. Even uploading 5 mb of mod makes it very difficult as I have to reupload if it fails. Writing scripts on mobile is not easy, you'll know if you have done it, it takes hours. Also, these colorful and easy guides are also made on mobile by writing BB codes ONE BY ONE by hand.
    I am telling you because a person day before yesterday posted my Amazing Sounds Mod in another forum without my permission. However, he has removed it now. My work is fully open sourced for you to learn and make your own mods. But taking part of my work and posting as yours is not appreciated.
    The MOST you can give me is love, prayers and Thanks

    :)



    Out of the time I was absent from XDA(13 hours :p) , I was searching for a method of extracting the kernel from your ROM
    Imagine, you want to extract boot.img from your ROM but don't know what to do, you don't have internet to download the stock or custom kernel or simply want to extract it?

    I did not find anything except the solution of Android Kitchen but what if you want to do it on your android?

    As a bi product of this search, I got a lot of knowledge about the partitions used by Android system and the blocks that define them.
    I also got basic knowledge about Linux Scripting.

    So, I created this script that backs up your boot.img and bml15.img partitions.​




    boot.img - kernel of your device
    bootextractorv2.sh - Backs up your kernel

    bml15.img - IMEI partition
    bml15extractorv2.sh - Backs up your IMEI partition

    Note:- SGY Toolbox also backs up and restores bml15_EFS.img. And that also with a nice user interface, I just created this mod, because I wanted to but I recommend newbies to use SGY Toolbox for backing up IMEI

    However, I found no tool able to backup the kernel, so it may be very useful for some members



    ChangeLog

    Code:
    *More Interactive
    *More Intelligent
    *Added Option to create Odin Flashable Tar package for kernel
    *More Convinient


    Requirements :​



    Root Acess
    Busybox
    Android device
    Hands
    Terminal Emulator or Script Manager
    (Script Manager recommended)​



    Instructions​





    Script Manager Method (Easy):-

    1. Download Script Manager.
    2.Download desired script and place it on sdcard.
    3. Open Script Manager and enable browse as root.
    4. Go to the downloaded script and click on the green android icon(root) in the pop up window.
    5. Click on Run. Follow Instructions and enjoy






    Terminal Emulator Method (Hard):

    1. Download Terminal Emulator.
    2. Download desired script and place it in the root of the sdcard.
    (You can place it anywhere else but the directory should not have spaces and you will have to change the commands accordingly)
    3. Open Terminal Emulator and type (After every command you have to press enter)
    Code:
    su
    And Grant Root Access
    Then, type
    Code:
    sh /sdcard/bootextractorv2.sh
    or
    Code:
    sh /sdcard/bml15extractorv2.sh
    according to the the script you want to run
    4. Now, follow the instructions on screen and enjoy :)





    Credits :
    Miscellaneous Google search posts showing how to write Linux Script
    Me for writing the script
    Rafael.Baugis for source
    Ryuinferno for guide
    2
    yes...
    i have boot.img
    but i did not create tar package..
    i don't have any problem with kernel at the moment..just wanted to know is it possible to restore kernel ??
    or i will have to flash it via odin by creating odin flashable package ?

    Sent from my GT-S5830i using xda app-developers app

    No, you can also place boot image in root of sdcard

    And go to terminal emulator

    Type
    su
    -Enter-
    dd if=/sdcard/boot.img of=/dev/bml7
    -Enter-



    But its highly not recommended, as it can brick the phone if something goes wrong


    Alternative, you can replace your boot.img in Rafael kernel package
    1
    V2 completed

    Uploading ASAP
    1
    OP Updated


    v2 released
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone