[GUIDE][HOW-TO] Create custom ODIN packages

das7982

Senior Member
Feb 28, 2012
250
311
0
Broken Arrow
Below is a guide on how to Create your own custom ODIN packages.

You will need:

-Terminal emulator app
-linux computer or Cygwin for windows or shell command line
-ODIN program
-create folder on your external sd card named "backup"
-if you want backup to go on your internal SD card you will change the code line to mnt/sdcard/backup/.........

HOW TO:

- In the terminal emulator app on your phone enter the code line for the item you want a dump of and this code will make an image on your sdcard.

**NOTE** performing a system dump will take 5 minutes to execute as the system file is in the 1 to 1.5 gig range. BE PATIENT!!!

- Once you have the image files that you need then proceed to the shell command line below to package your ODIN bundle.

-You will want to copy all of these image files over to your computer for easier bundling from your command line.

SYSTEM
Code:
dd if=/dev/block/mmcblk0p14 of=/mnt/extSdCard/backup/mmcblk0p14_system.img bs=4096
RECOVERY
Code:
dd if=/dev/block/mmcblk0p18 of=/mnt/extSdCard/backup/mmcblk0p18_recovery.img bs=4096
USER DATA
Code:
dd if=/dev/block/mmcblk0p15 of=/mnt/extSdCard/backup/mmcblk0p15_userdata.img bs=4096
CDMA MODEM
Code:
dd if=/dev/block/mmcblk0p1 of=/mnt/extSdCard/backup/mmcblk0p1_modem.img bs=4096
LTE_MODEM
Code:
dd if=/dev/block/mmcblk0p12 of=/mnt/extSdCard/backup/mmcblk0p12_modemst1.img bs=4096
LTE_MODEM2
Code:
dd if=/dev/block/mmcblk0p13 of=/mnt/extSdCard/backup/mmcblk0p13_modemst2.img bs=4096
CACHE
Code:
dd if=/dev/block/mmcblk0p17 of=/mnt/extSdCard/backup/mmcblk0p17_cache.img bs=4096
BOOT
Code:
dd if=/dev/block/mmcblk0p7 of=/mnt/extSdCard/backup/mmcblk0p7_boot.img bs=4096

How to package into a flashable ODIN package:

From a terminal command line:

Code:
tar -H ustar -c "INSERT_.IMG FILE HERE" mmcblk0p14_system.img > package_name.tar
md5sum -t package_name.tar >> package_name.tar
mv package_name.tar package_name.tar.md5
Add any combination of image files you want after the "-c" and before the ">"

Make sure each .IMG file has a space between the next one.

DISCLAIMERS

1. I am not responsible if you brick your phone using these system dumps.

2. Do not monkey around with BOOT or MODEMS unless you are really sure what you are doing

3. Always make sure you package your ODIN bundles with a .Md5 checksum to prevent corrupted data dumps from screwing your phone up.

4. Stay away from flashing .tar only files as these will flash no matter what and have no error checking

5. If you plan to package ODIN bundles for distribution of your ROM, only package SYSTEM, RECOVERY, etc etc. Do not package USER DATA or CACHE for distrobution as this could contain your personal information. Only package CACHE and USER DATA if this is a personal backup or you know what you are doing.

6. Flashing ODIN packages without a samsung signature will increase your flash counter. The refurbishing companies that work with AT&T, Verizon, and T-mobile all use the same company in coppell TX and they do not check for the flash counter. Only Samsung does. Most phones are disassembled before they even go to Samsung and once the phone makes it there they bill the carrier back for the phone and not the customer. (Trust me, I run a warranty center for one of the big 4 carriers) ;) This comes directly from senior personnell from Samsung.
 
Last edited:

Jiggity Janx

Senior Member
Feb 19, 2010
1,397
286
0
So I can basically capture everything needed to odin my phone back to whatever point I am at when I dump all the files?!? Basically a way to create a restore point that I can flash from my pc. Sounds like a winner to me.
 
  • Like
Reactions: das7982

tprouty

Senior Member
Dec 10, 2010
110
25
0
this is awesome, Thanks for the write up!

I'm new to Samsung, when I want to flash lets say user data.... am I still selecting "PDA" from the Files section? Like I did for the root access? Or does "PDA" do the system?
 
  • Like
Reactions: das7982

ChromWolf

Senior Member
Mar 8, 2011
160
54
0
Cedar Rapids, IA
A couple of questions.

1. Can these Odin packages be used in Heimdall as well? (I assume so since they're both pretty straight forward, but ya never know...)

2. How well, if at all, do these instructions translate over to other devices?
 

das7982

Senior Member
Feb 28, 2012
250
311
0
Broken Arrow
A couple of questions.

1. Can these Odin packages be used in Heimdall as well? (I assume so since they're both pretty straight forward, but ya never know...)

2. How well, if at all, do these instructions translate over to other devices?
Yes in heimdall.

Translates perfectly except each phone has different partition block locations

Sent from my SCH-I535 using xda app-developers app
 
  • Like
Reactions: pterry30

snoop5

Senior Member
Oct 13, 2010
347
87
0
Stokesdale, NC
Yes in heimdall.

Translates perfectly except each phone has different partition block locations

Sent from my SCH-I535 using xda app-developers app
thanks for the write up great read, but i have a problem im stuck at the 4g lte screen and nothing is working i odin to stock then to stock rooted and back to stock but still stuck at the screen can anyone help please
 

FlyingPoo

Senior Member
Feb 11, 2011
81
27
48
Huntsville
www.biostormproductions.com
Reference Partitions

dunno if its posted anywhere, but if someone needs it for reference:
Code:
major minor  #blocks  name

 179        0   15388672 mmcblk0
 179        1      61440 mmcblk0p1
 179        2        128 mmcblk0p2
 179        3        256 mmcblk0p3
 179        4        512 mmcblk0p4
 179        5       2048 mmcblk0p5
 179        6        512 mmcblk0p6
 179        7      10240 mmcblk0p7
 179        8        512 mmcblk0p8
 179        9        512 mmcblk0p9
 179       10      10240 mmcblk0p10
 179       11      13952 mmcblk0p11
 179       12       3072 mmcblk0p12
 179       13       3072 mmcblk0p13
 179       14    1536000 mmcblk0p14
 179       15   12832768 mmcblk0p15
 179       16       8192 mmcblk0p16
 179       17     860160 mmcblk0p17
 179       18      10240 mmcblk0p18
 179       19      10240 mmcblk0p19
 179       20       6144 mmcblk0p20
 179       21       3072 mmcblk0p21
 179       22          8 mmcblk0p22
 179       23       5120 mmcblk0p23
 179       64       2048 mmcblk0boot1
 179       32       2048 mmcblk0boot0
 

nosympathy

Senior Member
Dec 19, 2010
2,769
1,257
0
Cincinnati
hmmm stuck.

so I pulled just system and boot, and using cygwin turned them into a tar package and added the md5.

Tried flashing through Odin and get a unsupported dev_type error on the phone.

is their a specific order to add these .img files to the .tar?
 

das7982

Senior Member
Feb 28, 2012
250
311
0
Broken Arrow
hmmm stuck.

so I pulled just system and boot, and using cygwin turned them into a tar package and added the md5.

Tried flashing through Odin and get a unsupported dev_type error on the phone.

is their a specific order to add these .img files to the .tar?
Don't flash boot.img as the locked bootloader will throw back errors. You will need to reflash the stock Odin image. Also, before reflashing the stock image, try booting into recovery and factory reset

Sent from my SCH-I535 using Tapatalk 2
 
  • Like
Reactions: nosympathy

nosympathy

Senior Member
Dec 19, 2010
2,769
1,257
0
Cincinnati
Don't flash boot.img as the locked bootloader will throw back errors. You will need to reflash the stock Odin image. Also, before reflashing the stock image, try booting into recovery and factory reset

Sent from my SCH-I535 using Tapatalk 2
i gotcha, so even though it is a stock boot.img from samsung I cannot flash it in a custom package?

I am just trying to get my rom into an odin image for people that wanted it.