[HOW-TO] Use Safestrap (backup and flash) (WIP)

guidot

Developer Relations
Staff member
Premium Member
Joined
Feb 10, 2010
Messages
7,292
Reaction score
271
Location
Massachusetts
Ok, guide #4 coming at you here.

So, Hashcode's been busy making all kinds of cool stuff to make our D3 great. Safestrap is his newest project.

The rundown: Essentially, this 'strap separates your userdata (/data and /system) in non-safe mode (stock if you will), from the ROM you will flash in safe mode.

Steps to make a backup in non-safe mode and safe mode are the same, but they CAN NOT be restored interchangeably.

1. Reboot the phone (manually or via an app; ATM reboot to recovery is NOT supported.)
2. At splash screen press menu key. You are now in CWR.
3. Select backup and restore.
4. Select backup.
5. Should take about 1-3 minutes here. This backup is contained on your SDcard-ext (the physical card, unless you don't have one; I need verification that it works without an SD.
6. Done.

You'll notice in a file explorer, that the backups are separated in /sdcard-ext/safestrap/backup/non-safe-xxx-xxx and (once you make one) /sdcard-ext/safestrap/backup/safe-xxx-xxx as they cannot be flashed interchangeably.

To flash a ROM:
1. Make sure the ROM .zip file is on your SDcard
2. Reboot and access recovery as above.
3. Select Safe System
4. Turn on Safe System (this should take a few minutes as it is copying the userdata to an unused partition)
5. Power off and reboot into recovery (have not verified this is acutally necessary)
6. wipe data (in main menu)
7. wipe cache (in main menu)
8. Select mounts and storage
9. Format /system
10. Back to main menu
11. Select Advanced
12. Wipe Dalvik Cache
13. Main Menu
14. Install zip (your ROM) from SDcard
15. Reboot (should take a good while to boot, up to 5 minutes)

To restore your stock system:
1. Reboot into recovery.
2. select Safe System
3. Turn off Safe System
4. Reboot

At this time, the splash screen should show "Safe system: Disabled"

Thanks to:
hashcode
koush
fishacura
ndoren
13th angel
clumsyninja21
 
Last edited:
OP
guidot

guidot

Developer Relations
Staff member
Premium Member
Joined
Feb 10, 2010
Messages
7,292
Reaction score
271
Location
Massachusetts
I am testing a ROM right now.

My guide works. ;)

The initial boot after the new rom flashes is literally twice, if not 3 times as long as the OG droid was.

Sent from my Safestrapped, Rooted, ROM'd XT862
 

ndoren

Member
Joined
Nov 7, 2009
Messages
85
Reaction score
3
Guidot, thanks for your effort on the guide! Brilliant minds think alike, because to some extent, Hashcode posted a How-To on his blog site for
Safestrap. See: Hash of Codes: HOW-TO Safestrap

However, like his blogs, his How-To is a little confusing there. Maybe this is stating the obvious, but I can't be sure. Does "Non-safe" refer to "1st-system" and "Safe" refer to "2nd-system"? He uses all the terms but doesn't really link them clearly.

For those who aren't into burning ROMs but just want the security of nandroid backups for their stock ROM, does Safestrap have any advantages at all over the simple Koush bootstrap and recovery?
 
OP
guidot

guidot

Developer Relations
Staff member
Premium Member
Joined
Feb 10, 2010
Messages
7,292
Reaction score
271
Location
Massachusetts
Guidot, thanks for your effort on the guide! Brilliant minds think alike, because to some extent, Hashcode posted a How-To on his blog site for
Safestrap. See: Hash of Codes: HOW-TO Safestrap

However, like his blogs, his How-To is a little confusing there. Maybe this is stating the obvious, but I can't be sure. Does "Non-safe" refer to "1st-system" and "Safe" refer to "2nd-system"? He uses all the terms but doesn't really link them clearly.

For those who aren't into burning ROMs but just want the security of nandroid backups for their stock ROM, does Safestrap have any advantages at all over the simple Koush bootstrap and recovery?

Yes non-safe could be considered 1st init and Safe is 2nd init, but its more different than even that.

Let me explain a bit (hoping that folks have some idea about computer/filesystems):

When you create a backup in non-safe mode, it is a standard FULL backup in CWR.

When you change from non-safe to safe mode, safestrap actually moves the userdata (/data and /system) to /emmc which is an unused partition in the filesystem. So the new safe mode is technically no different than the non-safe mode regarding the existing filesystem. It doesn't write the ROM to a different location than normal, the safestrap just moves the userdata from the 'stock rom' to a secondary location.

Essentially, its as close to being unbrickable as it can be. You can always get into the strap even using power+m if the splash screen doesn't show.

Sent from my Safestrapped, Rooted, ROM'd XT862
 
Last edited:

svickstc

Member
Joined
Oct 10, 2011
Messages
235
Reaction score
2
When creating a backup would you want to be in safe mode or non safe mode,

I would assume safe mode from your description?

Not sure if i fully understand but, but having safe mode disabled would essentially be one rom, and enabling safe mode would allow you to install a second rom, and can just toggle back and forth between safe and non safe mode?
 
Last edited:
OP
guidot

guidot

Developer Relations
Staff member
Premium Member
Joined
Feb 10, 2010
Messages
7,292
Reaction score
271
Location
Massachusetts
When creating a backup would you want to be in safe mode or non safe mode,

I would assume safe mode from your description?

Not sure if i fully understand but, but having safe mode disabled would essentially be one rom, and enabling safe mode would allow you to install a second rom, and can just toggle back and forth between safe and non safe mode?

Safe mode is for flashing ROMs.
Non-safe is where your 'stock+root' ROM and data is.

Always flash in safe. Safe meaning 'safe to flash.'

Sent from my Safestrapped, Rooted, ROM'd XT862
 
OP
guidot

guidot

Developer Relations
Staff member
Premium Member
Joined
Feb 10, 2010
Messages
7,292
Reaction score
271
Location
Massachusetts
Its not meant to go back and forth. Its solely for disaster recovery.

Sent from my Safestrapped, Rooted, ROM'd XT862
 

svickstc

Member
Joined
Oct 10, 2011
Messages
235
Reaction score
2
so when i toggle to safe and flash a rom, i wouldnt toggle it off unless i was going to do a restore?

thanks for your quick reply and help understanding this!!!
 
Last edited:
OP
guidot

guidot

Developer Relations
Staff member
Premium Member
Joined
Feb 10, 2010
Messages
7,292
Reaction score
271
Location
Massachusetts
so when i toggle to safe and flash a rom, i wouldnt toggle it off unless i was going to do a restore?

thanks for your quick reply and help understanding this!!!

If you are interested in flashing ROMs a lot, I would make a backup of your stock setup in non-safe mode, then switch to safe and start flashing! I'll probably stay in safe mode unless I have to unroot for warranty!

Sent from my Safestrapped, Rooted, ROM'd XT862
 

svickstc

Member
Joined
Oct 10, 2011
Messages
235
Reaction score
2
If you are interested in flashing ROMs a lot, I would make a backup of your stock setup in non-safe mode, then switch to safe and start flashing! I'll probably stay in safe mode unless I have to unroot for warranty!

Sent from my Safestrapped, Rooted, ROM'd XT862

Ok, I created a backup in non safe mode, and is still in non safe mode until i decided to make the jump from SD3 to one of these new roms requiring safestrap

should i be in safe mod when flashing themes too?
 
Last edited:

matthskim

Member
Joined
Feb 22, 2011
Messages
61
Reaction score
0
Safe mode is for flashing ROMs.
Non-safe is where your 'stock+root' ROM and data is.

Always flash in safe. Safe meaning 'safe to flash.'

Sent from my Safestrapped, Rooted, ROM'd XT862

Thanks for all your dedication on Safestrap.

Would/should you install all apps you need/want in non-safe mode first and then just flash the safe rom and let the app/data flow through automatically to the new safe rom? Or just keep the stock rom withoutyour apps + root and install the safe rom and install apps in the safe rom?

Secondly, when the OTA comes through in the non-safe mode, will the new updates such as kernell, radio, what have you be reflected in the safe rom?

Thirdly, if anything goes bad with the safe rom, would you be able to restore to the non-safe really easily? Then, how would you do that?

Thanks a lot for your help.

Thanks.
 
OP
guidot

guidot

Developer Relations
Staff member
Premium Member
Joined
Feb 10, 2010
Messages
7,292
Reaction score
271
Location
Massachusetts
Ok, I created a backup in non safe mode, and is still in non safe mode until i decided to make the jump from SD3 to one of these new roms requiring safestrap

should i be in safe mod when flashing themes too?

You need to be in safe mode to flash any ROM or theme associated with that ROM.

Sent from my Safestrapped, Rooted, ROM'd XT862
 
OP
guidot

guidot

Developer Relations
Staff member
Premium Member
Joined
Feb 10, 2010
Messages
7,292
Reaction score
271
Location
Massachusetts
Thanks for all your dedication on Safestrap.

Would/should you install all apps you need/want in non-safe mode first and then just flash the safe rom and let the app/data flow through automatically to the new safe rom? Or just keep the stock rom withoutyour apps + root and install the safe rom and install apps in the safe rom?

Secondly, when the OTA comes through in the non-safe mode, will the new updates such as kernell, radio, what have you be reflected in the safe rom?

Thirdly, if anything goes bad with the safe rom, would you be able to restore to the non-safe really easily? Then, how would you do that?

Thanks a lot for your help.

Thanks.

Ok, lots of data you are downloading here.

Let me try to address everything.

I would make a backup in non-safe mode of your phone as it is right now in stock form (+root obviously). That way if anything goes south in either safe or non-safe you are covered.

If you are in safe mode, you don't "see", or rather, the upgrade servers don't see the non-safe mode. You most likely will not see OTAs if you are on a ROM, as the /system folder won't be correct. If you go back to non-safe mode and accept an OTA (which I DO NOT recommend), you will most likely have to re root and re install safestrap (if your phone can even be re rooted at that point).

If something goes wrong, ie a bootloop or bad flash, you can reboot, hit menu and change back to non-safe and restore your backup. Should be just a few minutes.

That is the beauty of Safestrap.


Sent from my Safestrapped, Rooted, ROM'd XT862
 
OP
guidot

guidot

Developer Relations
Staff member
Premium Member
Joined
Feb 10, 2010
Messages
7,292
Reaction score
271
Location
Massachusetts
In regards to the apps, its personal preference.

I used to test for a developer, so I'm used to reinstalling everything all the time.

Obviously without all the apps and their data, the backup would be faster and smaller file size.

Sent from my Safestrapped, Rooted, ROM'd XT862
 

matthskim

Member
Joined
Feb 22, 2011
Messages
61
Reaction score
0
Ok, lots of data you are downloading here.

Let me try to address everything.

I would make a backup in non-safe mode of your phone as it is right now in stock form (+root obviously). That way if anything goes south in either safe or non-safe you are covered.

If you are in safe mode, you don't "see", or rather, the upgrade servers don't see the non-safe mode. You most likely will not see OTAs if you are on a ROM, as the /system folder won't be correct. If you go back to non-safe mode and accept an OTA (which I DO NOT recommend), you will most likely have to re root and re install safestrap (if your phone can even be re rooted at that point).

If something goes wrong, ie a bootloop or bad flash, you can reboot, hit menu and change back to non-safe and restore your backup. Should be just a few minutes.

That is the beauty of Safestrap.


Sent from my Safestrapped, Rooted, ROM'd XT862


Thanks.

Could you please give me an answer to my first question regarding where I should install apps, non-safe or safe.

Edit: woops, you already answer. Thanks.
 
Last edited:
Top