5,606,409 Members 33,585 Now Online
XDA Developers Android and Mobile Development Forum

[GUIDE] A Comprehensive Guide to Create Prerooted Odin Flashable Packages

Tip us?
 
rebel1699
Old
(Last edited by rebel1699; 7th March 2014 at 11:58 PM.)
#11  
rebel1699's Avatar
Senior Member
Thanks Meter 1133
Posts: 1,612
Join Date: Feb 2008
Location: Oklahoma
On Case 2, I am trying to mount the system.img. typing "sudo mount -o loop system.img.ext4 temp" only results in "you must specify the filesystem type".

Yeah, nevermind. The mkuserimg.sh has issues, needs work. Line 58 needs to be edited from "MAKE_EXT4FS" to "make_ext4fs" otherwise, it will return command not found. It also never actually builds the resulting image. No system.img.ext4 is ever found anywhere after running the script. Just still left with the original that you started with, with no changes. In addition, some image files with the ext4 extension ARE NOT IN EXT4 FORMAT. You still must rename to remove the ext4 extension, and sim2img in order to mount. Still, all pointless since the mkuserimg.sh is partially fragged. If you attempt to run "Case 2" one some system.img.ext4 images, you will fail. "Sudo mount -o loop system.img.ext4 temp" will result in no more than "you must specify the filesystem type"

Sent from my Nexus 7 using XDA Premium 4 mobile app
Current Devices

Galaxy S4 i337 Drowning on MF3
Nexus 7 32Gb MULTIROM w/ Kickflip, Illusion2, Ubuntu Desktop 13.04 and Metallice a54 kernel
Nexus 7 16Gb Multirom w/ Stock and Orca
SkyRocket i727 Powered by Beanstalk 4.3
LG Thrill w/ ICS
Blackberry Z10
Blackberry Torch 9860 OS7
3 D2 7' TabletS w/ICS

"There is no dark side of the moon, really. As a matter of fact, its all dark"
 
akkishayk
Old
#12  
Junior Member
Thanks Meter 0
Posts: 2
Join Date: Apr 2013
Location: Mumbai
hello frnds..
i have a galaxy star pro device
and i am trying to pre root my stock firmware using 1st case
all steps goes well but at the step of repack the system.img file i get following error

root@akshay-VirtualBox:/home/akshay/Documents/ext4_utils# ./mkuserimg.sh -s temp system.img ext4 temp 1027M
+ echo 'in mkuserimg.sh PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games'
in mkuserimg.sh PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
+ ENABLE_SPARSE_IMAGE=
+ '[' -s = -s ']'
+ ENABLE_SPARSE_IMAGE=-s
+ shift
+ '[' 5 -ne 5 -a 5 -ne 6 ']'
+ SRC_DIR=temp
+ '[' '!' -d temp ']'
+ OUTPUT_FILE=system.img
+ EXT_VARIANT=ext4
+ MOUNT_POINT=temp
+ SIZE=1027M
+ FC=
+ case $EXT_VARIANT in
+ '[' -z temp ']'
+ '[' -z 1027M ']'
+ '[' -n '' ']'
+ MAKE_EXT4FS_CMD='make_ext4fs -s -l 1027M -a temp system.img temp'
+ echo make_ext4fs -s -l 1027M -a temp system.img temp
make_ext4fs -s -l 1027M -a temp system.img temp
+ make_ext4fs -s -l 1027M -a temp system.img temp
./mkuserimg.sh: line 58: make_ext4fs: command not found
+ '[' 127 -ne 0 ']'
+ exit 4
root@akshay-VirtualBox:/home/akshay/Documents/ext4_utils#


and if i change the mkuserimg.sh file as per the rebel1699 from MAKE_EXT4FS TO make_ext4fs
then i get the following output-


root@akshay-VirtualBox:/home/akshay/Documents/ext4_utils# ./mkuserimg.sh -s temp system.img ext4 temp 1027M
+ echo 'in mkuserimg.sh PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games'
in mkuserimg.sh PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
+ ENABLE_SPARSE_IMAGE=
+ '[' -s = -s ']'
+ ENABLE_SPARSE_IMAGE=-s
+ shift
+ '[' 5 -ne 5 -a 5 -ne 6 ']'
+ SRC_DIR=temp
+ '[' '!' -d temp ']'
+ OUTPUT_FILE=system.img
+ EXT_VARIANT=ext4
+ MOUNT_POINT=temp
+ SIZE=1027M
+ FC=
+ case $EXT_VARIANT in
+ '[' -z temp ']'
+ '[' -z 1027M ']'
+ '[' -n '' ']'
+ MAKE_EXT4FS_CMD='make_ext4fs -s -l 1027M -a temp system.img temp'
+ echo make_ext4fs -s -l 1027M -a temp system.img temp
make_ext4fs -s -l 1027M -a temp system.img temp
+ '[' 0 -ne 0 ']'
root@akshay-VirtualBox:/home/akshay/Documents/ext4_utils#



no system.img file is created
so how to resolve this problem???
 
hnkotnis
Old
#13  
hnkotnis's Avatar
Senior Member - OP
Thanks Meter 346
Posts: 897
Join Date: Jul 2013
Location: Sangli, Maharashtra, India, Asia, Earth, Solar System, Milky Way Galaxy, Local Galaxy Group,Universe
Quote:
Originally Posted by akkishayk View Post
hello frnds..
i have a galaxy star pro device
and i am trying to pre root my stock firmware using 1st case
all steps goes well but at the step of repack the system.img file i get following error

root@akshay-VirtualBox:/home/akshay/Documents/ext4_utils# ./mkuserimg.sh -s temp system.img ext4 temp 1027M
+ echo 'in mkuserimg.sh PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games'
in mkuserimg.sh PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
+ ENABLE_SPARSE_IMAGE=
+ '[' -s = -s ']'
+ ENABLE_SPARSE_IMAGE=-s
+ shift
+ '[' 5 -ne 5 -a 5 -ne 6 ']'
+ SRC_DIR=temp
+ '[' '!' -d temp ']'
+ OUTPUT_FILE=system.img
+ EXT_VARIANT=ext4
+ MOUNT_POINT=temp
+ SIZE=1027M
+ FC=
+ case $EXT_VARIANT in
+ '[' -z temp ']'
+ '[' -z 1027M ']'
+ '[' -n '' ']'
+ MAKE_EXT4FS_CMD='make_ext4fs -s -l 1027M -a temp system.img temp'
+ echo make_ext4fs -s -l 1027M -a temp system.img temp
make_ext4fs -s -l 1027M -a temp system.img temp
+ make_ext4fs -s -l 1027M -a temp system.img temp
./mkuserimg.sh: line 58: make_ext4fs: command not found
+ '[' 127 -ne 0 ']'
+ exit 4
root@akshay-VirtualBox:/home/akshay/Documents/ext4_utils#


and if i change the mkuserimg.sh file as per the rebel1699 from MAKE_EXT4FS TO make_ext4fs
then i get the following output-


root@akshay-VirtualBox:/home/akshay/Documents/ext4_utils# ./mkuserimg.sh -s temp system.img ext4 temp 1027M
+ echo 'in mkuserimg.sh PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games'
in mkuserimg.sh PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
+ ENABLE_SPARSE_IMAGE=
+ '[' -s = -s ']'
+ ENABLE_SPARSE_IMAGE=-s
+ shift
+ '[' 5 -ne 5 -a 5 -ne 6 ']'
+ SRC_DIR=temp
+ '[' '!' -d temp ']'
+ OUTPUT_FILE=system.img
+ EXT_VARIANT=ext4
+ MOUNT_POINT=temp
+ SIZE=1027M
+ FC=
+ case $EXT_VARIANT in
+ '[' -z temp ']'
+ '[' -z 1027M ']'
+ '[' -n '' ']'
+ MAKE_EXT4FS_CMD='make_ext4fs -s -l 1027M -a temp system.img temp'
+ echo make_ext4fs -s -l 1027M -a temp system.img temp
make_ext4fs -s -l 1027M -a temp system.img temp
+ '[' 0 -ne 0 ']'
root@akshay-VirtualBox:/home/akshay/Documents/ext4_utils#



no system.img file is created
so how to resolve this problem???
Use method 3. It is compatible with all Samsung phones.
 
Siyad@AM
Old
#14  
Siyad@AM's Avatar
Senior Member
Thanks Meter 19
Posts: 109
Join Date: Mar 2014
Location: ▂ ▃ ▅ ▆ █ InterNet
Helped much
 
androvista
Old
#15  
androvista's Avatar
Senior Member
Thanks Meter 283
Posts: 665
Join Date: Aug 2013
Location: Mumbai
@hnkotnis the numbering is wrong in the part where prerequesits are there Usable brain


Hey, I'm androvista, head of the InFriction ROM team.
InFriction ROM team head - androvista is AwesomePress the Thanks button To Support my Hard Work
 
hnkotnis
Old
#16  
hnkotnis's Avatar
Senior Member - OP
Thanks Meter 346
Posts: 897
Join Date: Jul 2013
Location: Sangli, Maharashtra, India, Asia, Earth, Solar System, Milky Way Galaxy, Local Galaxy Group,Universe
Quote:
Originally Posted by androvista View Post
@hnkotnis the numbering is wrong in the part where prerequesits are there Usable brain
Corrected it.
The Following User Says Thank You to hnkotnis For This Useful Post: [ Click to Expand ]
 
manojkumar8552
Old
#17  
manojkumar8552's Avatar
Senior Member
Thanks Meter 136
Posts: 241
Join Date: Nov 2013
Location: AHEMADABAD
Quote:
Originally Posted by hnkotnis View Post
Press Thanks if helped.
i suggesting you to make a video guide as possible as you can do !!!

watching videos clears idea more than text files !!

would you like to make receipe by wwatching youtube or buy book and do it as shown in book ??????????


---------- Post added at 12:37 PM ---------- Previous post was at 12:36 PM ----------

Quote:
Originally Posted by hnkotnis View Post
GUIDE TO CREATE ODIN FLASHABLE
PREROOTED (and/or) PRETHEMED FIRMWARES


Guide by hnkotnis





Hello Everyone!

All of us, who own a Samsung device, need Odin Flash to go back to stock firmware.
This is done for various reasons like you want to flash a new ROM, so going to use stock ROM to serve as a base
or simply love stock ROM because of its stability.

However there is a catch. As soon as you flash the firmware, you lose root access.
Then starts the process (oftenly boring as you do it many times) and not to mention wear and tear of hardware buttons in recovery.
But this is easily solved by converting the firmwares into prerooted ones. You can put Superuser/SuperSU (and/or) busybox.

I assume you use 3 file flashing. PDA, PHONE (that is MODEM) and CSC.




Now coming to the point, there are 3 cases.
1) Firmwares which are in rfs and converted with simg2img
2) Latest firmwares which are based on ext4 (These files when extracted they are named as system.img.ext4 etc.)
3) Firmwares which show "bad magic" with simg2img (like galaxy y firmwares)








Press Thanks if helped.

i suggesting you to make a video guide as possible as you can do !!!

watching videos clears idea more than text files !!

would you like to make receipe by wwatching youtube or buy book and do it as shown in book ??????????
 
hnkotnis
Old
#18  
hnkotnis's Avatar
Senior Member - OP
Thanks Meter 346
Posts: 897
Join Date: Jul 2013
Location: Sangli, Maharashtra, India, Asia, Earth, Solar System, Milky Way Galaxy, Local Galaxy Group,Universe
Quote:
Originally Posted by manojkumar8552 View Post
i suggesting you to make a video guide as possible as you can do !!!

watching videos clears idea more than text files !!

would you like to make receipe by wwatching youtube or buy book and do it as shown in book ??????????


---------- Post added at 12:37 PM ---------- Previous post was at 12:36 PM ----------




i suggesting you to make a video guide as possible as you can do !!!

watching videos clears idea more than text files !!

would you like to make receipe by wwatching youtube or buy book and do it as shown in book ??????????
Why you are posting same thing double?

And no, I cannot make and upload video. It will take lot of time to upload. I have really bad internet.

Sent from my GT-I9001 Gadget of Mass Destruction with CM11 using XDA Developers App.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes