[GUIDE] Pre-Root ROM and Rebuild into Odin Flashable Package!

Search This thread

lyriquidperfection

Inactive Recognized Developer
Jun 14, 2009
2,571
2,996
Nottingham
Odin ROM Package Builder v1.3 for 64-bit Linux based systems
-------------------------------------------------------------

---------------------
Pre-Rooting Process:
---------------------
Extract the pre-root_rel_1.3.tar.gz to your Home folder to create a 'pre-root_rel_1.3' working directory.

Extract and place ALL files from a Stock Odin flashable package to the 'source' folder.

Open a Terminal and navigate to the pre-root working folder.
For Example: cd /home/*username*/pre-root


---------------------------------------------------------
Then make sure the binaries have executable permissions:
---------------------------------------------------------
chmod 777 ./rebuild_system
chmod 777 ./build_rom
chmod 777 ./build_kernel
chmod 777 ./build_modem
chmod 777 ./build_csc


-----------------------------------------------
To rebuild the 'System Image' as 'Pre-Rooted':
-----------------------------------------------
You must first edit the param.cfg file and change the variables to match your ROMs files.

Save the file and type the following in the Terminal:

./rebuild_system


Notice that the correct system image size used for rebuilding is calculated for you automatically during the process.

Note: You will then be prompted to enter '[sudo] password'. This is the password you chose when you installed Linux.

When the process has finished, the Original 'System Image' in the 'source' folder will be replaced by the newly created 'Pre-Rooted' 'System Image'.


-------------------------------------------------------------------
To Rebuild 'source' files back into an Odin flashable ROM package:
-------------------------------------------------------------------
Type the following in the Terminal:

./build_rom

You will then be guided to name your Odin package before rebuilding.

'Enter Device Model' - For Example: I9505
'Enter Sales Code' - The CSC letters for example: 'BTU' for UK.
'Enter PDA Version' - For example: 'XXUBMGA_PRE-ROOTED'.
'Enter Phone Version' - Version of Modem. For example: 'XXUBMGA'.
'Enter CSC Version' - For example 'OXXBMG3'.

The package will then be rebuilt and finally an MD5 checksum will be added.

Your finished package will be then placed in the 'output' folder.


-----------------------------------
Other binaries within this package:
-----------------------------------
build_kernel - Allows you to package the Kernel file into an Odin Package.
build_modem - Allows you to package the Modem file into an Odin Package.
build_csc - Allows you to package the CSC files into an Odin Package.


----------------------------------------------------
This package is configured for I9505 by default.
----------------------------------------------------

If you get any errors you may have missing packages
just look at the error and install the relavant
package. Everything should then work fine.
 

Attachments

  • pre-root_rel_1.3.tar.gz
    1.4 MB · Views: 6,812
Last edited:

kakyyabata

Senior Member
Apr 16, 2011
113
36
thanks a lot for ur script can u plz make a video for this because i will install linux but im confuse
 

nicemblem

Member
Feb 25, 2011
36
86
Xi'an
Ah great work! thanks, but it seems to work just for GT-I9505? It asked me to put a system.img.ext4 to source folder from original Odin pack:confused: or shall I convert original system.img to ext4 file?
 

ZeroxCorbin

Member
Jul 16, 2013
29
68
SGH-I467 - ATT Note 8

Hello lyriquidperfection,

Thank you for your efforts.

I am trying to root my I467 (ATT Samsung Note 8). I was able to flash the image and reboot after some trial and error. When I try to run SuperSU I get a message "There is no SU binary installed, and SuperSU cannot install it. This is a problem".

I am using pre-root version 1.3 and Ubuntu server 12.04TLS

I ran the scripts;

./rebuild_system
./build_rom

I did not package the kernel, modem, or csc. I already have them from Samsung. Am I missing something?

Thanks again,

./rebuild_system stdout

---------------------------------------------------
--- Odin System Image Builder v1.3 (C) Gaz 2013 ---
---------------------------------------------------

Converting: 'system.img' from Sparse EXT4 Image to Standard EXT4 Image...
Okay!


Loop Mounting './system_image/system.img' to './system' Folder...
Okay!


Rooting 'system.img'...

system/xbin/[
system/xbin/[[
system/xbin/ash
....
system/xbin/zcat
system/app/Superuser.apk
system/xbin/busybox
system/xbin/su
Okay!


Getting required image size...
Size = 2048M


Rebuilding 'system.img' as Odin Flashable System Image...

Creating filesystem with parameters:
Size: 2147483648
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 8192
Label:
Blocks: 524288
Block groups: 16
Reserved block group size: 127
Created filesystem with 2173/131072 inodes and 346014/524288 blocks
Okay!


Unmounting './system'...
loop: can't delete device /dev/loop0: No such device or address
Okay!


Cleaning up folders...
Okay!


Removing Original 'system.img' from './source' Folder...
rm: remove write-protected regular file `./source/system.img'? y
Okay!


Moving Pre-Rooted 'system.img' to './source' Folder...
Okay!


Finished.


./build_rom stdout;

----------------------------------------------------
---- Odin ROM Package Builder v1.3 (C) Gaz 2013 ----
----------------------------------------------------

Enter Device Model: SAMSUNG-SGH-I467
Enter Sales Code: ATT
Enter PDA Version: I467UCAMF1-ROOT
Enter PHONE Version: I467UCAMF1
Enter CSC Version: ATT_I467ATTAMF1

-----------------------------------------------------
-------- Building '.tar.md5' Odin Package... --------
-----------------------------------------------------

Creating TAR Archive...

boot.img
param.bin
recovery.img
sboot.bin
system.img
tombstones.img
tz.img
Okay!


Calculating MD5 Checksum...
Okay!


Moving file to: './output' folder...
Okay!


Odin ROM Package:
'SAMSUNG-SGH-I467_ATT_SAMSUNG-SGH-I467I467UCAMF1-ROOT_SAMSUNG-SGH-I467I467UCAMF1_SAMSUNG-SGH-I467ATT_I467ATTAMF1.tar.md5'
Built successfully in './output' folder.

Finished.
 
Last edited:
  • Like
Reactions: sfvortex

ZeroxCorbin

Member
Jul 16, 2013
29
68
SGH-I467 - ATT Note 8

@ZeroxCorbin

Don't AT&T and Verizon lock their bootloaders? If so then you would need to unlock it before you can flash ROMs.

Sent from my GT-I9505 using Tapatalk 4

I believe they do, but I am able to flash the new system.img. I can even flash the factory bootloader, csc, and modem using Odin.

I can run SuperSU after flashing the modified image. I just get the error that the binary is not installed. I have tried using the stock recovery to load SuperSu from a zip file, after flashing, but Samsung only allows self signed files.

I also noticed that I can not get a data connection via LTE with the modified system.img flashed. If I flash everything back to factory LTE data works.

What do you think could cause the binary to not be available even though it is there? Permissions? If so, is the bootloader changing them after the flash is complete?

Thanks for any advice, and the prompt reply.
 

Zidkijah

Senior Member
Jan 13, 2011
135
161
O'Fallon, MO
I have Linux Mint installed and also have bash installed. And I am also getting the same error........ Suggestions?

Code:
chad@ML-Chad ~/Downloads/pre-root $ ./rebuild_system 
bash: ./rebuild_system: cannot execute binary file
 

h311sdr0id

Inactive Recognized Developer
Jul 20, 2011
540
1,108
I believe they do, but I am able to flash the new system.img. I can even flash the factory bootloader, csc, and modem using Odin.

I can run SuperSU after flashing the modified image. I just get the error that the binary is not installed. I have tried using the stock recovery to load SuperSu from a zip file, after flashing, but Samsung only allows self signed files.

I also noticed that I can not get a data connection via LTE with the modified system.img flashed. If I flash everything back to factory LTE data works.

What do you think could cause the binary to not be available even though it is there? Permissions? If so, is the bootloader changing them after the flash is complete?

Thanks for any advice, and the prompt reply.


Are you packing with "aboot"?
 

ZeroxCorbin

Member
Jul 16, 2013
29
68
SGH-I467 - ATT Note 8

Hello lyriquidperfection,

Thanks to you and many other I was able to get root access to my SGH-i467. Thanks for the tools.

As a note, I had to convert, mount, and "chown root:root" the supersu.pk file after running ./rebuild_system. The permissions where set to my username. Not sure if your binary is correctly changing the permissions of the file?

Thanks again, :good:
 

lyriquidperfection

Inactive Recognized Developer
Jun 14, 2009
2,571
2,996
Nottingham
Hello lyriquidperfection,

Thanks to you and many other I was able to get root access to my SGH-i467. Thanks for the tools.

As a note, I had to convert, mount, and "chown root:root" the supersu.pk file after running ./rebuild_system. The permissions where set to my username. Not sure if your binary is correctly changing the permissions of the file?

Thanks again, :good:

That doesn't matter as you are the one who will be launching it anyway. Works on my device on I9505.

Sent from my GT-I9505 using Tapatalk 4
 

Top Liked Posts

  • There are no posts matching your filters.
  • 28
    Odin ROM Package Builder v1.3 for 64-bit Linux based systems
    -------------------------------------------------------------

    ---------------------
    Pre-Rooting Process:
    ---------------------
    Extract the pre-root_rel_1.3.tar.gz to your Home folder to create a 'pre-root_rel_1.3' working directory.

    Extract and place ALL files from a Stock Odin flashable package to the 'source' folder.

    Open a Terminal and navigate to the pre-root working folder.
    For Example: cd /home/*username*/pre-root


    ---------------------------------------------------------
    Then make sure the binaries have executable permissions:
    ---------------------------------------------------------
    chmod 777 ./rebuild_system
    chmod 777 ./build_rom
    chmod 777 ./build_kernel
    chmod 777 ./build_modem
    chmod 777 ./build_csc


    -----------------------------------------------
    To rebuild the 'System Image' as 'Pre-Rooted':
    -----------------------------------------------
    You must first edit the param.cfg file and change the variables to match your ROMs files.

    Save the file and type the following in the Terminal:

    ./rebuild_system


    Notice that the correct system image size used for rebuilding is calculated for you automatically during the process.

    Note: You will then be prompted to enter '[sudo] password'. This is the password you chose when you installed Linux.

    When the process has finished, the Original 'System Image' in the 'source' folder will be replaced by the newly created 'Pre-Rooted' 'System Image'.


    -------------------------------------------------------------------
    To Rebuild 'source' files back into an Odin flashable ROM package:
    -------------------------------------------------------------------
    Type the following in the Terminal:

    ./build_rom

    You will then be guided to name your Odin package before rebuilding.

    'Enter Device Model' - For Example: I9505
    'Enter Sales Code' - The CSC letters for example: 'BTU' for UK.
    'Enter PDA Version' - For example: 'XXUBMGA_PRE-ROOTED'.
    'Enter Phone Version' - Version of Modem. For example: 'XXUBMGA'.
    'Enter CSC Version' - For example 'OXXBMG3'.

    The package will then be rebuilt and finally an MD5 checksum will be added.

    Your finished package will be then placed in the 'output' folder.


    -----------------------------------
    Other binaries within this package:
    -----------------------------------
    build_kernel - Allows you to package the Kernel file into an Odin Package.
    build_modem - Allows you to package the Modem file into an Odin Package.
    build_csc - Allows you to package the CSC files into an Odin Package.


    ----------------------------------------------------
    This package is configured for I9505 by default.
    ----------------------------------------------------

    If you get any errors you may have missing packages
    just look at the error and install the relavant
    package. Everything should then work fine.
    1
    SGH-I467 - ATT Note 8

    Hello lyriquidperfection,

    Thank you for your efforts.

    I am trying to root my I467 (ATT Samsung Note 8). I was able to flash the image and reboot after some trial and error. When I try to run SuperSU I get a message "There is no SU binary installed, and SuperSU cannot install it. This is a problem".

    I am using pre-root version 1.3 and Ubuntu server 12.04TLS

    I ran the scripts;

    ./rebuild_system
    ./build_rom

    I did not package the kernel, modem, or csc. I already have them from Samsung. Am I missing something?

    Thanks again,

    ./rebuild_system stdout

    ---------------------------------------------------
    --- Odin System Image Builder v1.3 (C) Gaz 2013 ---
    ---------------------------------------------------

    Converting: 'system.img' from Sparse EXT4 Image to Standard EXT4 Image...
    Okay!


    Loop Mounting './system_image/system.img' to './system' Folder...
    Okay!


    Rooting 'system.img'...

    system/xbin/[
    system/xbin/[[
    system/xbin/ash
    ....
    system/xbin/zcat
    system/app/Superuser.apk
    system/xbin/busybox
    system/xbin/su
    Okay!


    Getting required image size...
    Size = 2048M


    Rebuilding 'system.img' as Odin Flashable System Image...

    Creating filesystem with parameters:
    Size: 2147483648
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 8192
    Inode size: 256
    Journal blocks: 8192
    Label:
    Blocks: 524288
    Block groups: 16
    Reserved block group size: 127
    Created filesystem with 2173/131072 inodes and 346014/524288 blocks
    Okay!


    Unmounting './system'...
    loop: can't delete device /dev/loop0: No such device or address
    Okay!


    Cleaning up folders...
    Okay!


    Removing Original 'system.img' from './source' Folder...
    rm: remove write-protected regular file `./source/system.img'? y
    Okay!


    Moving Pre-Rooted 'system.img' to './source' Folder...
    Okay!


    Finished.


    ./build_rom stdout;

    ----------------------------------------------------
    ---- Odin ROM Package Builder v1.3 (C) Gaz 2013 ----
    ----------------------------------------------------

    Enter Device Model: SAMSUNG-SGH-I467
    Enter Sales Code: ATT
    Enter PDA Version: I467UCAMF1-ROOT
    Enter PHONE Version: I467UCAMF1
    Enter CSC Version: ATT_I467ATTAMF1

    -----------------------------------------------------
    -------- Building '.tar.md5' Odin Package... --------
    -----------------------------------------------------

    Creating TAR Archive...

    boot.img
    param.bin
    recovery.img
    sboot.bin
    system.img
    tombstones.img
    tz.img
    Okay!


    Calculating MD5 Checksum...
    Okay!


    Moving file to: './output' folder...
    Okay!


    Odin ROM Package:
    'SAMSUNG-SGH-I467_ATT_SAMSUNG-SGH-I467I467UCAMF1-ROOT_SAMSUNG-SGH-I467I467UCAMF1_SAMSUNG-SGH-I467ATT_I467ATTAMF1.tar.md5'
    Built successfully in './output' folder.

    Finished.
    1
    Works with Samsung Galaxy S3 Mini and Samsung Galaxy Chat.
    Thanks for this tool!
    1
    @ZeroxCorbin

    Don't AT&T and Verizon lock their bootloaders? If so then you would need to unlock it before you can flash ROMs.

    Sent from my GT-I9505 using Tapatalk 4
    1
    Cheers for the guide :)