Well i dumped my own rom and did this:
Code:
tar -H ustar -c zImage boot.bin modem.bin Sbl.bin cache.img data.img factoryfs.img hidden.img param.lfs > odin.tar
md5sum -t odin.tar >> odin.tar
mv odin.tar odin.tar.md5
It does create a valid flashable image for Odin... but the problem is that it increases the binary counter!
Anyone know how can i create a tar image without increasing it?
Since no one replied and in case anyone is wondering: to make a repack just use the stock kernel because a custom recovery increases the binary.. As simples as that
Sent from my GT-N7000 using Tapatalk 2
Related
My question is how I can do a CSC file to use with Odin.
I have my last official spanish froyo rom with all the file:
cache.rfs
factoryfs.rfs
modem.bin
param.lfs
zImage
I think that I can extract from this rom the chache.rfs, and then with 7-zip put this file in a tar archive with compression level in Store
Is it all right?? How I can change my file .tar in .tar.md5??
Ok I find this info for do a CSC:
I must use cygwin o linux and write these things in the consola
$ tar -H ustar -c image_1 [image_2 ...] > your_odin_package.tar
$ md5sum -t your_odin_package.tar >> your_odin_package.tar
$ mv your_odin_package.tar your_odin_package.tar.md5
Fonts Nu11u5 of androidforums
These are the commands for Cygwin
For the Pda.tar.md5
Code:
tar -H ustar -c factoryfs.rfs param.lfs zImage > PDA-I9000EsticboJxx.tar
md5sum -t PDA-I9000EsticboJxx.tar >> PDA-I9000EsticboJxx.tar
mv PDA-I9000EsticboJxx.tar PDA-I9000EsticboJxx.tar.md5
For the CSC.tar.md5
Code:
tar -H ustar -c cache.rfs dbdata.rfs > CSC_I9000FOPJxx.tar
md5sum -t CSC_I9000FOPJxx.tar >> CSC_I9000FOPJxx.tar
mv CSC_I9000FOPJxx.tar CSC_I9000FOPJxx.tar.md5
For Phone.tar.md5
Code:
tar -H ustar -c modem.bin > PHONE-I9000EsticboJxx.tar
md5sum -t PHONE-I9000EsticboJxx.tar >> PHONE-I9000EsticboJxx.tar
mv PHONE-I9000EsticboJxx.tar PHONE-I9000EsticboJxx.tar.md5
It mostly depends on what cache.rfs (and NOT .rtf) contains.
That partition usually contains the update-script to fullfill the /system/csc directory, but it isn't mandatory.
I often saw dbdata.rfs partitions packed within CODE, too
To split CSC isn't always such a simple task...
See here: http://tinyurl.com/6j8xdc6
(italian only, sorry)
I try to break down to understand from original firmware. I would like to discuss with anyone who expertise to solve understanding about odin system for GT-I9000. Anyone can give input in this thread to more understand newbie like me.
I not sure which the correct to follow to make own odin.
I tried to read and following from these threads:
http://forum.xda-developers.com/showthread.php?t=960946
http://forum.xda-developers.com/showthread.php?t=1082288
http://forum.xda-developers.com/showthread.php?t=965190
http://forum.xda-developers.com/showthread.php?t=850359
So there are others files
Boot Loader File(s) contain: boot.bin, Sbl.bin
PDA File(s) contain: boot.bin, Sbl.bin, param.lfs, factoryfs.rfs, dbdata.rfs, efs.rfs*, zImage
PHONE File(s) contain: modem.bin
CSC File(s) contain: cache.rfs
* efs.rfs it seem not really include when creating PDA file.
On the adb shell I type 'mount' and these below are strip off the lists:
$ mount
/dev/block/stl9 /system rfs rw
/dev/block/stl3 /efs rfs rw
/dev/block/mmcblk0p2 /data rfs rw
/dev/block/stl10 /dbdata rfs rw
/dev/block/stl11 /cache rfs rw
/dev/block/stl6 /mnt/.lfs j4fs rw
/dev/block/vold/179:1 /mnt/sdcard vfat rw
/dev/block/vold/179:9 /mnt/sdcard/external_sd vfat rw
/dev/block/vold/179:9 /mnt/secure/asec vfat rw
Click to expand...
Click to collapse
Boot Loader File(s):
boot.bin
Function: Boot Loader (Optional)
Code:
dd if=/dev/block/bml1 of=/sdcard/odin/boot.bin bs=4096
Click to expand...
Click to collapse
Sbl.bin
Function: Boot Loader (Optional)
Code:
dd if=/dev/block/bml4 of=/sdcard/odin/Sbl.bin bs=4096
Click to expand...
Click to collapse
Click to expand...
Click to collapse
PDA File(s):
factoryfs.rfs
Function: System/Main Package
Mount: /dev/block/stl9 /system
Code:
dd if=/dev/block/stl9 of=/sdcard/odin/factoryfs.rfs bs=4096
Click to expand...
Click to collapse
dbdata.rfs
Function: File system + user database
Mount: /dev/block/stl10 /dbdata
Code:
dd if=/dev/block/stl10 of=/sdcard/odin/dbdata.rfs bs=4096
Click to expand...
Click to collapse
param.lfs
Function: Boot Animation
Code:
dd if=/dev/block/stl6 of=/sdcard/odin/param.lfs bs=4096
Click to expand...
Click to collapse
efs.rfs
Function: N.A. (Still find out)
Code:
dd if=/dev/block/stl3 of=/sdcard/odin/efs.rfs bs=4096
Click to expand...
Click to collapse
Sbl.bin
Function: Boot Loader
Code:
dd if=/dev/block/bml4 of=/sdcard/odin/Sbl.bin bs=4096
Click to expand...
Click to collapse
zImage
Function: Kernel
Code:
dd if=/dev/block/bml7 of=/sdcard/odin/zImage bs=4096
Click to expand...
Click to collapse
Click to expand...
Click to collapse
PHONE File(s):
modem.bin
Function: Modem country/regional
Code:
dd if=/dev/block/bml12 of=/sdcard/odin/modem.bin bs=4096
Click to expand...
Click to collapse
Click to expand...
Click to collapse
CSC File(s):
cache.rfs
Function: CSC code/Sales country code/Cache/Telco
Mount: /dev/block/stl11 /cache
Code:
dd if=/dev/block/stl11 of=/sdcard/odin/cache.rfs bs=4096
Click to expand...
Click to collapse
Click to expand...
Click to collapse
PIT File(s):
Function: Partition Information (PIT)
Code:
dd if=/dev/block/bml2 of=/sdcard/odin/pit.pit bs=4096
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Recovery:
Function: N.A. (Still find out)
Code:
dd if=/dev/block/bml9 of=/sdcard/odin/recovery.bin bs=4096
Click to expand...
Click to collapse
Data:
Function: N.A. (Still find out)
Code:
dd if=/dev/block/mmcblk0p1 of=/sdcard/odin/movinand.bin bs=4096
Click to expand...
Click to collapse
Description:
Mount is the command when execute on terminal or adb shell.
Dump is the command to execute using 'adb shell'.
CREATE ODIN FILE
Bootloader
Code:
tar -c boot.bin sbl.bin >> Bootloader.tar
Creating a PDA.tar.md5
Code:
tar -c boot.bin sbl.bin param.lfs factoryfs.rfs dbdata.rfs zImage >> PDA.tar
md5sum -t PDA.tar >> PDA.tar
mv PDA.tar PDA.tar.md5
Or single command with multiple batch for PDA.
tar -c boot.bin sbl.bin param.lfs factoryfs.rfs dbdata.rfs zImage >> PDA.tar ; md5sum -t PDA.tar >> PDA.tar ; mv PDA.tar PDA.tar.md5
Click to expand...
Click to collapse
Creating a Phone.tar.md5
Code:
tar -c modem.bin >> Phone.tar
md5sum -t Phone.tar >> Phone.tar
mv Phone.tar Phone.tar.md5
Or single command with multiple batch for PHONE.
tar -c modem.bin >> Phone.tar ; md5sum -t Phone.tar >> Phone.tar ; mv Phone.tar Phone.tar.md5
Click to expand...
Click to collapse
Creating a CSC.tar.md5
Code:
tar -c cache.rfs >> CSC.tar
md5sum -t CSC.tar >> CSC.tar
mv CSC.tar CAC.tar.md5
Or single command with multiple batch for PHONE.
tar -c cache.rfs >> CSC.tar ; md5sum -t CSC.tar >> CSC.tar ; mv CSC.tar CAC.tar.md5
Click to expand...
Click to collapse
Simplify command for creating PDA only:
Code:
dd if=/dev/block/stl9 of=/sdcard/factoryfs.rfs bs=4096
dd if=/dev/block/stl11 of=/sdcard/cache.rfs bs=4096
dd if=/dev/block/bml7 of=/sdcard/zImage bs=4096
dd if=/dev/block/bml12 of=/sdcard/modem.bin bs=4096
tar -c factoryfs.rfs cache.rfs modem.bin zImage >> JustPDA.tar
md5sum -t JustPDA.tar >> JustPDA.tar
mv JustPDA.tar JustPDA.tar.md5
Reserved for future use.
Reserved for future use.
YES!
On-phone developing is the way to go. Start with a firmware from SamFirmwares.com. keep it safe. Do your modifications using the techniques I laid out here: http://forum.xda-developers.com/showthread.php?t=1030107 Then when you are finished, use the methods above.
Now, the reason you kept the SamFirmwares.com original firmware safe.... You'll need the partition information table PIT for an extra level of security when distributing your new ROM. For extra cool points, wrap it up in a Heimdall TAR.GZ firmware package, then make it a one-click with Heimdall One-Click (not yet finished).
btw.. to save space in the firmware package, you can omit the cache file, or clear your cache, then adb into your phone in recovery mode and grab it there... The cache file is regenerated when the user selects to clear cache.
The data partition is the temporary storage area for apps, also some apps default to the data area for storage.... It's also a good place to deploy binaries that you want to execute. It cannot be flashed by Odin protocol though.... It's the "extra" space on the disk left over after the partitioning.
AdamOutler said:
YES!
Now, the reason you kept the SamFirmwares.com original firmware safe.... You'll need the partition information table PIT for an extra level of security when distributing your new ROM. For extra cool points, wrap it up in a Heimdall TAR.GZ firmware package, then make it a one-click with Heimdall One-Click (not yet finished).
Click to expand...
Click to collapse
Are you saying that I shall keep the original PIT file rather then dumped PIT file from above method? (dd if=/dev/block/bml2 of=/sdcard/odin/pit.pit bs=4096) ?
AdamOutler said:
btw.. to save space in the firmware package, you can omit the cache file, or clear your cache, then adb into your phone in recovery mode and grab it there... The cache file is regenerated when the user selects to clear cache.
Click to expand...
Click to collapse
So I don't need to use cache.rfs (dd if=/dev/block/stl11 of=/sdcard/cache.rfs bs=4096)?
AdamOutler said:
The data partition is the temporary storage area for apps, also some apps default to the data area for storage.... It's also a good place to deploy binaries that you want to execute. It cannot be flashed by Odin protocol though.... It's the "extra" space on the disk left over after the partitioning.
Click to expand...
Click to collapse
Or I should use it? before dumped the cache I shall do factory reset, clear dalvik cache and wipe battery stat?
how to create own Odin files
i done that you wrote here but i still miss Data:
all without DATA
I bricked my phone by flashing the wrong zip in FlashFire. It hung at the ATT logo or powered off after the Samsung logo. The following method allowed me to restore it back to factory I537UCUCNE3 (4.4.2):
Boot into Odin Dowload Mode:
http://forum.xda-developers.com/wiki/Odin_mode#Entering_Odin_mode
Code:
$ unzip SGH-I537UCUCNE3_v4.4.2_ATT_ALL.zip
$ tar -xf AP_I537UCUCNE3_987011_REV06_user_low_ship_MULTI_CERT.tar.md5
$ tar -xf BL_I537UCUCNE3_987011_REV06_user_low_ship_MULTI_CERT.tar.md5
$ tar -xf CP_I537UCUCNE3_987011_REV06_user_low_ship_MULTI_CERT.tar.md5
$ tar -xf CSC_ATT_I537ATTCNE3_987011_REV06_user_low_ship_MULTI_CERT.tar.md5
$ heimdall flash --pit JACTIVELTE_USA_ATT.pit --APNHLOS NON-HLOS.bin --MDM modem.bin --SBL1 sbl1.mbn --SBL2 sbl2.mbn --SBL3 sbl3.mbn --ABOOT aboot.mbn --RPM rpm.mbn --TZ tz.mbn --PERSDATA persdata.img.ext4 --SYSTEM system.img.ext4 --CACHE cache.img.ext4 --BOOT boot.img --RECOVERY recovery.img
zip obtained here:
http://forum.xda-developers.com/showthread.php?t=2629093
heimdall obtained here:
http://ftp.us.debian.org/debian/pool/main/h/heimdall-flash/heimdall-flash_1.4.0-2_amd64.deb
I hope this is able to help others who have locked bootloaders but rooted ROMs on SGS4A and have corrupted their ROMs as a result of a bad flash or similar. ENjoy!
Thanks ... and small typo.
First of all, many thanks for the post. It saved me! Second, I think you have a typo -- I believe JACTIVELTE_USA_ATT_16G.pit should be JACTIVELTE_USA_ATT.pit. Or at least, that's what I had to change to get everything to work.
z_thompsonpa said:
I bricked my phone by flashing the wrong zip in Flash Gordon. It hung at the ATT logo or powered off after the Samsung logo. The following method allowed me to restore it back to factory I537UCUCNE3 (4.4.2):
Boot into Odin Dowload Mode:
http://forum.xda-developers.com/wiki/Odin_mode#Entering_Odin_mode
Code:
$ unzip SGH-I537UCUCNE3_v4.4.2_ATT_ALL.zip
$ tar -xf AP_I537UCUCNE3_987011_REV06_user_low_ship_MULTI_CERT.tar.md5
$ tar -xf BL_I537UCUCNE3_987011_REV06_user_low_ship_MULTI_CERT.tar.md5
$ tar -xf CP_I537UCUCNE3_987011_REV06_user_low_ship_MULTI_CERT.tar.md5
$ tar -xf CSC_ATT_I537ATTCNE3_987011_REV06_user_low_ship_MULTI_CERT.tar.md5
$ heimdall flash --pit JACTIVELTE_USA_ATT_16G.pit --APNHLOS NON-HLOS.bin --MDM modem.bin --SBL1 sbl1.mbn --SBL2 sbl2.mbn --SBL3 sbl3.mbn --ABOOT aboot.mbn --RPM rpm.mbn --TZ tz.mbn --PERSDATA persdata.img.ext4 --SYSTEM system.img.ext4 --CACHE cache.img.ext4 --BOOT boot.img --RECOVERY recovery.img
zip obtained here:
http://forum.xda-developers.com/showthread.php?t=2629093
heimdall obtained here:
http://ftp.us.debian.org/debian/pool/main/h/heimdall-flash/heimdall-flash_1.4.0-2_amd64.deb
I hope this is able to help others who have locked bootloaders but rooted ROMs on SGS4A and have corrupted their ROMs as a result of a bad flash or similar. ENjoy!
Click to expand...
Click to collapse
fbshapiro said:
First of all, many thanks for the post. It saved me! Second, I think you have a typo -- I believe JACTIVELTE_USA_ATT_16G.pit should be JACTIVELTE_USA_ATT.pit. Or at least, that's what I had to change to get everything to work.
Click to expand...
Click to collapse
You are right. I had to revisit these steps recently when I upgraded to OC7.
If reflashing ML2, that rom uses pit file named, JACTIVELTE_USA_ATT_16G.pit
If reflashing NE3, that rom uses pit file named, JACTIVELTE_USA_ATT.pit
When following the Lollipop Root Method mentioned here:
Once the flash is complete and the device reboots into "Download" mode, flash the I537_OC7_Bootloader using Odin's PDA/AP slot.
Click to expand...
Click to collapse
If you want to use Linux just substitute the following for the Odin step mentioned above:
Code:
tar -xf I537_OC7_Bootloader.tar.md5
heimdall flash --SBL2 sbl2.mbn --SBL3 sbl3.mbn --ABOOT aboot.mbn --RPM rpm.mbn --TZ tz.mbn
Hello everyone,
I'm new to modding Android,
I've been playing around with adding root to my stock but I can't seem to find the META-INF folder, I've tried modifying init.bt.rc in the boot image adding these lines, but the phone just gets stuck at the boot screen.
chmod 6755 /system/bin/su
chmod 4755 /system/bin/busybox
Here is what's in the ROM tar.md5 file, it's a completely stock ROM apart from adding su and busybox binaries to system/bin.
boot.img
cache.img
hidden.img
modem.bin
recovery.img
STE_boot1.img
STE_boot2.img
system.img
Any help is appreciated.
hi guys i need your help
my phone S5 G900A AT&T Rom 5.1.1 With no root and can't downgrade or add custom recovery
i need unpack to change my phone language and delete AT&T Programs in lollipop ROM 5.1.1 stock ROM
I made the next steps.. if could clarify the wrongs in those steps .. thank you very much
i am using ubuntu 16.04 LTS
first : i have stock ROM with 4 files AP - BL - CP - CSC
G900AUCU4COI5_CL5869384_QB6398515_REV00_user_low_s hip_MULTI_CERT
i need to extract AP_G900AUCU4COI5_CL5869384_QB6398515_REV00_user_lo w_ship_MULTI_CERT.tar.md5
and edit system.img.ext4
by right click on file system.img.ext4 and open with ARK and extract it
now i have those files boot.img - persist.img.ext4 - recovery.img - system.img.ext4
I've downloaded "img-tools" to change ext4 to img
i take a system.img.ext4 file and but it in img-tools folder in my home and do this commands
right click and chose Open in Terminal in img-tools folder
sudo su
enter password
simg2img system.img.ext4 system.img
makdir system
mount -t ext4 -o loop system.img system/
Click to expand...
Click to collapse
now i have mounted system.. i well open it with this command
sudo nautilus
enter password
Click to expand...
Click to collapse
and delete APK files >
Code:
system/APP/*.APK
system/framework/framework-res.apk
system/framework/twframework-res.apk from the same ROM
and replace it with the same files from other ROM S5 G900H lollipop 5.1.1 with national language
when finished i need to repack files with this command
tune2fs -l system.img | grep "Block size"
Block size: 4096
tune2fs -l system.img | grep "Block count"
Block count: 656384
ech $((4096 * 656384))
2688548864
make_ext4fs -s -l 2688548864 -a system system.img.ext4 system
Click to expand...
Click to collapse
now i have my edited sysytem.img.ext4
i need to but it back in the same folder with the next files to repack it in "tar.md5" file to flash it
Code:
boot.img
persist.img.ext4
recovery.img
this commands well do it
tar -H ustar -c boot.img persist.img.ext4 recovery.img system.img.ext4 > my_final_packeg.tar
md5sum -t my_final_packeg.tar >> my_final_packeg.tar
mv my_final_packeg.tar my_final_packeg.tar.md5
Click to expand...
Click to collapse
finally i have the last file to flash it ((my_final_packeg.tar.md5))
the problem is when i flash it by odin3 v3.11 i have this massage
<ID:0/003> Added!!
<ID:0/003> Odin engine v(ID:3.1101)..
<ID:0/003> File analysis..
<ID:0/003> SetupConnection..
<ID:0/003> Initialzation..
<ID:0/003> Get PIT for mapping..
<ID:0/003> Firmware update start..
<ID:0/003> SingleDownload.
<ID:0/003> boot.img
<ID:0/003> NAND Write Start!!
<ID:0/003> persist.img.ext4
<ID:0/003> recovery.img
<ID:0/003> system.img.ext4
<ID:0/003> FAIL (auth)!
<ID:0/003>
<ID:0/003> Complete(Write) operation failed.
<OSM> All threads completed. (succeed 0 / failed 1)
<ID:0/003> Removed!!
Click to expand...
Click to collapse
i need your help and Sorry about my bad language