M
mai77
Fortgeschrittenes Mitglied
- 15
creating-custom-roms-backups-odin
How to make custom Odin images for GT-S5360
First, we need to get some Odin images going. This is BEST done with somebody who has a stock, but rooted, Samsung phone
This has been adapted from here:
Creating Custom ROMs/Backups for Odin - Android Forums
First, you need to root, via "run update.zip on SD", or one of the "one click methods", or z4root.
Then, you must setup adb, if you haven't already. Alternatively, you could be a masochist and use the terminal on the device, downloaded from the market.
as root (#):
To backup kernel partition:
dd if=/dev/block/bml7 of=/sdcard/kernel bs=4096
To backup recovery partition (probably the same as the kernel):
dd if=/dev/block/bml8 of=/sdcard/kernel bs=4096
To backup system:
Backup the kernel, system, and recovery images from your sdcard to your computer. Make backups!
Rename kernel to: zImage
Rename recovery to recovery.bin
Rename system to factoryfs.rfs
The next part requires linux, OS X, or cygwin.
Cygwin
If you are using heimdall, the above images are ready for flashing.
If using Odin, we must still package them.
$ tar -H ustar -c image_1 [image_2 ...] > your_odin_package.tar
If you want an all in one package, put each image name in. if not, make one image per tar file.
Example: tar -H ustar -c zImage > zImage.tar
This would give us a zImage.tar file. Now we will turn it into a tar.md5 file, so that Odin can make sure its not corrupt before flashing.
$ md5sum -t your_odin_package.tar >> your_odin_package.tar $ mv your_odin_package.tar your_odin_package.tar.md5
using the above example, your final file would be zImage.tar.md5.
This gets used with Odin3 v1.85, in the PDA section. You need to install Samsung usb drivers prior to, of course, and the phone must be in download mode.
ALWAYS USE THE PDA SECTION IN ODIN.
do not mess around too much with the bootloader.
If you're using Apple Mac OS, the commands are a bit different.
Instead of:
tar -H ustar -c image_1 [image_2 ...] > your_odin_package.tar
tar --format ustar -c image_1 [image_2 ...] > your_odin_package.tar
Instead of:
md5sum -t your_odin_package.tar >> your_odin_package.tar
md5 -r your_odin_package.tar >> your_odin_package.tar
When you make the dump you are reading out from an active device. Basically you don't want the ROM's state to change while the dump is underway.
Normally /system is read only (not so when rooted but still minimal activity here). /data will be pretty busy, though.
The best way to prevent this would be to make the ROM dump while in the simplest environment possible. You could try copying busybox into / so its loaded into the ramdisk, unmounting all the flash file systems, mount the sdcard, and do the dump then. That would be pretty thorough.
Laid out that would be:
This means I better make "Dumping your ROMs rev2" before people start making corrupt backups...
I have successfully rebuilt the images from my phone and downloaded them via Odin One Package. My phone boots back up but there are a few apps giving me issues. Some FC and others appear to be there but aren't installed or something. I'll have to try a few things to see if I can get them back.
I built the package using the kernel and recovery files that I extracted and then rebuilt. I also added my untouched userdata and system files that I dumped along with the others. Maybe I shouldn't have added these two and just built the package from the kernel and recovery.
Anyway I was able to follow along with the instructions but a few things were no very clear.
1. Do I need to do all of the dumps from recovery mode or should just the 'system' ROM be dumped in recovery?
2. At first I didn't realize that the instructions jumped from adb dumps to working in Cygwin/linux ie:
---------------------------------------------------------
3. I guessed and changed directories inbetween these commands:
ran from the /initramfs directory
$ find | cpio -H newc -R 0.0 -oa | gzip -cn1 > ../rd.cgz
then cd ..
$ cat rd.cgz >> krnl.bin
How to make custom Odin images for GT-S5360
First, we need to get some Odin images going. This is BEST done with somebody who has a stock, but rooted, Samsung phone
This has been adapted from here:
Creating Custom ROMs/Backups for Odin - Android Forums
First, you need to root, via "run update.zip on SD", or one of the "one click methods", or z4root.
Then, you must setup adb, if you haven't already. Alternatively, you could be a masochist and use the terminal on the device, downloaded from the market.
as root (#):
To backup kernel partition:
dd if=/dev/block/bml7 of=/sdcard/kernel bs=4096
To backup recovery partition (probably the same as the kernel):
dd if=/dev/block/bml8 of=/sdcard/kernel bs=4096
To backup system:
Code:
dd if=/dev/block/stl9 of=/sdcard/system bs=4096
Rename kernel to: zImage
Rename recovery to recovery.bin
Rename system to factoryfs.rfs
The next part requires linux, OS X, or cygwin.
Cygwin
If you are using heimdall, the above images are ready for flashing.
If using Odin, we must still package them.
$ tar -H ustar -c image_1 [image_2 ...] > your_odin_package.tar
If you want an all in one package, put each image name in. if not, make one image per tar file.
Example: tar -H ustar -c zImage > zImage.tar
This would give us a zImage.tar file. Now we will turn it into a tar.md5 file, so that Odin can make sure its not corrupt before flashing.
$ md5sum -t your_odin_package.tar >> your_odin_package.tar $ mv your_odin_package.tar your_odin_package.tar.md5
using the above example, your final file would be zImage.tar.md5.
This gets used with Odin3 v1.85, in the PDA section. You need to install Samsung usb drivers prior to, of course, and the phone must be in download mode.
ALWAYS USE THE PDA SECTION IN ODIN.
do not mess around too much with the bootloader.
If you're using Apple Mac OS, the commands are a bit different.
Instead of:
tar -H ustar -c image_1 [image_2 ...] > your_odin_package.tar
tar --format ustar -c image_1 [image_2 ...] > your_odin_package.tar
Instead of:
md5sum -t your_odin_package.tar >> your_odin_package.tar
md5 -r your_odin_package.tar >> your_odin_package.tar
When you make the dump you are reading out from an active device. Basically you don't want the ROM's state to change while the dump is underway.
Normally /system is read only (not so when rooted but still minimal activity here). /data will be pretty busy, though.
The best way to prevent this would be to make the ROM dump while in the simplest environment possible. You could try copying busybox into / so its loaded into the ramdisk, unmounting all the flash file systems, mount the sdcard, and do the dump then. That would be pretty thorough.
Laid out that would be:
- boot into recovery
- copy busybox to / or /sbin
- unmount /data, /system, and /cache
- mount the sdcard
- busybox dd the flash block devices out to the sdcard
This means I better make "Dumping your ROMs rev2" before people start making corrupt backups...
I have successfully rebuilt the images from my phone and downloaded them via Odin One Package. My phone boots back up but there are a few apps giving me issues. Some FC and others appear to be there but aren't installed or something. I'll have to try a few things to see if I can get them back.
I built the package using the kernel and recovery files that I extracted and then rebuilt. I also added my untouched userdata and system files that I dumped along with the others. Maybe I shouldn't have added these two and just built the package from the kernel and recovery.
Anyway I was able to follow along with the instructions but a few things were no very clear.
1. Do I need to do all of the dumps from recovery mode or should just the 'system' ROM be dumped in recovery?
2. At first I didn't realize that the instructions jumped from adb dumps to working in Cygwin/linux ie:
- Run the following command to dump the recovery partition:
Code:
# dd if=/dev/block/bml6 of=/sdcard/recovery bs=4096
- Retrieve the dumped file from the SD Card.
- Make a copy for backup purposes! We will be editing these.
- Create a working folder for each of the dumped kernel and/or recovery images and move them there.
- Split the images in each working folder into the binary and ramdisk.
- Code:
- $ head -c 1785856 kernel > krnl.bin
---------------------------------------------------------
3. I guessed and changed directories inbetween these commands:
ran from the /initramfs directory
$ find | cpio -H newc -R 0.0 -oa | gzip -cn1 > ../rd.cgz
then cd ..
$ cat rd.cgz >> krnl.bin
Zuletzt bearbeitet von einem Moderator: