yashsingh1/xdaforums huggingface dataset:
[Motorola Droid 3] Hashcode:
SAFESTRAP v3.05 (2nd-System Bootstrap / Recovery)

PRIOR TO UPGRADING TO V3.x FROM V2.x MOVE THE /sdcard/safestrap FOLDER FROM YOUR /sdcard TO THE /sdcard-ext. THIS OPENS UP VALUABLE INTERNAL EMMC SPACE WHERE ROM SLOTS ARE CREATED. AND KEEPS YOUR V2 BACKUPS SAFE IN CASE YOU WANT TO REVERT TO V2 AND USE THEM TO RESTORE.

** INSERT STANDARD DISCLAIMER: I'm not responsible for any damage you do to your phone using my tools. Always have a fastboot available for disaster recovery. **

Download the "Droid3Safestrap-3.05.apk" Installer Here for "DROID 3"

FOLLOW THESE INSTRUCTIONS: How to Safestrap

[ DOUBLE-CHECK you have the DROID3 VERSION ]

CHANGES:

[10/17] (3.05) Fixed SD card / emmc sharing in recovery (UMS)

[10/17] (3.05) Fixed recovery installation/removal from ROM-slots

[10/14] Updated to v3.04 BETA.

[10/14] Recovery is now based off TWRP 2.2.2.1 (fully featured touch-based recovery)

[10/14] Can create up to 4 Virtual ROM-slots to flash ROMs to and when "Active" ALL TWRP functions affect that ROM-slot (For example: Flashing .zips, Backup and Restore)

[10/14] Nearly instant swapping from ROM to ROM

[10/14] User selectable data partition sizes during ROM slot creation: 1GB, 2GB or 3GB

[10/14] ROM slots are saved on the internal emmc space so that preinstall and webtop partitions are no longer used and shouldn't break OTAs.

[10/14] Charging in recovery

[10/14] Supports "Reboot Recovery" from Android OS

Entry to recovery via Splashscreen on boot-up. The screen stays up for around 8-10 seconds and if you hit the menu button, it takes you to Safestrap Recovery.

SPECIAL THANKS TO:

The entire TWRP team who has built an AMAZING recovery system.

The testers which have helped in past and present versions of Safestrap, knowing that it could mean they brick their devices.

As always, let me know what you think!
[Motorola Droid 3] Hashcode:
A quick note about why I made a MotoBlur 5.6.890 ROM .zip for Safestrap:

1. This is the stock version of our Phone's software. If you want to swap back and forth between CM7 and the standard software, but NOT turn off "Safe System" then you need a stock ROM to use. This is it.

2. Devs can use this ROM as a sort of base for making their skinned ROMs without fear of bootlooping into an SBF. Feel free to tweak and hack away.. nothing you can do to the ROM will force you to fastboot restore. At worst you're looking at a battery pull -> bp-tools -> recovery -> restore.

3. I know some people are checking dev servers for future Moto updates. In theory I will pull the /system images from those updates and put out updated MotoBlur ROMs in the future as a way of test driving upcoming Moto patches w/o fear of leaving yourself stranded on an upgrade path that won't be supported.
[Motorola Droid 3] Seirÿu:
So, im just curious, if I wanted to...

I could run say steel droid, then install safestrap, flash cm7,

And by turning safestrap off/on, I could technequally go back and forth

between 2 custom roms? Or do I have to keep the /system partition clean?
[Motorola Droid 3] Hashcode:
Actually the idea for Safestrap is to keep the main system clean.

I'm working with ChevyCam to get a Safestrap version of SteelDroid. Then you can use Safestrap exactly like regular recovery where you would swap from ROM to rom via backup and restore. The advantage being your method of recovery entry and ROM booting is always protected.
[Motorola Droid 3] The Solutor:
Great news !!!

Safestrap works on the XT883 rom too at least w/o the ota update, I'm going to test it on the updated system.
[Motorola Droid 3] Lyxdeslic:
Thanks so much for clarifying, and thanks a million times over for all the great work you've selflessly done for the Droid3 community. I look forward to future CM7 updates.
[Motorola Droid 3] :
hey hashcode, just a clarification, we can use safestrap like koush's bootstrap, but we just must turn safe system off right? cause your post makes it seem as if we cant do this
[Motorola Droid 3] Hashcode:
Right now, zips applied with Safestrap are applied to the 2nd-system only. In theory I could make some adjustments to allow for applying zips to the original system as well.. and while I understand the idea of "dual booting" a phone seems fantastic, it's really just an unrecoverable bootloop waiting to happen.

I'd rather that Droid 3 users turn on "Safe System" and never turn it off again (or need to). If all of our ROMs were installable via Safestrap I really feel that we would see alot less "I've bootlooped" postings on the boards.

For the recovery portion of Safestrap: it does NOT backup the original system. Only the 2nd-system, data and cache partitions. (Remember the idea is that you basically root your original system, toss on Safestrap and then enter recovery and toss a .zip onto your 2nd system)

I'm considering changing this in the next version of Safestrap so that backups from Safestrap can be used for full system recovery.
[Motorola Droid 3] sic4672:
Another question with which to bother you...

When you have the option to do a backup, will you have the ability to choose the destination where the backup is stored as well as the location from where the backup can be restored (either internal or external storage)?

Thank you for your time.
[Motorola Droid 3] limaxray:
Excellent work, I think this is a fabulous idea and should be the de facto standard for these locked devices. Were you still thinking about using a 2nd data/cache partition as well?

I think it would be pretty sweet if you could loopback mount file system images stored on internal storage for the system/data/cache partitions to implement a proper and safe multiboot system. I don't know how much of a performance hit this would take though.

Anyway, the one suggestion I would make about backing up the original system is to not do it as part of the regular backup/restore. Since system should rarely change, it'd be a waste of time and storage space to back it up every time. Could you either make it a separate option, or perhaps only back it up if the partition's checksum changed?

Besides, if you hose your system and need to restore it, you're probably not going to be using this recovery anyway.
[Motorola Droid 3] The Solutor:
I can confirm it works on the updated system too, btw for some odd reasons I'm unable to do a nandroid backup.

I''m investigating what's going on...
[Motorola Droid 3] astronot:
So in order to switch to another ROM (from CM7), that is not Safestrap compatible, I just need to toggle safe mode in recovery?
[Motorola Droid 3] Hashcode:
Yes. But beware of bootloops caused by not wiping your data between ROM switches.

To prevent that from happening you currently need to maintain copies of your data via backup/restore.. This will get addressed in the next version of Safestrap.
[Motorola Droid 3] chevycam94:
I have a version of Steel Droid that is supposed to be safestrap compatible. Im uploading it now. Will test it really quick, to be sure, and if its all good, will post a link!
[Motorola Droid 3] The Solutor:
Ok I spoke too soon, backup and restore doesn't works on XT883

The backup folder is created correctly on the SDcard, the backup process starts normally with the /system partitons and then the process fails telling that there was an error while backing up the system partition.

Hashcode do you have any idea ?

The only differences in the partitioning between the two systems are the mount options

this is the 862

/dev/block/system on /system type ext3 (ro,noatime,nodiratime,barrier=1,data=ordered)

and this the 883

/dev/block/system on /system type ext3 (rw,relatime,barrier=1,data=ordered)
[Motorola Droid 3] Joe.cotto:
Do we install the MOTOBLUR Rom via safestrap or can we install it via bootstrap if coming from another Rom?
[Motorola Droid 3] LaZiODROID:
I guess it's safe to assume that this is not OK for international Droid3's like the XT860 / ME863?
[Motorola Droid 3] Phibernaut:
Just a few short hours later I'm feeling adventurous, but the backup step indicates the MD5 generation failed. Any ideas?
[Motorola Droid 3] Hashcode:
There would probably be radio issues.
[Motorola Droid 3] Hashcode:
This MotoBlur ROM is specifically for Safestrap to run as 2nd-system.
[Motorola Droid 3] mvp3:
I understanded in general,What's the meaning of whole sentence?

hashcode mentioned before,

http://xdaforums.com/showpost.php?p=19172552&postcount=108

Does it work?

Maybe I will try it in afternoon.
[Motorola Droid 3] Hashcode:
Hey guys,

Feel free to check out the source:

https://github.com/Hashcode/android_bootable_recovery

And I would love to take some time and really rebuild Safestrap as a true multi-boot system using the external SD card.. but it's a massive re-write and I'm buried with the D3 CM7 (and helping on the Bionic CM7) at the moment.

I will get a fix for the "missing image" error on Safestrap 1.05 tho.. in a bit.
[Motorola Droid 3] mvp3:
wow,that is real great,the external SD card seems faster than internal storage.
[Motorola Droid 3] TBBle:
Tried that, and it didn't work. Same problem.

Just noticed this:

root@umts_solana:/system/bin# mke2fs -m 0 -j -L preinstall /dev/block/preinstall
mke2fs -m 0 -j -L preinstall /dev/block/preinstall
mke2fs 1.40.8 (13-Mar-2008)
Filesystem label=preinstall
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
64 inodes, 512 blocks
0 blocks (0.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=524288
1 block group
8192 blocks per group, 8192 fragments per group
64 inodes per group

Writing inode tables: done

[B]Filesystem too small for a journal[/B]
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 21 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.

The ext2 module and the ext4 module will load this filesystem, but the ext3 module won't, either on the ME863 or my x86_64 Linux box. It looks like it's simply impossible to mount a 512kb partition with the ext3 module. So Safestrap needs to detect and skip this circumstance at the very least. Or perhaps use ext4 instead of ext3 in recovery.fstab?

On a side-note, I wonder why they mount with the ext3 module rather than the ext4 module, even if they don't intend to use ext4 as the partition format.
[Motorola Droid 3] TBBle:
I haven't done any Android framework-side coding before, and so I'm poking in the dark a bit. I assume the setup procedure is something like this?

repo init -u git://github.com/CyanogenMod/android.git -b gingerbread

repo sync

repo start hashcode bootable/recovery

cd bootable/recovery

git remote add hashcode git://github.com/Hashcode/android_bootable_recovery.git

git fetch hashcode

git merge hashcode/gingerbread

cd -

make recovery

I did pretty much as the above, except repo init from the Google manifest, and it failed to build. >_< I'm leaving it doing repo sync again against CyanogenMod and will come back to it later...

Do I need any of your other github repos, or any of the Motorola-posted bits from sourceforge?
[Motorola Droid 3] matthskim:
Upgrade to 1.05 from 1.04

Currently, I am on v1.04 and made a backup in Non-safesystem and Safesystem, respectively. Everything is working perfect, no problem whatsoever.

Is it worthwhile to upgrade to v1.05? If so, what would be a good procedure, just to be safe? And do I need to make another set of backups in Non- and Safe-system?

I would appreciate advice.
[Motorola Droid 3] ckarrow2:
Using Safestrap 1.05 with Mavrom as safe system, Stock/Rooted as non-safe. I can use Safestrap App with ease in the Stock/Rooted system, but the app itself seems non-functional in the Safe system. If there is an older version, it won't update it, seems to not want to uninstall safestrap. (reports successful, but then still shows "installed").

I'm worried that I'll get into a situation where I'm in the safe system and cannot install safestrap. Any advice or am I looking at the whole picture wrong?

Thanks!
[Motorola Droid 3] eww245:
Safestrap only needs to be on the non-safe system. I guess the Mavrom includes it as a system app, which is fine as long as it's not used while in safe system. Switch back to non-safe to update the apk to a newer version.
[Motorola Droid 3] matthskim:
1. In the non-safe system, do you just uninstall the older, and then install the new right away, without rebooting?

2. Do you have to make another backup in each system? I remember reading that the older versions of backups would not work with the new version of safestrap.
[Motorola Droid 3] eww245:
1. Just install the new apk like anyother app, not really a need to uninstall because Android takes care of that when installing a different version, and then install recovery. It will replace all the necessary files. No need to reboot either.

2. You should make a backup when making any kind of changes to /system before and after.

As far as older backups are concerned any older safestrap backups will work fine as long as they are in the /sdcard or ext/safestrap/backup directories. I believe the warning about older backups is because the tweaked bootstrap backups will cause issues.
[Motorola Droid 3] Joe.cotto:
You can also update it while on Mav Rom. Just delete Safestrap from system/app,reboot,and then install the newer version.
[Motorola Droid 3] eww245:
This is only needed if Mavrom is used as the non-safe rom, it probably won't actually cause an issue if it's installed to the safe system.

If Safestrap is installed on the safe system it will get installed to the preinstall partition. The phone first boots from the system partition regardless if it's toggled safe or not, then handed off to either /preinstall or the original /system.
[Motorola Droid 3] ChaoticWeaponry:
I tried flashing the original system on normal bootstrap before. That was my first brick. Lol
[Motorola Droid 3] Phibernaut:
1.06 reads Not Installed/Not Active even though I'm running CM7 in safe mode and can still access the Safestrap menu upon reboot. Typically a new SS app version indicates the existing version is outdated and offers to perform the update. I'm not seeing that this time. If it makes a difference, this is my first SS update from CM7 and I did not reinstall the 1.05 app after flashing, but that would only have been uninstalled prior to installing 1.06. Any thoughts? Safe to install?

Edit: Hashcode's tweet says to remove recovery before installing - that might have something to do with it. Can someone post a link to the 1.05 file/app?

Edit2: I am an idiot. There's an Uninstall Recovery button in the app. Always wondered why...
[Motorola Droid 3] Phibernaut:
Quadrant scores in CM7 & SS 1.06 are above 3300?!? Thats a near 1,000 point gain over stock Blur and a healthy 200+ over any other D3 ROM I've used.
[Motorola Droid 3] Hashcode:
I should explain that 1.06 fixes a performance issue where the 2nd processor wasn't getting utilized in Safe Mode.

So if you're wondering why the huge gains .. that would explain it.

You can also expect similar gains to be present in EVERY Safe Mode ROM, not just CM7.
[Motorola Droid 3] eww245:
So I toggled back to non-safe to update to 1.06, comming from 1.0. Uninstalled / installed from the app. Then toggled back to safe, it backed up only non-safe data and restored only safe data. All other tars were deleted. Safe wouldn't boot obviously with out it's /system. This I guess is fine for non-safe /preinstall is still intact but the safe system has no way to get back it's rom.

Switched back to non-safe which restored fine and reinstalled Safestrap 1.0. But this still left only the data.tar for safe system, it did restore and system.tar got skipped because it doesn't exist. Restored a system nandroid and boots fine in safe and nonsafe but still on Safestrap 1.0.

Well I thought I knew how all this works but obviously not.
[Motorola Droid 3] Hashcode:
2nd-system is not "stashed" anymore during the toggle. It's kept in-tact in the /preinstall partition. So the only swap that happens is the data. (This was adding a minute or 2 to the toggle time).

I'm not sure why Safe Mode wouldn't boot for you. If you could reflash the ROM in Safe Mode and try again that would be great.
[Motorola Droid 3] eww245:
Toggling to non-safe with 1.0 restored preinstall. I did not reflash, probably could just restore system and it'll be fine. Guess if I installed 1.06 in safe-system it probably would have booted.

So loadpreinstalls.sh will not cause an issue? Still on stock for non-safe.
[Motorola Droid 3] matthskim:
Exactly same thing happened to me when upgrading to s.s v1.05 yesterday. I got black screen and it did not restore safe system. I just Rsd-sbf back to stock rom. This was my first rsd-sbf. I thought the safestrap is pretty safe, but obviously not.

Is ss1.06 worthwhile?
[Motorola Droid 3] MrJudylicious:
from hashcode this morning
[Motorola Droid 3] eww245:
I'd say definitely worth it for whats quoted above ^

What I'm worried about is the original preinstall partition, hopefully it can be restored from a nandroid, that would be the non-safe system.tar to be restored I believe. Though I guess this change was before 1.06. Could always adb cp -ar for preinstall too.
[Motorola Droid 3] Hashcode:
Safestrap should preserve your ability to get back into recovery. Were you not able to go back into recovery to restore a backup? SBF restore should be the last resort.

I'll take a look at the upgrade process, and bootup files to see if I didn't miss something.

I did make a change in 1.06 which was in preparation for allowing the non-safe system to be flashed. To do that I needed to consolidate all of the "safestrap" system files into 1 directory (they were currently in 3). In the next major version of Safestrap, any restore/flash/format affecting the main system partition will move those safestrap files out temporarily so that they don't get overwritten. And then copy them back once that process is complete.

That change was why I mentioned using the "Remove Recovery" button before installing the new version Safestrap. It gives the old version a chance to clean itself up.
[Motorola Droid 3] Hashcode:
I'm sort of balancing a fine line between the "make this a true dual boot" system users and the "make the system as safe as humanly possible" users.

The preinstall partition is very easy to put back together should you need it to be stock again. You can use the .img file from the fastboot or advanced restore just the /system backup of the original non-safe backup.

If it becomes a big deal, then I can build into Safestrap a "restore my preinstall" feature. Something like you put the preinstall.img that you want into the safestrap folder on your SD card and then use that new menu item to put it back onto your device.

As always, I'm looking for feedback on how they want Safestrap to work.
[Motorola Droid 3] MrJudylicious:
im happy with it the way it is. i never restore from nandroids or try to switch between safe and non safe. i like the idea of dual boot but i wouldnt use it.
[Motorola Droid 3] eww245:
If everything can restore it doesn't matter how it's done. I do really like the dual boot but not sure how much I'd use it either, would at least do it cause I can.
[Motorola Droid 3] Phibernaut:
True dual boot/dual flash would be cool, but I doubt I'd use it differently unless there was a way to flash the non-safe system back to stock and receive OTA updates. Or can that be done from the 890 safe mode install?

If SS does go true dual boot/dual flash, maybe just add a secondary per-reboot toggle to acknowledge the risk and protect the less familiar user prior to flashing the non-safe ROM?
[Motorola Droid 3] eww245:
Works fine now, just advance restore the safe /system. And WOW what a difference. Linpack MFLOPS were lower before with the multi test didn't quite understand why now it increased by 30. Thanks this is just getting better and better :)
[Motorola Droid 3] MrJudylicious:
i personally like not being able to flash the nonsafe system. and yes i went up to 82 mflops multi. i think the original idea was/is to keep stock blur on default system, root/rootkeeper/safestrap, and then do whatever you want to the safesystem.
[Motorola Droid 3] eww245:
What rom do you use to get those MFLOPs? I'm getting 73 using Liberty with the overclock at 1200, which gives me about an extra 10. Though it still depends on what apps are installed or running
[Motorola Droid 3] MrJudylicious:
cm7 with 1.06. im still on 5.6.890 (was on 5.7.894 and probably will go back). moto blur stock is my nonsafe system. when i overclock to 1.2 i hit benchmarks of 6400 and 82 mflops (consistantly 80)
[Motorola Droid 3] tacosrdelicioso:
I did quadrant same setup....2799????????!!!!!!! WHY..maybe my sd is slow? Which file system should I format it in..what the f.....3300?? Damn...my d3 suckssss
[Motorola Droid 3] Phibernaut:
Linpack multi scores a 52 though....
[Motorola Droid 3] eww245:
CM7 that explains it. And 6400 quadrant? 2823 here
[Motorola Droid 3] matthskim:
Hash, I could have toggled back to the non-system. But I did not want to keep the non-system with defective safesystem in it. And I did uninstalled the ss 1.04 before upgrading to ss 1.06 yesterday. I still thank you for your hard work for us. I am just curious why it did not restore to safesystem.

I
[Motorola Droid 3] Phibernaut:
Steel Droid 3 in safe mode generates a 2800 Quadrant score, Liberty gets a bit less at 2400 to 2600 but feels snappier. Long story short, CM7 scores the highest for me in Quadrant testing at 3300!
[Motorola Droid 3] tacosrdelicioso:
I remember there was some file you could tamper with that upped the performance...like more fps....what was it...
[Motorola Droid 3] ChaoticWeaponry:
/system/lib/egl/libGLES_android.so

Removing/renaming it makes the phone ALWAYS use the hardware for graphics rendering.
[Motorola Droid 3] beard0:
Hashcode

I didn't see it mentioned so I thought id tell you. I was on 1.04 and went to 1.06. As soon as I did my battery life drained none stop. Android os was taking up 80 or so percent and no matter what I did my phone would die in half a day. I uninstalled 1.06 and went back to 1.04 and it seems to have gone back to. How my battery was like but it may be to soon to tell. I will keep you updated and would love to know why this is happening..could it have something to do with the prosseser that you now enabled in the latest version?

/Droid3
[Motorola Droid 3] ChaoticWeaponry:
The processor thing should have nothing to do with it my friend. If it did, then everyone on stock 5.6.890 or 5.7.894(leak) or a non-safestrap rom would have terrible battery life. My droid lasts me a day and a half with moderate usage. Both with and without safestrap.
[Motorola Droid 3] beard0:
Now that I'm on sage strap 1.04 again it seems like I have good battery life again though. I would love to know why

/Droid3
[Motorola Droid 3] DoubleYouPee:
EHm..how doe safestrap affect battery life?? It's not running after boot?
[Motorola Droid 3] calash:
A quick note on installing/removing and all that fun stuff, since I suffered this last night due to my misunderstanding.

If you install Safestrap on your safe system, then tell it to remove the recover and uninstall the app it will remove it completely from the phone. I had thought, based on some posts, it would not touch the real install on the non-safe system but it did and after a reboot I was in an odd setup where my Safe-system data partition was running on my non-safe system.

If you do end up here it is an easy fix. Reload Safestrap and then go in and do the quick change to the safe system. This does not touch the data partition so you end up getting everything lined back up.

Or just be safe and don't mess with any Safestrap installs on the Safe-system :)
[Motorola Droid 3] beard0:
Idk..all I know is when I ran 1.06 my battery drained non stop and when I went back to 1.04 that seems to havefixed the problem

/Droid3
[Motorola Droid 3] tacosrdelicioso:
Thanks! I remembered what it was after a little while longer haha
[Motorola Droid 3] Phibernaut:
Other ROMs seem to slow at the I/O Quadrant test, CM7 seems to use lower resolution textures in the 3D test. Both could be my imagination, but then again...