[BOOTSTRAP] Custom Safestrap v1.08f Released - 4-16-2012

186 posts
Thanks Meter: 134
By Rick#2, Senior Member on 24th December 2011, 12:37 AM
Post Reply Email Thread
Huge thanks to Hashcode for all his hard work thus far, what with the totally ingenious Safestrap and his latest victories with CM9. I hope this helps somebody out and that at least *someone* out there thinks this is as cool as I do.

Pushing OK+Backspace will force the console to kick you out back into the recovery, in case you get stuck. Keep in mind that the console is pretty powerful but also really dangerous if you don't know exactly what you're doing. Although, you'll never learn how to do anything awesome unless you get your hands dirty.

The Microphone button is now ESC, command history works, tab-autocompletion works via either the hardware Tab key or by pushing OK+i, and you can scroll back up through the text one line at at time with Alt+Up or Alt+Down or in chunks of 8 lines with Shift+Up and Shift+Down. Home is the home softkey, or the Search button on the keyboard, and End is the Power button. You could also push OK+A or OK+E for Home and End, respectively.

Make sure you uninstall Safestrap and then remove the application before you install this one. I just jacked Hashcode's .apk and stuffed my new binaries inside the .zips, if you don't want to bother with uninstalling and reinstalling the .apk, you can extract the recovery.zip and 2nd-init.zip from the archive and push them both to /system/etc/safestrap and reboot. Enjoy.

.................................................. ............

EDIT: I finally got my act together and put my modified sources on github:


EDIT: Just finished up my latest update to this branch of Hashcode/Koush's work. Added:

-Use numbers on the hardware keyboard to select menu entries. Got really tired of scrolling around and thought this would make things a bit quicker.

-Scrolling/repeating keys. Holding in for longer than about half a second will repeat even faster now, similar to a real terminal on a PC for instance.

-vim statically compiled to avoid the need for any external libs (ie: having /system or /systemorig mounted). Full color support and syntax is working great now; the only thing missing is background colors, which will be tricky to implement.

-a $HOME directory is now made at /emmc/safestrap/home. This is set up when the .apk is installed; it isn't necessary so it can be deleted if you want, but it is required if you want to have a persistent command history in bash as well as the ability to customize your .bashrc and .vimrc files. Most of you won't really know what this means, but if you do you'll probably appreciate it.

-Revamped all the menus and made everything look a little cooler. Let me know what you guys think! I got rid of the highlighting box that shows which menu entry is currently selected and changed it to simply highlight the text in white to distinguish from the green/yellow menus; I think it's a little easier on the eyes but some feedback would be cool. It wouldn't be very hard to allow the users to customize the menu colours themselves via external files placed on the sdcard/through a menu option.

-Fixed the issue some people were having with restoring to /systemorig; there aren't any more issues mounting/unmounting /systemorig or /system during a restore

-Probably many more things I've forgotten

-.bashrc tweaks, fixed a few aliases, nothing major

-You can flash updates from either safe or non-safe mode now, look in the advanced menu. Really though, be careful and remember to make backups of your /systemorig partitions. Don't say I didn't warn you! Guaranteed, someone out there will complain that they broke their phone so I was pretty hesitant to let that out in the wild, but I know I've found myself in the situation where I could've used it so there you have it.

Let me know if anyone finds any issues, I've done a pretty thorough job testing this over the last few weeks but there's always something to be missed. The new .apk is over the size limit to be posted in the forum due to the new bash and vim binaries and the vim runtime files, so you can download the new version from my dropbox here:

Safestrap (Tweaked) v1.08e for Droid 3


Just finished thoroughly testing my latest release and think it's ready for human consumption! Another batch of sweet additions:

1) Proper implementation of /systemorig flashing while in non-safe mode... without any modifications needed to the updater-script present in any flashable zip. Even if the updater-script inside the. zip file you are flashing targets "/system", if you confirm it about three times in non-safe mode it will know to copy the files onto /systemorig to replace your stock system.

You can install Gingerbread-based ROMs such as MavROM 3.5 to the stock /system partition while in non-safe mode via the Advanced menu. Safestrap will backup and afterwards restore it's own files needed to ensure you can still get back in after a flash of the /systemorig partition. Note that flashing your original /system partition with an ICS ROM won't work yet because they need custom init.*.rc scripts in place during the 2nd-init process; this isn't hard to do but I was getting anxious to get something out so it'll have to wait until next time.

2) Redesign of the layout for the menus, much more organized

/* 3) Allow for rebooting directly into the recovery, either via the shell command "reboot recovery" or through the Reboot Menu */
// EDIT: Seemed to be causing some users to persistently boot straight into the recovery so on the backburner for now

4) Allow for custom colors for either safe or non-safe mode; to change the colors for now you have to execute a few little shell commands. Here's an example to change safe mode colors to a blue-grey and then non-safe mode colors to maroon:

s_rgb 139 137 137
ns_rgb 127 34 10
Basically, "s_rgb" sets the colors for safe-mode and the three arguments (139 137 137 in the above example) are the codes for the red, green and blue components of the end result; you can look up rgb color codes for your own custom colors. "ns_rgb" is the command for non-safe colors. "cc" just tells the recovery to update the colors to whatever they've been changed to. If you don't like what you've done and just want to revert back to the stock ones, you can just wipe your /cache partition and they'll go back to normal.

Eventually I thought it'd be cool to be able to do this via the recovery UI but I haven't been able to envision how it would work yet.

5) Added background colors/highlighting in the console now, makes vim look a lot prettier. If there's anyone out there who cares, I preinstalled a few plugins (MiniBufExplorer, MRU (most recently used files), bash-style path completion, etc.)

Also, changed the cursor from the big ol' ugly white block to an easier-on-the-eyes one-character underline.

Yeah, it's overboard.

6) Much faster backups and somewhat quicker restores now. I clocked full backups (including /systemorig and ~350mb /data partition) at around 2 mins and full restores at around 7 minutes. Also fixed up the progress bars so they give a more accurate representation of how much longer the backup/restore will be.

7) Moved $HOME and other misc. Safestrap files to /cache instead of the /sdcard

8) Probably half a dozen other OCD details that I've already forgotten.

Test it out and let me know what you guys think!

As always, sources are posted on my github:


You can get the new .apk here:

Safestrap (Tweaked) 1.08f for Droid 3
Attached Files
File Type: apk Droid3Safestrap-1.08c.apk - [Click for QR Code] (4.59 MB, 1184 views)
File Type: apk Droid3_Safestrap_Tweaked_v1.08d.apk - [Click for QR Code] (4.86 MB, 1388 views)
The Following 19 Users Say Thank You to Rick#2 For This Useful Post: [ View ] Gift Rick#2 Ad-Free
24th December 2011, 03:20 AM |#2  
oostah's Avatar
Senior Member
Flag Cullowhee
Thanks Meter: 130
Donate to Me
i need this about 6 hrs ago lol.
24th December 2011, 12:42 PM |#3  
somemadcaaant's Avatar
Senior Member
Thanks Meter: 367
Quite useful mate cheers.

24th December 2011, 02:22 PM |#4  
mvp3's Avatar
Senior Member
Flag La La Land
Thanks Meter: 44
Thank you so much for sharing this file. Your work is greatly appreciated.
24th December 2011, 04:48 PM |#5  
ovelayer's Avatar
Senior Member
Flag spokane
Thanks Meter: 365
This is a nice little(big)addition to safestrap! Thanks for adding it in!
24th December 2011, 09:35 PM |#6  
rynosaur's Avatar
Senior Member
Flag Dekalb
Thanks Meter: 28
Donate to Me
I can't think of any better use for Christmas Eve than coding a bash console into recovery! Merry Christmas to the D3! Thank You!
25th December 2011, 09:20 AM |#7  
Flag Hà Nội
Thanks Meter: 6
Sounds good. I haven't grabbed it yet (as I need to keep my own customised Safestrap for ME863 nandroid support) but one thing I'd note is that the "OK" button (i.e. trackball click) is used for "Control" in Console+, and the console in Amon_RA's HTC Dream recovery. That saves you losing the @^ key.

Edit: Also: Source? Sounds like something that could be pushed upstream. I always found the console in Amon_RA's recovery very useful, missed it on my current device, when I didn't have a computer with ADB handy.
25th December 2011, 07:24 PM |#8  
OP Senior Member
Flag St. Albert
Thanks Meter: 134

I have an XT860, so I'm curious to see if this would work on your ME863. I remember seeing a post of yours a few months ago mentioning issues with the preinstall and data partitions (I think it seemed that the data partition was extended into the first bytes of the preinstall partition, rendering it unmountable during init) that should also have affected the XT860, but I have never experienced any issues with the partitions since Hashcode released v1.06.

I'll commit my sources to github shortly so you have take a look.
8th January 2012, 09:33 PM |#9  
Thanks Meter: 10
I am trying to get through the preinstall problem myself after flahing xt883 and I was wondering if I could fix it with this?

Sent from my DROID3 using xda premium
8th January 2012, 11:56 PM |#10  
Senior Member
Flag PA
Thanks Meter: 87
Hey there guys, Village Idiot here...I've been successfully using Hash's SafeStrap for a while now and wanted to try this one out. What's the difference here? Just by looking at it, I can't tell. It seems better from what everyone is saying, but I have no idea how to utilize it. Would you mind dumbing it down for Simple Jack over here? Thanks.
9th January 2012, 12:05 AM |#11  
Endoroid's Avatar
Senior Member
Flag Surrey
Thanks Meter: 314
Originally Posted by redsox985

Hey there guys, Village Idiot here...I've been successfully using Hash's SafeStrap for a while now and wanted to try this one out. What's the difference here? Just by looking at it, I can't tell. It seems better from what everyone is saying, but I have no idea how to utilize it. Would you mind dumbing it down for Simple Jack over here? Thanks.

It has a console option included, allowing you to run shell commands, which could potentially save your butt if used right.

Otherwise it the same

Sent from my XT860 using xda premium
The Following User Says Thank You to Endoroid For This Useful Post: [ View ] Gift Endoroid Ad-Free
Post Reply Subscribe to Thread


Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes