Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

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

OP lyriquidperfection

19th August 2013, 01:02 AM   |  #1  
OP Recognized Developer / Retired Forum Moderator
Flag Nottingham
Thanks Meter: 2,596
 
2,501 posts
Join Date:Joined: Jun 2009
Donate to Me
More
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.
Attached Files
File Type: gz pre-root_rel_1.3.tar.gz - [Click for QR Code] (1.44 MB, 4127 views)
Last edited by lyriquidperfection; 30th August 2013 at 11:32 PM.
The Following 24 Users Say Thank You to lyriquidperfection For This Useful Post: [ View ]
19th August 2013, 07:26 AM   |  #2  
Senior Member
Thanks Meter: 35
 
101 posts
Join Date:Joined: Apr 2011
Donate to Me
thanks a lot for ur script can u plz make a video for this because i will install linux but im confuse
19th August 2013, 11:53 AM   |  #3  
nicemblem's Avatar
Member
Flag Xi'an
Thanks Meter: 86
 
36 posts
Join Date:Joined: Feb 2011
More
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 or shall I convert original system.img to ext4 file?
19th August 2013, 12:19 PM   |  #4  
OP Recognized Developer / Retired Forum Moderator
Flag Nottingham
Thanks Meter: 2,596
 
2,501 posts
Join Date:Joined: Jun 2009
Donate to Me
More
Quote:
Originally Posted by nicemblem

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 or shall I convert original system.img to ext4 file?

You need to edit the scripts and change the filenames.

Sent from my GT-I9505 using Tapatalk 4
25th August 2013, 02:44 PM   |  #5  
OP Recognized Developer / Retired Forum Moderator
Flag Nottingham
Thanks Meter: 2,596
 
2,501 posts
Join Date:Joined: Jun 2009
Donate to Me
More
Odin ROM Package Builder has now been updated to v1.3
26th August 2013, 09:00 AM   |  #6  
ZeroxCorbin's Avatar
Junior Member
Thanks Meter: 66
 
29 posts
Join Date:Joined: Jul 2013
More
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 by ZeroxCorbin; 26th August 2013 at 10:27 PM. Reason: Added stdout
The Following User Says Thank You to ZeroxCorbin For This Useful Post: [ View ]
26th August 2013, 09:26 AM   |  #7  
Junior Member
Thanks Meter: 0
 
4 posts
Join Date:Joined: Aug 2013
thanks a lot
26th August 2013, 11:06 PM   |  #8  
Senior Member
Flag Bratislava
Thanks Meter: 398
 
596 posts
Join Date:Joined: Apr 2012
Donate to Me
More
Works with Samsung Galaxy S3 Mini and Samsung Galaxy Chat.
Thanks for this tool!
The Following User Says Thank You to ladislav.heller For This Useful Post: [ View ]
27th August 2013, 08:54 AM   |  #9  
OP Recognized Developer / Retired Forum Moderator
Flag Nottingham
Thanks Meter: 2,596
 
2,501 posts
Join Date:Joined: Jun 2009
Donate to Me
More
@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
The Following User Says Thank You to lyriquidperfection For This Useful Post: [ View ]
27th August 2013, 09:34 AM   |  #10  
ZeroxCorbin's Avatar
Junior Member
Thanks Meter: 66
 
29 posts
Join Date:Joined: Jul 2013
More
SGH-I467 - ATT Note 8
Quote:
Originally Posted by lyriquidperfection

@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.

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes