Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,731,698 Members 49,412 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
lyriquidperfection
Old
(Last edited by lyriquidperfection; 30th August 2013 at 10:32 PM.)
#1  
Recognized Developer / Retired Forum Moderator - OP
Thanks Meter 2478
Posts: 2,489
Join Date: Jun 2009
Location: Nottingham

 
DONATE TO ME
Default [GUIDE] Pre-Root ROM and Rebuild into Odin Flashable Package!

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, 3122 views)
My Applications

EFS Professional v2.1.73 (With Qualcomm NV Tools and PIT Magic) - For All Android Devices

LG CSMG Tool v1.0.21 - For LG Mobile Server Queries and Firmware Checking

PIT Magic v1.3.10 - Samsung PIT Creator, Editor and Analyzer

Odin ROM Package Builder v1.3 - Complete Pre-Root and Repack Utilities for Linux

Samsung Quick Root v1.7.10 And HTC Quick Root v1.1.13 - All In One Root / Unroot Solutions
------------------------------------------------------------------------------------
If you like my hard work, please buy me a coffee and a pack of nappies for my little daughter!

The Following 21 Users Say Thank You to lyriquidperfection For This Useful Post: [ Click to Expand ]
 
kakyyabata
Old
#2  
Member
Thanks Meter 28
Posts: 74
Join Date: 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
 
nicemblem
Old
#3  
nicemblem's Avatar
Member
Thanks Meter 85
Posts: 36
Join Date: Feb 2011
Location: 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 or shall I convert original system.img to ext4 file?
 
lyriquidperfection
Old
#4  
Recognized Developer / Retired Forum Moderator - OP
Thanks Meter 2478
Posts: 2,489
Join Date: Jun 2009
Location: Nottingham

 
DONATE TO ME
Quote:
Originally Posted by nicemblem View Post
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
My Applications

EFS Professional v2.1.73 (With Qualcomm NV Tools and PIT Magic) - For All Android Devices

LG CSMG Tool v1.0.21 - For LG Mobile Server Queries and Firmware Checking

PIT Magic v1.3.10 - Samsung PIT Creator, Editor and Analyzer

Odin ROM Package Builder v1.3 - Complete Pre-Root and Repack Utilities for Linux

Samsung Quick Root v1.7.10 And HTC Quick Root v1.1.13 - All In One Root / Unroot Solutions
------------------------------------------------------------------------------------
If you like my hard work, please buy me a coffee and a pack of nappies for my little daughter!

 
lyriquidperfection
Old
#5  
Recognized Developer / Retired Forum Moderator - OP
Thanks Meter 2478
Posts: 2,489
Join Date: Jun 2009
Location: Nottingham

 
DONATE TO ME
Odin ROM Package Builder has now been updated to v1.3
My Applications

EFS Professional v2.1.73 (With Qualcomm NV Tools and PIT Magic) - For All Android Devices

LG CSMG Tool v1.0.21 - For LG Mobile Server Queries and Firmware Checking

PIT Magic v1.3.10 - Samsung PIT Creator, Editor and Analyzer

Odin ROM Package Builder v1.3 - Complete Pre-Root and Repack Utilities for Linux

Samsung Quick Root v1.7.10 And HTC Quick Root v1.1.13 - All In One Root / Unroot Solutions
------------------------------------------------------------------------------------
If you like my hard work, please buy me a coffee and a pack of nappies for my little daughter!

 
ZeroxCorbin
Old
(Last edited by ZeroxCorbin; 26th August 2013 at 09:27 PM.) Reason: Added stdout
#6  
ZeroxCorbin's Avatar
Junior Member
Thanks Meter 62
Posts: 29
Join Date: Jul 2013
Default 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.
The Following User Says Thank You to ZeroxCorbin For This Useful Post: [ Click to Expand ]
 
zebari
Old
#7  
Junior Member
Thanks Meter 0
Posts: 4
Join Date: Aug 2013
thanks a lot
 
ladislav.heller
Old
#8  
Senior Member
Thanks Meter 316
Posts: 468
Join Date: Apr 2012
Location: Bratislava

 
DONATE TO ME
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: [ Click to Expand ]
 
lyriquidperfection
Old
#9  
Recognized Developer / Retired Forum Moderator - OP
Thanks Meter 2478
Posts: 2,489
Join Date: Jun 2009
Location: Nottingham

 
DONATE TO ME
@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
My Applications

EFS Professional v2.1.73 (With Qualcomm NV Tools and PIT Magic) - For All Android Devices

LG CSMG Tool v1.0.21 - For LG Mobile Server Queries and Firmware Checking

PIT Magic v1.3.10 - Samsung PIT Creator, Editor and Analyzer

Odin ROM Package Builder v1.3 - Complete Pre-Root and Repack Utilities for Linux

Samsung Quick Root v1.7.10 And HTC Quick Root v1.1.13 - All In One Root / Unroot Solutions
------------------------------------------------------------------------------------
If you like my hard work, please buy me a coffee and a pack of nappies for my little daughter!

The Following User Says Thank You to lyriquidperfection For This Useful Post: [ Click to Expand ]
 
ZeroxCorbin
Old
#10  
ZeroxCorbin's Avatar
Junior Member
Thanks Meter 62
Posts: 29
Join Date: Jul 2013
Default SGH-I467 - ATT Note 8

Quote:
Originally Posted by lyriquidperfection View Post
@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.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes