Firmware sichern und z.B. via Odin flashen

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:

Code:
dd if=/dev/block/stl9 of=/sdcard/system bs=4096
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:

  1. boot into recovery
  2. copy busybox to / or /sbin
  3. unmount /data, /system, and /cache
  4. mount the sdcard
  5. busybox dd the flash block devices out to the sdcard
I hope that isn't too much. If you need help with the exact commands I can get those to you.

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.
confused.gif


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:
  1. Run the following command to dump the recovery partition:
    Code:
    # dd if=/dev/block/bml6 of=/sdcard/recovery bs=4096
  2. Retrieve the dumped file from the SD Card.
  3. Make a copy for backup purposes! We will be editing these.
  4. Create a working folder for each of the dumped kernel and/or recovery images and move them there.
The commands that follow are from Cygwin:
  1. Split the images in each working folder into the binary and ramdisk.
  2. Code:

  1. $ head -c 1785856 kernel > krnl.bin
$ tail -c +1785857 kernel > rd.cgz
---------------------------------------------------------

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:
Man kann den Inhalt der bml7 in eine .tar-Datei packen und diese als PDA mit Odin flashen.
use adb and be root

su
dd if=/dev/block/bml7 of=/sdcard/boot.img
tar cvf /sdcard/kernel-backup.tar /sdcard/boot.img

type "BML7", not "BM17" but without capital letter i.e. "bml7"

After this you'll have a file called kernel-backup.tar in your SDcard. Save it and, in case of softbricking, put your phone in download mode and flash it with Odin (PDA field).

email.filtering schrieb:
Hätte man die wirklich interessanten Partitionen richtig über die ADB-Shell gesichert, könnte man das Ergebnis nicht nur per Odin flashen, sondern selbstverständlich auch weiterverarbeiten. :(
Der ClockworkMod wird ja bereits fürs SGY lauffähig gemacht:
[CWM][WIP] Clockworkmod Recovery porting - xda-developers
 
Zuletzt bearbeitet von einem Moderator:
Alles gut und schön mai77, aber ein ClockworkMod-Backup kannst Du nur dann nutzen, wenn auf der Empfänger den ClockworkMod nutzt. So ganz optimal ist da natürlich nicht.

An einem leckeren Script zum Sichern der wichtigen Partitionen zwecks Umarbeitung in ein Odin-taugliches "One Package" arbeite ich ja schon. Allerdings sollte man vorab noch klären, welche Informationen die STL6 beherbergt. Ich konnte das bisher leider noch nicht herausfinden. Meine bisherigen Erkenntnisse habe ich in einer netten, englischsprachigen Tabelle erfasst:
Code:
Samsung GT-S5360 - Partition-table


cat /proc/partitions

major minor #blocks name:
137    0   513024 bml0/c
137    1      256 bml1      0,25 MiB
137    2     2048 bml2      2,00 MiB
137    3     2048 bml3      2,00 MiB
137    4      256 bml4      0,25 MiB
137    5    12800 bml5     12,50 MiB   for amss (~phone)
137    6     5120 bml6      5,00 MiB   for ???, but for sure NOT for the kernel, maybe Sbl?
137    7     5120 bml7      5,00 MiB   for bootimage (kernel)
137    8     5120 bml8      5,00 MiB   for recovery
137    9   235520 bml9    230,00 MiB   for system
137   10    40960 bml10    40,00 MiB   for cache
137   11   201984 bml11   197,75 MiB   for (user)data
137   12      256 bml12     0,25 MiB
137   13      256 bml13     0,25 MiB
137   14      256 bml14     0,25 MiB
137   15     1024 bml15     1,00 MiB

138    6     1280 stl6      1,25 MiB   mounted as ???
138    9   227840 stl9    222,50 MiB   mounted as system
138   10    36864 stl10    36,00 MiB   mounted as cache
138   11   194816 stl11   190,25 MiB   mounted as (user)data

179    0   xxxxxx mmcblk0     xxxx,xx MiB   multi media card (raw)
179    1   xxxxxx mmcblk0p1   xxxx,xx MiB   multi media card (partition 1; usually FAT32)
179    2   xxxxxx mmcblk0p2   xxxx,xx MiB   multi media card (partition 2; usually EXT2)


BML = Block Management Layer
STL = Sector Translation Layer
MMC = Multi Media Card
 
Zuletzt bearbeitet von einem Moderator:
Ich habe mit dem CWM 5.0.2.6 (CWM = ClockworkMod) erfolgreich restored, nachdem ein Softbricking eintrat. :thumbup:

Dies ist der CWM fürs SGY, ein erweitertes Recovery-Menü. Vorerst nur temporär (CWM ersetzt bei anderen Modellen das Recovery-Menü permanent), es muss also über das originale Recovery-Menü aufgerufen werden.

Jedenfalls funktionieren Backup und Restore schon ganz gut damit, gegebenenfalls sind einige andere Funktionen noch nicht perfekt. CWM ist auch über den Menüpunkt "install zip from SD" das Standardtool um alternative OS-Versionen einzuspielen.

Der "Nachteil" von CWM mag sein, dass "Odin allein nicht ausreicht". Jedoch ist CWM nur eine einzelne .zip-Datei, die man auf die Speicherkarte kopiert und schon kann man BAK / RESTORE machen.

Das setzt voraus, dass das Gerät noch bootet, und nicht softgebrickt ist. Dies ist bei ODIN nicht erforderlich. Insofern wäre ein Odin-mäßiges Restore schon etwas besser.
 
Zuletzt bearbeitet von einem Moderator:
Wer derzeit nach einer per Odin flashbaren Betriebssystemversion von Samsung sucht, kann diese Suche gleich wieder einstellen, weil entsprechend dem bisherigen Wissensstand (unter anderem aus diesem Thread) leider erst eine einzige(!) europäische Version in tatsächlich flashbarem Zustand im Umlauf ist. Zu allem Unglück handelt es sich dabei leider auch noch um eine der ersten und somit fehlerbehafteten 2.3er-Versionen.

Es handelt sich dabei um die XXKI6, eine 2.3.5er, fürs GT-S5360 vom 11. September 2011 mit der multi-CSC OXXKI6 (die also auch DBT unterstützt) => Download


Alle mir bekannten Downloadlinks von bzw. über SamPro.pl führen ins Leere, und bei SamMobile.com sind zwar allerhand Versionen mit teilweise extrem fehlerhaften Beschreibungen verlinkt, doch keine der dort angeführten Dateien lässt sich auch flashen. Spart Euch also den Traffic und den Zeitaufwand; es lohnt sich nicht!

Ich selbst habe hier noch ein jungfräuliches S5360 liegen, das von Haus aus mit der XXKI9 vom 21. September 2011, also einer ebenfalls schon relativ alten Version und immer noch einer 2.3.5er, ausgestattet ist, das demnächst für die Erstellung eines per Odin flashbaren Backups herhalten muss. Habt bitte noch etwas Geduld; ganz so einfach ist es dann doch nicht, eine saubere Version zu erstellen, aber es ist möglich!
 

Ähnliche Themen

N
  • Gesperrt
  • Ninimiel22
Antworten
2
Aufrufe
1.634
magicw
magicw
TheChris80
  • TheChris80
Antworten
6
Aufrufe
2.410
ConNerVos
C
E
  • Gesperrt
  • Angepinnt
  • email.filtering
Antworten
0
Aufrufe
5.139
email.filtering
E
Zurück
Oben Unten