• Announcements

    • Reminder - MoDaCo position on illegal content   07/30/15

      ILLEGAL CONTENT I'd like to just reaffirm MoDaCo's position regarding piracy and illegal content in the light of some recent questions / postings. Posts will be censored by myself or my moderation team if the contain or link to: Illegal / pirated / cracked software or sites that host such softwareNintendo emulators / ROMs or sites hosting them (in light of Nintendo's legal stance)CUSTOM ROMS You may discuss and post links to custom device ROMs on MoDaCo, provided the following rules are adhered to: ROMs must not contain any illegal 3rd party software (this includes trial versions included without permission)ROMs must give full credit to the original authorISSUES If you have any issues with this policy, please contact PaulOBrien directly via PM.
    • Reminder: Selling items on the forum directly is not allowed   07/30/15

      Please note that selling items on the forum directly is not allowed by the forum rules. There is a forum for eBay auctions whereby you can list the items on eBay and link to them there. This is the ONLY forum for this type of activity. You may also advertise links to the eBay forum in your signature. Please note that selling directly in contravention of these rules will result in a warning / suspension / ban.
Sign in to follow this  
Followers 0

18 Aug: EFS auto backup script (for devs)

5 posts in this topic

Posted

I have now seen a number of cases of the EFS partition getting wiped / corrupted on the SGS II, leaving users with an effectively useless phone.

With this in mind, i've written a little init.d script for my ROM which backs up the EFS partition on boot if a backup does not already exist. A non intrusive safety net for users if you will. :)

The script just needs a suitable boot image that runs init.d, although it could easily be tacked onto the end of install-recovery.sh if that's not the case.

I'd love to encourage all developers to use this script for users' sake!

You can download the script here - http://cl.ly/2j0p0R3F07052m2T2u0e - but it's very simple, here's the code...

#!/system/bin/sh
# EFS auto backup script for Samsung Galaxy S II
# By @paulobrien - http://s2.MoDaCo.com

mount /dev/block/mmcblk0p11 /sdcard

if [ ! -f /sdcard/efs.autobackup.img ];
then
dd if=/dev/block/mmcblk0p1 of=/sdcard/efs.autobackup.img
fi

umount /sdcard[/code]

:)

Note the manual mount / umount of sdcard is necessary because this happens late in the boot process.

Cheers!

P

0

Share this post


Link to post
Share on other sites

Posted

As a matter of interest Paul, if it became necessary to restore the efs partition, how do you go about doing it? Is it as described here:

http://forum.xda-developers.com/showthread.php?t=1085374

Or would it be different as yours is a .img file?

I've had a bit of a google about, found your thread on the xda devs site, but still no answer about restoring the image. Fastboot maybe?

Sorry if it's a noob question but i'm still learning about these things ;)

0

Share this post


Link to post
Share on other sites

Posted

You'd 'dd' the image back.

P

0

Share this post


Link to post
Share on other sites

Posted

You'd 'dd' the image back.

P

Ah! Cool, so i'm assuming then that the phone would still be in some sort of bootable state then after corruption. Probably just sim and radio related issues i suppose.

Cheers. Good to know :)

0

Share this post


Link to post
Share on other sites

Posted

Ah! Cool, so i'm assuming then that the phone would still be in some sort of bootable state then after corruption. Probably just sim and radio related issues i suppose.

Cheers. Good to know :)

Correct! :)

P

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

MoDaCo is part of the MoDaCo.network, © Paul O'Brien 2002-2015. MoDaCo uses IntelliTxt technology.