[Galaxy Ace S5830 General] Beliaz:
We have bought GT-S5830 to all our employees. Emediatly I rooted the device and tried out different ROMs. I didn't find one that I was satisfied with, and now I want to flash back the stock ROM. It came with Android 2.3.3 with these "packages:

PDA: S5830XWKPU, PHONE: S5830XWKP7, CSC: S5830OXFKP3

I haven't found this stock ROM anywhere (and no stock 2.3.3 ROM I tried had support for Swedish keyboard), so I wonder how I could use one of the "untouched" ones and make a backup to my phone.

This is what I've done so far... Took our secretarys phone and did a complete wipe (Settings -> Privacy -> Factory data reset -> Checked Format SD Card and Reset phone -> Erase everything). Rooted with SuperOneClickv2.2-ShortFuse. Opened a adb shell

$ su
# mount
mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
/dev/stl14 /cache rfs rw,nosuid,nodev,relatime,vfat,llw,check=no,gid/uid/rwx,iocharset=utf8 0 0
/dev/stl13 /data rfs rw,nosuid,nodev,relatime,vfat,llw,check=no,gid/uid/rwx,iocharset=utf8 0 0
/dev/stl12 /system rfs ro,relatime,vfat,log_off,check=no,gid/uid/rwx,iocharset=utf8 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/vold/179:1 /mnt/sdcard vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:1 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
tmpfs /mnt/sdcard/.android_secure tmpfs ro,relatime,size=0k,mode=000 0 0

I then wanted to remove the Superuser app and su from the phone to erase evidence if we need to use our warranty.

# find / -name *uper*
find / -name *uper*
/system/app/Superuser.apk
/data/dalvik-cache/system@app@Superuser.apk@classes.dex
# find / -name su
find / -name su
/system/xbin/su
# mount -o remount,rw /dev/stl12 /system
mount -o remount,rw /dev/stl12 /system
# rm /system/app/Superuser.apk
rm /system/app/Superuser.apk
# rm /data/dalvik-cache/system@app@Superuser.apk@classes.dex
rm /data/dalvik-cache/system@app@Superuser.apk@classes.dex
# rm /system/xbin/su
rm /system/xbin/su
# mount -o remount,ro /dev/stl12 /system
mount -o remount,ro /dev/stl12 /system

Q1. Does this remove all evidence of breaking the warranty, or does SuperOneClickv2.2 add something more I have left out?

I found (gailly.net / android / android-tips.html) <- here which files should be in each Odin-package.

BOOT: arm11boot mibib oemsbl qcsbl

PHONE: amss

PDA: boot.img recovery.img data.rfs system.rfs

CSC: csc.rfs

I found (kaskus.us / showthread.php?t=9912955&page=252) <- here how to dump the files for the Odin PDA-package.

# dd if=/dev/block/bml8 of=/sdcard/boot.img bs=4096
dd if=/dev/block/bml8 of=/sdcard/boot.img bs=4096
2048+0 records in
2048+0 records out
8388608 bytes transferred in 0.785 secs (10686124 bytes/sec)
# dd if=/dev/block/bml9 of=/sdcard/recovery.img bs=4096
dd if=/dev/block/bml9 of=/sdcard/recovery.img bs=4096
2048+0 records in
2048+0 records out
8388608 bytes transferred in 0.768 secs (10922666 bytes/sec)
# dd if=/dev/block/stl12 of=/sdcard/system.rfs bs=4096
dd if=/dev/block/stl12 of=/sdcard/system.rfs bs=4096
53696+0 records in
53696+0 records out
219938816 bytes transferred in 61.234 secs (3591776 bytes/sec)
# dd if=/dev/block/stl14 of=/sdcard/data.rfs bs=4096
dd if=/dev/block/stl14 of=/sdcard/data.rfs bs=4096
6464+0 records in
6464+0 records out
26476544 bytes transferred in 1.621 secs (16333463 bytes/sec)

Q2. Is the partitiontable ROM-specific, as the reffered webpage claimed that the data-partition is /dev/block/stl14 while the mount command showed that it pointed to /dev/stl13?

Q3. How do I dump the rest of the files nedded for a complete Odin-restore (arm11boot, mibib, oemsbl, qcsbl, amss, csc.rfs)?

Then I guess I just have to compress the files...

tar -H ustar -c arm11boot mibib oemsbl qcsbl > BOOT_S5830XWKPU_CL484646_REV1.tar
md5sum -t BOOT_S5830XWKPU_CL484646_REV1.tar >> BOOT_S5830XWKPU_CL484646_REV1.tar
mv BOOT_S5830XWKPU_CL484646_REV1.tar BOOT_S5830XWKPU_CL484646_REV1.tar.md5

tar -H ustar -c amss > PHONE_S5830XWKP7_CL484646_REV1.tar
md5sum -t PHONE_S5830XWKP7_CL484646_REV1.tar >> PHONE_S5830XWKP7_CL484646_REV1.tar
mv PHONE_S5830XWKP7_CL484646_REV1.tar PHONE_S5830XWKP7_CL484646_REV1.tar.md5

tar -H ustar -c boot.img recovery.img data.rfs system.rfs > PDA_S5830XWKPU_CL484646_REV1.tar
md5sum -t PDA_S5830XWKPU_CL484646_REV1.tar >> PDA_S5830XWKPU_CL484646_REV1.tar
mv PDA_S5830XWKPU_CL484646_REV1.tar PDA_S5830XWKPU_CL484646_REV1.tar.md5

tar -H ustar -c csc.rfs > CSC_S5830OXFKP3_CL484646_REV1.tar
md5sum -t CSC_S5830OXFKP3_CL484646_REV1.tar >> CSC_S5830OXFKP3_CL484646_REV1.tar
mv CSC_S5830OXFKP3_CL484646_REV1.tar CSC_S5830OXFKP3_CL484646_REV1.tar.md5