[Q] How to Backup and Restore Original Shipped Firmware? For warranty. - Galaxy S II Q&A, Help & Troubleshooting

Is there a way to Backup and Restore Original Shipped Firmware? Is we have Norton Ghost for Android then it will be good...
The purpose is to claim the phone for warranty, after flashed with customized firmware. The phone's hardware might go fault.

Well as a previous sgs user I know that the best way is to have root on ur device then u can access cwm to create a complete image (backup) of ur current os.
I don't know if there is a better way of doing so
Cheers
Sent from my GT-I9100 using Tapatalk

A lot of branded roms are posted in the Branded rom post in dev section .
jje

For an own backup, exactely as you bought the phone, here's what I did:
- flash an insecure kernel (stock kernels are available for all FWs, so restoring original stock kernel is easy)
- apply root
- dump all important partitions:
Code:
dd if=/dev/block/mmcblk0p1 of=/sdcard/p1-EFS.img bs=4096
dd if=/dev/block/mmcblk0p4 of=/sdcard/p4-PARAM.img bs=4096
dd if=/dev/block/mmcblk0p5 of=/sdcard/p5-KERNEL.img bs=4096
dd if=/dev/block/mmcblk0p8 of=/sdcard/p8-MODEM.img bs=4096
dd if=/dev/block/mmcblk0p9 of=/sdcard/p9-FACTORYFS.img bs=4096
dd if=/dev/block/mmcblk0p12 of=/sdcard/p12-HIDDEN.img bs=4096
As a more easy/convinient alternative you could flash a kernel with a custom recovery (like CF-Root, containing CWM recovery) and use the Nandroid backup feature from the recovery menu - but those root-kernels usually perform a few more changes on the /system partition, so I did my "initial stock backup" just using an insecure kernel and root applied.

HellcatDroid said:
For an own backup, exactely as you bought the phone, here's what I did:
- flash an insecure kernel (stock kernels are available for all FWs, so restoring original stock kernel is easy)
- apply root
- dump all important partitions:
Code:
dd if=/dev/block/mmcblk0p1 of=/sdcard/p1-EFS.img bs=4096
dd if=/dev/block/mmcblk0p4 of=/sdcard/p4-PARAM.img bs=4096
dd if=/dev/block/mmcblk0p5 of=/sdcard/p5-KERNEL.img bs=4096
dd if=/dev/block/mmcblk0p8 of=/sdcard/p8-MODEM.img bs=4096
dd if=/dev/block/mmcblk0p9 of=/sdcard/p9-FACTORYFS.img bs=4096
dd if=/dev/block/mmcblk0p12 of=/sdcard/p12-HIDDEN.img bs=4096
As a more easy/convinient alternative you could flash a kernel with a custom recovery (like CF-Root, containing CWM recovery) and use the Nandroid backup feature from the recovery menu - but those root-kernels usually perform a few more changes on the /system partition, so I did my "initial stock backup" just using an insecure kernel and root applied.
Click to expand...
Click to collapse
Thanks for the advice! I have a question regarding Nandroid and CWM. Restoring the image made with Nandroid is easy enough, but won't the carrier/Samsung detect that a custom recovery (CWM) has been installed and consider it voiding the warranty regardless of the stock ROM being on the device?
Thanks in advance.

techjunkieza said:
Restoring the image made with Nandroid is easy enough, but won't the carrier/Samsung detect that a custom recovery (CWM) has been installed and consider it voiding the warranty regardless of the stock ROM being on the device?
Click to expand...
Click to collapse
After restoring a stock backup via a custom recovery/nandroid, just flash a stock kernel afterwards with Odin as well.
That will restore kernel and the recovery back to stock too.
All that is then left from a rooting is two files and a few symlinks hidden in /system/xbin - unlikely they'll go and check that IMO.

HellcatDroid said:
After restoring a stock backup via a custom recovery/nandroid, just flash a stock kernel afterwards with Odin as well.
That will restore kernel and the recovery back to stock too.
All that is then left from a rooting is two files and a few symlinks hidden in /system/xbin - unlikely they'll go and check that IMO.
Click to expand...
Click to collapse
Thanks dude. I was wondering how it is done. I did not know that flashing a stock kernel will make the recovery mode default as well. I'm new to Android so please forgive the noob questions. Surely there should be a list of files in a thread somewhere which indicates which files are modified when rooting the phone?
So I take it by restoring the original ROM, flashing a stock kernel (if you have a custom recovery mode or root access), removing the files and symlinks and resetting the ROM counter that the phone will be "stock" again?

techjunkieza said:
Thanks dude. I was wondering how it is done. I did not know that flashing a stock kernel will make the recovery mode default as well. I'm new to Android so please forgive the noob questions.
Click to expand...
Click to collapse
He, I had to learn all this myself recently, the SGS2 is my first Android device as well
For the SGS2 the recovery mode is part of the main kernel (partition), so flashing a stock kernel replaces that as well.
AFAIK this a unique Samy thing, on the other Android devices the recovery actually resides on its own partition.
techjunkieza said:
Surely there should be a list of files in a thread somewhere which indicates which files are modified when rooting the phone?
So I take it by restoring the original ROM, flashing a stock kernel (if you have a custom recovery mode or root access), removing the files and symlinks and resetting the ROM counter that the phone will be "stock" again?
Click to expand...
Click to collapse
Depending on how you rooted it's just /system/xbin/su that gets replaced and /system/xbin/busybox that gets added.
Then all the symlinks busybox installs - not sure if busybox has an "uninstall" option to remove them, if not just dump all symlinks in /system/xbin, on stock FWs there are none in this dir.

HellcatDroid said:
He, I had to learn all this myself recently, the SGS2 is my first Android device as well
For the SGS2 the recovery mode is part of the main kernel (partition), so flashing a stock kernel replaces that as well.
AFAIK this a unique Samy thing, on the other Android devices the recovery actually resides on its own partition.
Click to expand...
Click to collapse
Thanks a lot for the advice. I see many people asking the same questions but no one really gives them answers. I'm guessing it's betterfor it to be on two different partitions in terms of coupling. For noobs, the Samsung way is easier.
HellcatDroid said:
Depending on how you rooted it's just /system/xbin/su that gets replaced and /system/xbin/busybox that gets added.
Then all the symlinks busybox installs - not sure if busybox has an "uninstall" option to remove them, if not just dump all symlinks in /system/xbin, on stock FWs there are none in this dir.
Click to expand...
Click to collapse
Great. Thanks. I would like to know what Android does on a low level in order to gain root access. I'm going to research that a bit.
Thanks very much for the info!

techjunkieza said:
I would like to know what Android does on a low level in order to gain root access. I'm going to research that a bit.
Click to expand...
Click to collapse
Well, once one knows what happens it's not that much magic that happens.
Basically, the stock su gets replaced with a custom one that actually has a way of allowing other user (IDs) to run as root, Superuser.apk is installed to maintain su's database of allowed (and disallowed) user IDs and last not least busybox is installed to gain some shell commands not available (or limited) on stock.
All that is done via an adb daemon (already) running with root perms - that's what the insecure kernels do, they simply let the adbd run with root perms (so the above things can be done).
Each app running has it's unique, own user ID it's running with, so root access/permissions can easiely be maintained that way.
I hope that was what you wanted to know

HellcatDroid said:
Well, once one knows what happens it's not that much magic that happens.
Basically, the stock su gets replaced with a custom one that actually has a way of allowing other user (IDs) to run as root, Superuser.apk is installed to maintain su's database of allowed (and disallowed) user IDs and last not least busybox is installed to gain some shell commands not available (or limited) on stock.
All that is done via an adb daemon (already) running with root perms - that's what the insecure kernels do, they simply let the adbd run with root perms (so the above things can be done).
Each app running has it's unique, own user ID it's running with, so root access/permissions can easiely be maintained that way.
I hope that was what you wanted to know
Click to expand...
Click to collapse
Basically, yes! You definitely deserve a thanks for all of this. I was looking for information of what you just described but couldn't find anything. Shot dude!

how to reset counter without the USB jig ?

You don't.
Best you can do is getting rid of the triangle by flashing a stock kernel, but to reset the counter you really need the USB jig.

Great post! I cannot find a clear answer to these questions as well:
1. What is the location of the so called "boot loader" and how to make a backup? On Intel architecture it's on the first few sectors of the disk block device.
2. What is the location of the "ODIN mode/Download mode" application and how to make a backup? I suspect it may be in some read only memory and there is nothing to backup?
3. What is the location of the partition table? How to backup?
I want to understand the real/core/linux/android way of doing these, not just blindly running arbitrary tools.
Thanks in advance.

HellcatDroid said:
You don't.
Best you can do is getting rid of the triangle by flashing a stock kernel, but to reset the counter you really need the USB jig.
Click to expand...
Click to collapse
You can try this
http://forum.xda-developers.com/showthread.php?t=1494114
I already did it on my SII running ICS 4.0.3, worked great!..., but..., read the thread and cross your fingers...

gingingingin said:
1. What is the location of the so called "boot loader" and how to make a backup? On Intel architecture it's on the first few sectors of the disk block device.
2. What is the location of the "ODIN mode/Download mode" application and how to make a backup? I suspect it may be in some read only memory and there is nothing to backup?
3. What is the location of the partition table? How to backup?
Click to expand...
Click to collapse
1, 2 and 3: they are outside of the normal partitioned space / on hidden partiions (the bootloader partition is visible in ICS though) and you should not touch them.
Backing them up is useless as when the bootloaders are corrupted/broken, you'll have no way to restore them anyways as no bootloader == no boot to run anything, hence no restoring.
One is advised to leave them alone and not touch them - usually you can't access them anyways.
2: "Download Mode" is part of the secondary bootloader (partitions /dev/block/mmcblk0p2 and mmcblk0p3).
Hence the inability to access Download Mode when the bootloaders are broken.

Does it mean that "Download Mode" can be corrupt by overwriting this secondary bootloader? What about the the primary one? Is this a sure way for "hard bricking"? I was always wondering is there a way to completely lock yourself out of SGS2, but could not get a conclusive answer in the forum. Or you can recover from any failure by having any single piece backed up?
What do update packages mean when they contain a bootloader update - is it primary or secondary bootloader, or both?
You didn't say about the location of the partition table, although it's quite often part of the updates to have a PIT file with a new layout?
And last but not least, what is the basic sequence to recover from a partition based raw backup, like the one we're discussing in the thread?
Regards,
Anton

Related

[Q] Cooking with Samsung Firmware

Hello:
I'm attempting to create a custom rom for my Samsung Galaxy S Vibrant. I've downloaded a firmware for my phone (UGJK3), but I've run into a small problem: Samsung doesn't seem to use the default "system.img, boot.img, etc" file structure, and instead uses various factoryfs.rfs, zImage, etc files.
I'm unable to cook my rom using the HTC android kitchen due to this problem: I'm required to have the *.IMG files in order to cook it.
I've mounted the .RFS files in linux, but it has gotten me no closer.
This problem is probably quite easy to fix, I'm just unsure where to start.
Any help is appreciated,
thanks.
It seems like other folks are making flashable zips. I just grabbed one and it's setup very similar to ours, although it appears that the kernel is done differently.
http://forum.xda-developers.com/forumdisplay.php?f=711
Existence. said:
Hello:
I'm attempting to create a custom rom for my Samsung Galaxy S Vibrant. I've downloaded a firmware for my phone (UGJK3), but I've run into a small problem: Samsung doesn't seem to use the default "system.img, boot.img, etc" file structure, and instead uses various factoryfs.rfs, zImage, etc files.
I'm unable to cook my rom using the HTC android kitchen due to this problem: I'm required to have the *.IMG files in order to cook it.
I've mounted the .RFS files in linux, but it has gotten me no closer.
This problem is probably quite easy to fix, I'm just unsure where to start.
Any help is appreciated,
thanks.
Click to expand...
Click to collapse
gnarlyc said:
It seems like other folks are making flashable zips. I just grabbed one and it's setup very similar to ours, although it appears that the kernel is done differently.
http://forum.xda-developers.com/forumdisplay.php?f=711
Click to expand...
Click to collapse
Yeah, I've noticed that, however I'd prefer to work with a kernal and ROM that is stock; that is, hasn't been modified at all. I was able to import a custom ROM into the kitchen that has already been modified (namely Doc's rom), but I view this as a learning experience, and would ideally like to de-odex, zipalign, remove bloatware, etc etc myself.
I'd imagine there would be a veary easy way to change this .tar file to a flashable zip, however I'm at a loss on how to do this.
If someone created a flashable, stock, UGJK3 rom, that would be different, and I'd be able to work with that.
Existence. said:
Yeah, I've noticed that, however I'd prefer to work with a kernal and ROM that is stock; that is, hasn't been modified at all. I was able to import a custom ROM into the kitchen that has already been modified (namely Doc's rom), but I view this as a learning experience, and would ideally like to de-odex, zipalign, remove bloatware, etc etc myself.
I'd imagine there would be a veary easy way to change this .tar file to a flashable zip, however I'm at a loss on how to do this.
If someone created a flashable, stock, UGJK3 rom, that would be different, and I'd be able to work with that.
Click to expand...
Click to collapse
Sure. I like to start with as close to stock or source if possible too. I'm just wondering if there's a how-to in the Vibrant forum or if those folks might know better than those of us who don't have Vibrants. I recently tried helping a friend to root his Vibrant and it was different enough for me to get lost.. .
gnarlyc said:
Sure. I like to start with as close to stock or source if possible too. I'm just wondering if there's a how-to in the Vibrant forum or if those folks might know better than those of us who don't have Vibrants. I recently tried helping a friend to root his Vibrant and it was different enough for me to get lost.. .
Click to expand...
Click to collapse
Yeah, I've already posted a thread in the Galaxy I9000 Q&A section of the forum, but to no avail (not the Vibrant section, as the T-Mobile US-variant differs from my Bell-based Vibrant). I was thinking, what if I install the UGJK3 stock rom on my phone, take a nandroid backup, then use the .IMG files in that backup in the kitchen?
Eh, it's worth a try. I'll see how it goes.
Existence. said:
Yeah, I've already posted a thread in the Galaxy I9000 Q&A section of the forum, but to no avail (not the Vibrant section, as the T-Mobile US-variant differs from my Bell-based Vibrant). I was thinking, what if I install the UGJK3 stock rom on my phone, take a nandroid backup, then use the .IMG files in that backup in the kitchen?
Eh, it's worth a try. I'll see how it goes.
Click to expand...
Click to collapse
okay so was there anything to report because i am on this trek myself at the moment and am looking for any pockets of air as i feel i am drowning in the ocean of dead ends!
Okay, I'm feeling kind today, so here goes:
SAMSUNG ODIN ROMS – Applies to Galaxy S and all derivatives (Vibrant, Captivate, etc)
For anyone unaware, ODIN is the Samsung equivalent of HTC’s RUU. Both are full ROMs containing the images, and both can only be installed via Windows. The ODIN ROMs can be used to restore a semi-bricked phone, that won’t boot to recovery or into the full OS, as all that is needed is Download mode. Download mode is simply accessed by unplugging the phone from the USB cable, holding the volume buttons and plugging in!
BEFORE YOU START, YOU WILL NEED:
- Windows & Relevant ODIN drivers (note – if you’re on 64 bit, you will need to disable signature enforcement on boot before ODIN will work)
- A Linux installation (possibly OS-X, but I haven’t written this guide for that)
So... Working on ODIN roms is a little different to typical ROM ‘cooking’ (I hate that term by the way... cooking can be applied to winzip warriors.. what we're doing here is a tad more technical).
1. First, flash the base ROM using ODIN. Be sure it is a pre-rooted version, or at least root it yourself after.
2. Install an FTP server app to the phone, and connect to it via your computer. It can be done using file managers and shell commands, but will take you ages.
3. Mount system as read write:
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
4. Once you’ve found the issues/things you'd like to change, make the changes directly on the phone itself using FTP/filemanager/shell commands
Add custom boot, build.prop, sounds, fonts, whatever you want (SEE NOTES).
5. Once you’re happy with the build, it’s time to dump the necessary partitions to build the ODIN rom.
To do this, you will need to install a terminal emulator or use adb shell, and ensure the ROM has root access & SU. Let’s work on the assumption that if you’re reading this, you know roughly what you’re doing.
In terminal, type the following commands to dump the /system partition, cache (not necessary), zImage (kernel) and modem.bin (radio) to the INTERNAL SD Card:
su
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
6. You’ll need to boot into your Linux machine/VM. The next step is to create the tarball of the dumped partitions. Do this by typing the following command into the Linux terminal:
tar -H ustar -c factoryfs.rfs cache.rfs modem.bin zImage > gals.tar
OPTIONAL:
7. Next, md5 it up, as ODIN can check the md5 before writing the image. Do this with the following command:
md5sum –t gals.tar >> gals.tar
mv gals.tar gals.tar.md5
8. Contratulations! That’s your ODIN flashable ROM.
9. You will need a PIT file in ODIN to flash this ROM. This can be obtained by Googling for it, or by asking me... or if you need to know how to make you’re own, it’s a piece of piss, just dump it in the same way as above.
su
dd if=/dev/block/bml2 of=/sdcard/FILENAME.pit bs=4096
More congratulations: you can now do the job of Samsung.
PS - please, oh please, can we stop calling it cooking?
You said:
nprussell said:
Add custom boot, build.prop, sounds, fonts, whatever you want (SEE NOTES).
Click to expand...
Click to collapse
Any chance you have a link to said notes? I would like to read further if they exist.
nprussel: How would you go about creating a CWM flashable version instead of Odin?
Edit: Found this guide, but it's geared towards creating an update.zip for specific purposes instead of for a full rom. Its there a way to automatically generate the update-script for a full stock rom? Maybe just by doing a nandroid backup like the OP suggested?
http://www.londatiga.net/it/how-to-create-android-update-zip-package
nprussell said:
Okay, I'm feeling kind today, so here goes:
SAMSUNG ODIN ROMS – Applies to Galaxy S and all derivatives (Vibrant, Captivate, etc)
For anyone unaware, ODIN is the Samsung equivalent of HTC’s RUU. Both are full ROMs containing the images, and both can only be installed via Windows. The ODIN ROMs can be used to restore a semi-bricked phone, that won’t boot to recovery or into the full OS, as all that is needed is Download mode. Download mode is simply accessed by unplugging the phone from the USB cable, holding the volume buttons and plugging in!
BEFORE YOU START, YOU WILL NEED:
- Windows & Relevant ODIN drivers (note – if you’re on 64 bit, you will need to disable signature enforcement on boot before ODIN will work)
- A Linux installation (possibly OS-X, but I haven’t written this guide for that)
So... Working on ODIN roms is a little different to typical ROM ‘cooking’ (I hate that term by the way... cooking can be applied to winzip warriors.. what we're doing here is a tad more technical).
1. First, flash the base ROM using ODIN. Be sure it is a pre-rooted version, or at least root it yourself after.
2. Install an FTP server app to the phone, and connect to it via your computer. It can be done using file managers and shell commands, but will take you ages.
3. Mount system as read write:
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
4. Once you’ve found the issues/things you'd like to change, make the changes directly on the phone itself using FTP/filemanager/shell commands
Add custom boot, build.prop, sounds, fonts, whatever you want (SEE NOTES).
5. Once you’re happy with the build, it’s time to dump the necessary partitions to build the ODIN rom.
To do this, you will need to install a terminal emulator or use adb shell, and ensure the ROM has root access & SU. Let’s work on the assumption that if you’re reading this, you know roughly what you’re doing.
In terminal, type the following commands to dump the /system partition, cache (not necessary), zImage (kernel) and modem.bin (radio) to the INTERNAL SD Card:
su
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
6. You’ll need to boot into your Linux machine/VM. The next step is to create the tarball of the dumped partitions. Do this by typing the following command into the Linux terminal:
tar -H ustar -c factoryfs.rfs cache.rfs modem.bin zImage > gals.tar
OPTIONAL:
7. Next, md5 it up, as ODIN can check the md5 before writing the image. Do this with the following command:
md5sum –t gals.tar >> gals.tar
mv gals.tar gals.tar.md5
8. Contratulations! That’s your ODIN flashable ROM.
9. You will need a PIT file in ODIN to flash this ROM. This can be obtained by Googling for it, or by asking me... or if you need to know how to make you’re own, it’s a piece of piss, just dump it in the same way as above.
su
dd if=/dev/block/bml2 of=/sdcard/FILENAME.pit bs=4096
More congratulations: you can now do the job of Samsung.
PS - please, oh please, can we stop calling it cooking?
Click to expand...
Click to collapse
Ok, so I'm trying to create a Factory Odin Flash for the Samsung Galaxy S Showcase.. (brother of the fascinate and Mesmerize)...
I've followed your instructions (step 5-9) to a T, using a Rooted Showcase...
But it fails..
Here the start of the Thread
This is the post of the guy that tested it HERE
Guys ANY info you can help me with this would be GREATLY appreciated, because as of now we have no way to get back to stock!!!
I'm trying to create an Odin Flash now using MY files. I'm on a deodexed PicknPack Rom/Voodoo Kernel. There's several people that have messed up phones and are simply trying to get on our network, so I'm hoping I can atleast help them with that..
Thanks in advance,
elijahblake
nprussell said:
Okay, I'm feeling kind today, so here goes:
SAMSUNG ODIN ROMS – Applies to Galaxy S and all derivatives (Vibrant, Captivate, etc)
For anyone unaware, ODIN is the Samsung equivalent of HTC’s RUU. Both are full ROMs containing the images, and both can only be installed via Windows. The ODIN ROMs can be used to restore a semi-bricked phone, that won’t boot to recovery or into the full OS, as all that is needed is Download mode. Download mode is simply accessed by unplugging the phone from the USB cable, holding the volume buttons and plugging in!
BEFORE YOU START, YOU WILL NEED:
- Windows & Relevant ODIN drivers (note – if you’re on 64 bit, you will need to disable signature enforcement on boot before ODIN will work)
- A Linux installation (possibly OS-X, but I haven’t written this guide for that)
Click to expand...
Click to collapse
Windows is not needed to flash ODIN packages. You can use an alternate open-source software called Heimdall, which is considered by many to be more stable than ODIN. Heimdall is available for Linux, MacOS, and yes even Windows. There is also a GUI, compiled for those platforms (except Linux 32-bit, have to do it yourself or use command-line. 64bit Linux has a compiled version of GUI available)
I have only needed Heimdall once so, but it was easy to use the command-line text from the example given-- I guess maybe I'll learn more complex bits as I soft-brick more times ;-)
The main difference seems to be that you uncompress the ROM archive first, but maybe they will add support for opening the archives (tar files) within Heimdall.
William
Linux FTW! (the others parts could prob be done on Windows somehow, but as our phones run Linux, everything needed is there or easier to install)
Is there a way to port an HTC rom to the vibrant or say the Galaxy Tab (preferred)?
There is a flavour of the Android Kitchen made for the Galaxy S, if you're lazy and/or need some hand-holding: ;-)
It's by RMGeren but still in a beta stage:
https://github.com/dsixda/Android-Kitchen/tree/galaxy_s
Just click on the "Downloads" link on the top right part of the page.
@nprussel: Thanks for that detailed guide!

Is this back up process ok?

Hi Peeps
Been looking into the quickest way into getting back to my fave rooted stock after a quick rom flash. I'm definetly a rom "hopper" and one thing stopping me from really going mad is the "faffing" about getting back to my my working scenario after I decided I was bored of a rom or it went and broke or something putting me off it.
I experimented with CWM backup and restore and was astonished at the "complete" restore it did.
I I backed up my rooted KH3 stock with CWM then wiped the system before trying a new batista70. It was broken again for me so I wiped and tested the restore.
The WHOLE previous system was there, my data, kernels, root, EVERYTHING.
Nothing to set up!
Is this too good to be true have I missed anything.
Can I now try roms to my hearts content and if I want revert back to that Kh3 back up ( or of course have a few backups of different roms and restore as desired )
Thanks
Back up EFS as a standby .
jje
when you backup with CWM does it also backup ur gallery??
JJEgan said:
Back up EFS as a standby .
jje
Click to expand...
Click to collapse
ooh umm whats that and how do I it? thanks!
edit#
just had a quick look and its the imei and harware info section that can get corrupted, I saw some one say you can zip it up with root explorer and do that.
I have made a tar and a zip just in case, what situation would I be in if I needed to restore it and at what point ? thanks?
edit#
ok now have a backup as per
http://forum.xda-developers.com/showthread.php?t=1068193&highlight=efs+backup+restore
here is what you need to know in a nutshell
########EFS BACK UP##########
What you will need:
Rooted SGS II to get permissions as a SU (Super User) and perform the backup
I would suggest learning a little about the terminal commands used (in case you are not familiar with them), as it’s better to know what you are doing rather than typing strings like a little chimp without knowing what they are; if you are a little lazy, then you have a good chance bricking your mobile. <- Busybox Commands(or Google them)
Terminal Emulator by Jack Palevich (available from the market) <-Terminal Emulator or use ADB which is included in the SDK Development Tools
2 Back Up Methods
CLEAN :
su
busybox tar zcvf /sdcard/efs/efs-backup.tar.gz /efs
RAW :
Code:
su
cat /dev/block/mmcblk0p1 > /sdcard/efs/efs_dev-block-mmcblk0p1.img
#######EFS RESTORE CLEAN########
Here's how to restore using the Clean Method
su
busybox tar zxvf /sdcard/efs/efs-backup.tar.gz -C /
########EFS RESTORE RAW##########
Either
Code:
dd if=/sdcard/efs/efs_dev-block-mmcblk0p1.img of=/dev/block/mmcblk0p1 bs=4096
Or
Code:
cat /sdcard/efs/efs_dev-block-mmcblk0p1.img > /dev/block/mmcblk0p1
#########KTOOL.APK###############
Easiest Way really app that does it all for you....one click backup..one click restore
http://f.lui.li/get_99_f13d.html
install app....open.....
backup Efs to /sdcard/efs.img (default loc)
restore efs.img (if you moved this to a secure place (dropbox)..copy back to
/sdcard/ (as per backup)
From I gather this should be done before you start messing and flashing
with your shiny new droid.....

Stock Galax player 4.0 U.S rom 2.3.5

Here is the link from my backed up rom it should have no Personal settings. I have also no proof that it works, because no one has flashed it yea, but it's here ifyou need it.
http://www.4shared.com/file/zhZjh0EY/package_us235tar.html
Wow. You got it to work, me and some other people constantly kept trying it for hours but no luck. I'm curious can you tell me what you did, since i'm new i'm trying to learn as much as i can so i can improve my self at this. Thanks in advance.
I downloaded the md5 file, and it just contains factoryfs.rfs and zImage, which are the system and kernel partitions. So it's still not a full recovery with all the complete partitions but can still recover your device if you were messing with the system partition.
This is what i followed to back up the rom. The part that says stl is really an L and not a 1 thats what was messing me up at first. Then you have to convert the backup to a tar.md5 by using cygwin, or linux and Point the commands to where ever you copied the backup.
Choucas06 said:
Here are the info :
To make a backup, follow the instructions here :
http://forum.xda-developers.com/showthread.php?t=1082288
But you only have to make a backup a of the Sytem and the Kernel (recovery is not needed).
To backup the system, the correct command for YP-G1 is :
Code:
dd if=/dev/block/stl9 of=/sdcard/factoryfs.rfs bs=4096
For the kernel, it is :
Code:
dd if=/dev/block/bml7 of=/sdcard/zImage bs=4096
Click to expand...
Click to collapse
Well, thank you for the contribution! @hyperruner, I finally got my device back from Samsung, works fine again! @klin1344, ever get yours unbricked? I can confirm Samsung won't do anything about it if you send it in rooted.
Sent from my YP-G1 using Tapatalk
Yeah I got mine back from Samsung a few days ago, and it works now.
Same here, they didn't check if it was rooted or not.

Rooted XXALJL boot.img

This boot.img, attached, provides a root shell directly over adb. It is a simple modification of the stock XXALJL boot.img and could be useful for ROM developers who need to adb remount frequently, while still using the stock boot/kernel. I do not recommend this method for users in general since it is very insecure (SuperUser gives you more fine-grained permission control).
Flash it with Odin or under Linux:
Code:
heimdall flash --18 XXALJL-rooted.boot.img
WARNING: contrary to the system.img root method, this WILL increase your download count!
EDIT: in fact it would be better to simply dd the img file into mmcblk0p20, should not increase the download count.
Be careful, this also disables auto updates (now it says the device has been modified, and won't allow OTA updating).
xd.bx said:
Be careful, this also disables auto updates (now it says the device has been modified, and won't allow OTA updating).
Click to expand...
Click to collapse
are you tested if work with custom recovery ?
xd.bx said:
This boot.img, attached, provides a root shell directly over adb. It is a simple modification of the stock XXALJL boot.img and could be useful for ROM developers who need to adb remount frequently, while still using the stock boot/kernel. I do not recommend this method for users in general since it is very insecure (SuperUser gives you more fine-grained permission control).
Flash it with Odin or under Linux:
Code:
heimdall flash --18 XXALJL-rooted.boot.img
WARNING: contrary to the system.img root method, this WILL increase your download count!
Click to expand...
Click to collapse
I just dumped your image and....
Forgive for being i bit confused but in order to have a rooted Insecure image don't you need to set ro.secure=0?
This your Default.prop dumped from your image
Code:
ro.secure=1
ro.allow.mock.location=0
ro.debuggable=0
persist.service.adb.enable=1
Also why is there no root binarys in the image?
So, as far as i can see the only thing this image will do is increase you binary count, nothing else.
If im wrong i apologize in advance.
faria said:
So, as far as i can see the only thing this image will do is increase you binary count, nothing else.
If im wrong i apologize in advance.
Click to expand...
Click to collapse
I did try setting ro.secure to 0 but it didn't work. So I simply patched the setuid/setgid arm instructions inside adbd so that it never drops its privileges, no matter what. (it's very straightforward to do with objdump+a hex editor).
spawk said:
are you tested if work with custom recovery ?
Click to expand...
Click to collapse
I haven't, no.
xd.bx said:
I did try setting ro.secure to 0 but it didn't work. So I simply patched the setuid/setgid arm instructions inside adbd so that it never drops its privileges, no matter what. (it's very straightforward to do with objdump+a hex editor).
Click to expand...
Click to collapse
I see,
I believe that the best way to achieve what you want is to split the boot image ,then dump the the ram disk, edit its contents then rebuild the image.
I have wrote a linux script that does all of that if you are interested .
faria said:
I see,
I believe that the best way to achieve what you want is to split the boot image ,then dump the the ram disk, edit its contents then rebuild the image.
I have wrote a linux script that does all of that if you are interested .
Click to expand...
Click to collapse
Thanks, indeed I am. BTW I just realized it would be much better to root through system.img and then flash by using dd into mmcblk0p20. This way the download count should stay the same.
xd.bx said:
Thanks, indeed I am. BTW I just realized it would be much better to root through system.img and then flash by using dd into mmcblk0p20. This way the download count should stay the same.
Click to expand...
Click to collapse
Our current method of rooting, using the System image does not increase the binary count.
Here is the script
You will need the abootimg tools installed in linux.
unzip the package ,delete everything inside the folder except the unpack file.
Copy the boot.img to the folder.
double click on the unpack file and launch as terminal
Follow the instructions in terminal window.

S III efs missing not booting

Dear Friends,
Need help please. I have installed another custom rom that was not meant for I9300 and now the EFS is corrupted. I tried installing orignal rom using ODIN but geting boot loop and the phone is not booting. On going into recovery i can see an error efs/ corupted or something like that. I have the backup of my EFS folder in tar.gz format however dont know how to install the same and recover my phone as not able to boot to android.
Please help me if someone can work it out. My phone has just 3 days of warranty left and it does not shows rooted anywhere except the count of installation is about 32 and rom says official and kernel says custom.
Please if someone can help me restore my phone back in working condition i shall always remain thankfull.
Regards,
Mush
mush2004 said:
Dear Friends,
Need help please. I have installed another custom rom that was not meant for I9300 and now the EFS is corrupted. I tried installing orignal rom using ODIN but geting boot loop and the phone is not booting. On going into recovery i can see an error efs/ corupted or something like that. I have the backup of my EFS folder in tar.gz format however dont know how to install the same and recover my phone as not able to boot to android.
Please help me if someone can work it out. My phone has just 3 days of warranty left and it does not shows rooted anywhere except the count of installation is about 32 and rom says official and kernel says custom.
Please if someone can help me restore my phone back in working condition i shall always remain thankfull.
Regards,
Mush
Click to expand...
Click to collapse
It is essential that you have a backup of the EFS partition and a way to place it back - the first two ways that I would think about are:
a) use a good recovery - like Philz recovery, that has commands to restore EFS
b) if the format of the backup is not exactly right you might be able to boot in recovery and use ADB commands.
xclub_101 said:
It is essential that you have a backup of the EFS partition and a way to place it back - the first two ways that I would think about are:
a) use a good recovery - like Philz recovery, that has commands to restore EFS
b) if the format of the backup is not exactly right you might be able to boot in recovery and use ADB commands.
Click to expand...
Click to collapse
Code:
su
umount /efs
dd if=/sdcard/efs.img of=/dev/block/mmcblk0p1 bs=4096
reboot
Ver3go said:
Code:
su
umount /efs
dd if=/sdcard/efs.img of=/dev/block/mmcblk0p1 bs=4096
reboot
Click to expand...
Click to collapse
I am new to adb commands. Will phylz recovery help me enter the commands? if yes then i shall be replying with the sd card efs tar file name. Will then you be able to guide me with the commands based on the tar file?
Thanks all of you in advance.
Mush
mush2004 said:
I am new to adb commands. Will phylz recovery help me enter the commands? if yes then i shall be replying with the sd card efs tar file name. Will then you be able to guide me with the commands based on the tar file?
Thanks all of you in advance.
Mush
Click to expand...
Click to collapse
No for ADB you boot into recovery, connect your computer via USB and run the ADB commands from either Linux Terminal or Windows Command Prompt.
The tool here:
http://forum.xda-developers.com/showthread.php?t=1703488
May help if you're new to adb.
Otherwise it's a case of downloading and installing the drivers for your phone and the Android SDK http://developer.android.com/sdk/index.html
Thanks for all your replies.
Just wanted to confirm if i have the efs backup in sd card as under folder backup_efs and there are two files in tar.gz format will i be able to use the phylz recovery to use this replace my efs folder? if yes then can you guide me the steps please.
Regards,
Mush
mush2004 said:
Thanks for all your replies.
Just wanted to confirm if i have the efs backup in sd card as under folder backup_efs and there are two files in tar.gz format will i be able to use the phylz recovery to use this replace my efs folder? if yes then can you guide me the steps please.
Regards,
Mush
Click to expand...
Click to collapse
I do not remember right now what creates an backup_efs folder but it really does not matter that much - the tar.gz is a "file archive" and .img is usually a partition image. Each could have minor advantages - the .img also contains the entire filesystem of the partition (and will work easier if the filesystem is bonked) but a tar.gz backup is more versatile when you have bad sectors or a changed partition.
Under an advanced recovery like Philz you would just navigate some menus and try to restore the EFS - see the info in those specific threads.
Under ADB you need to have stuff (drivers and some programs) installed in your PC, you connect the phone on USB and you run ADB commands from the command line.

Categories

Resources