Pages

Tuesday, July 5, 2011

[GUIDE] How to make an Odin ROM

This is just a small guide I want to share with anyone who's interested in the commands I personally use. Feel free to correct me or give better commands / instructions.

This needs a UNIX compatible OS - like Linux or Mac OS X.
On Windows, you can use "Cygwin".

Use the dd (datadump) command to make the .rfs files
Of course you need to connect your phone via USB and have ADB prepared on your computer.

# Get Root access first

su

# Do this first to mount the /system R/W

(thanks to scheichuwe for the simplified command)

mount -o remount,rw /dev/block/stl9 /system
# Dump the needed data / partitions to your /sdcard

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
# Make the tar ball

tar -H ustar -c factoryfs.rfs cache.rfs modem.bin zImage > darky.tar
# MD5 it for a security check

md5sum –t darky.tar >> darky.tar
# Rename the tar file

mv darky.tar darky.tar.md5
Optional:
Make your own pit file
The pit file is used to set the partition layout (Partition Information Table).

# Dump the pit
dd if=/dev/block/bml2 of=/sdcard/darky.pit bs=4096
 thanks to Darkyy
Donate to Darkyy

2 comments:

  1. i got an error when creating tar
    tar -H ustar -c factoryfs.rfs cache.rfs modem.bin zImage > darky.tar
    $ tar -H ustar -c factoryfs.rfs recovery.bin zImage > PDA_myownodin.tar
    tar -H ustar -c factoryfs.rfs recovery.bin zImage > PDA_myownodin.tar
    tar: invalid option -- 'H'
    BusyBox v1.19.0.git.adrynalyne (2010-12-21 22:03:30 MST) multi-call binary.

    Usage: tar -[cxtzjamvO] [-X FILE] [-f TARFILE] [-C DIR] [FILE]...

    Create, extract, or list files from a tar file

    Operation:
    c Create
    x Extract
    t List
    Options:
    f Name of TARFILE ('-' for stdin/out)
    C Change to DIR before operation
    v Verbose
    z (De)compress using gzip
    j (De)compress using bzip2
    a (De)compress using lzma
    O Extract to stdout
    h Follow symlinks
    m Don't restore mtime
    exclude File to exclude
    X File with names to exclude
    T File with names to include

    ReplyDelete
  2. use busybox for tar command, like so:

    busybox tar -c factoryfs.rfs cache.rfs modem.bin zImage > darky.tar

    ReplyDelete