Jump to content

  1. 0
  2. 0
  3. 0/5

Rate this Topic

* * * * *
1 votes

[RECOVERY LOCKED] Safestrap Recovery v3.65 [2013-11-13]

  • Please log in to reply

OP Hashcode

Hashcode

Developer

Posted 04 October 2013 - 10:36 PM #1

ATTENTION:  OTAs for 4.4 are being pushed.  Safestrap DOES NOT WORK yet with 4.4 (or SElinux enforcing).    There may not be a way to get it working again.  So please be patient while I do some research.

 

 

*** DISCLAIMER ***
I work on projects that may brick your device. Don't sue me, hate me or try and kill my dog if that happens. I will feel bad, the community will feel bad, and hopefully we'll find a way to get you going again. But, the very nature of my projects involves a certain amount of risk taken by YOU. And by using the projects that I work on, you've accepted that fact.

CURRENTLY THERE IS A KNOWN ISSUE WHERE IF YOU HAVE ENCRYPTION ENABLED AND INSTALL SS IT BOOTLOOPS. IF YOU FIT THIS DESCRIPTION PLEASE STAY AWAY FROM SAFESTRAP FOR NOW.


CURRENT PROJECT STATUS:
BETA RELEASE
 
KNOWN ISSUES (PLEASE READ CAREFULLY):

  • For locked users: there is a process that happens when you click "Reboot Recovery" from the APK or use the "Recovery" button during the splash screen.  Safestrap checks the device for write_protect and if it's enabled will automatically reboot the device to recovery (write_protect disabled) mode.  You will see this as a screen with ORANGE text reading: "PLEASE WAIT THE DEVICE IS REBOOTING TO RECOVERY".  Followed by the bootloader screen again.  You may also see the splashscreen for Safestrap.  If you see the splashscreen hit "Recovery" again.   It's supposed to automatically take you to into recovery, but it doesn't work correctly yet.

WHAT IS SAFESTRAP?

Safestrap is a Bootstrap / Recovery for locked bootloader phones. The goal is to avoid touching your primary system (I'll call this "stock" system) and only flash or make large changes to another place on your phone that Safestrap treats as a "2nd system" (in this case, it's a series of virtual ROM slots located on the internal emmc area: "/sdcard"). Once installed, you will see a "Splashscreen" giving you the option to hit "menu" to enter recovery. The recovery portion of Safestrap is now based on TWRP 2.6.3.0 (a touch based recovery) and you can perform .zip installs, backups and restores here. The additional features I've added to TWRP are mostly located under the "Boot Options" menu:

  • Here you can create virtual ROM-slots (2-3 depending on your internal space size) for flashing ROMs. These ROM-slots allow for 3 different sizes of /data partitions: 1GB, 2GB and 3GB. NOTE: The bigger you make the /data partition the less room you will have to make other ROM-slots.
  • You can activate a new ROM-slot by choosing the slot you wish to make active and then selecting the "Activate" button. Once active, you will see the "rom-slot#" up in the top of the screen shown in green. If you make the "stock" ROM active, then you can see it in the top shown in red.
  • Once a ROM-slot is active, all actions you would normally perform using TWRP are directed to that ROM-slot. For example, "Install" to flash a .zip, backup and restore.

For more information you can read up here:
http://blog.hash-of-...w-to-safestrap/


HOW DO I INSTALL SAFESTRAP?

  • Be Rooted (Look for PWNMYMOTO/RockMyMoto by JCase):
    RockMyMoto: http://rootzwiki.com...-the-first-ota/
    PwnMyMoto: http://rootzwiki.com...-miniultramaxx/
  • Reboot into the Write-Protect Off (recovery) Android OS
  • Make sure in "Settings" -> "Security" you have "Unknown Sources" checked
  • Download the Safestrap APK to your device
  • Find the APK using a Filemanager tool and open it on your device, then click "Install".
  • (If updating from an existing Safestrap you might be warned that this will over-write the existing installation. Click the "Yes" equivalent to this message.)
  • Once installed, open up the Safestrap application as you would any other app.
  • Agree to the disclaimer that you won't try to sue me and hunt me down with a rifle if you manage to break your phone..
  • Then use the "Install Recovery" button. You should see the current version down in the lower left corner of the window. And the "Status:" should say "Installed" when you're done.
  • From there you can reboot and you *should* see a new splash screen during the boot up. While this is showing you can enter Safestrap Recovery using the [ menu ] button.
  • That's it for the installation! Read below for a brief overview of Safestrap Recovery v3.x

 

HOW DO I ENTER RECOVERY?

  • During each reboot a splashscreen will be displayed showing whether the device is running a rom-slot or on the "Stock ROM".   Press "RECOVERY" to enter Safestrap Recovery or "CONTINUE" booting.
  • If you're in a ROM, you can install the Safestrap APK and use the "Reboot Recovery" button.

 

WHAT SHOULD I DO NOW THAT I HAVE CUSTOM RECOVERY?

  • Make a backup while on the STOCK rom slot
  • Create a new rom-slot (and leave it active)
  • Restore your backup to the new rom-slot
  • Flash, tweak, mod, theme till your hearts content

 

DOWNLOADS:
CHOOSE YOUR SAFESTRAP FILE BY MODEL / CARRIER BELOW:
LATEST FILE: Safestrap-XT####-3.65.apk (updated 11/13/2013)
 
ATTENTION: IF UPGRADING FROM v3.62 or EARLIER USE "REMOVE RECOVERY" IN THE APK BEFORE INSTALLING THE NEW VERSION.  I CHANGED THE HIJACK IN v3.63 -- DIFFERENT FILES ARE BEING CHANGED NOW.
 
[XT1060] Verizon Wireless (3.63a):
Mirror 1: http://goo.im/devs/H...0-vzw/safestrap
Mirror 2: http://downloads.cra...0-vzw/safestrap
 
[XT1058] AT&T:
Mirror 1: http://goo.im/devs/H...8-att/safestrap
Mirror 2: http://downloads.cra...8-att/safestrap

[XT1053] TMo and other variants:
Mirror 1: http://goo.im/devs/H...-tmno/safestrap
Mirror 2: http://downloads.cra...3-tmo/safestrap
 
 
As of version 3.6x, Safestrap Recovery is now based on TWRP 2.6.3.x. For more on TWRP you can visit their website: http://www.teamw.in/   Feel free to donate to them.

WARNING: Safestrap is heavily modified to be "Safe" for your device. Do not download TWRP from their website and expect it to work the same way. Also TWRP does not support Safestrap, tho some issues that may come up will be TWRP dependant, please try and contact myself or look on the forums for your device for answers before hunting down TWRP people. They won't be able to help w/ Safestrap specific questions.



For the purposes of direct user testing I've established a channel on freenode.net IRC: #safestrap
I'm in the channel mostly all the time, but may not be active for discussion.   Etiquette note: Not everyone in the channel will have the same device.  Be kind and courteous.

 
Contributors
Hashcode (Safestrap), DeesTroy & TeamWin for such an awesome recovery in TWRP.


Edited by Hashcode, 19 November 2013 - 11:11 AM.

  • 20 Likes

OP Hashcode

Hashcode

Developer

Posted 04 October 2013 - 10:36 PM #2

SCREENSHOTS (not necessarily from a Moto X):

 

 

Attached Thumbnails

  • ss-3.50-01-main.png
  • ss-3.50-02-choose-romslot.png
  • ss-3.50-03-create-romslot.png
  • background-safe.png
  • background-nonsafe.png
  • background-reboot.png

Edited by Hashcode, 04 October 2013 - 11:04 PM.

  • 7 Likes

OP Hashcode

Hashcode

Developer

Posted 04 October 2013 - 10:36 PM #3

FREQUENTLY ASKED QUESTIONS:

  • What size of /data slot should I make?   1GB for testing, 2GB as a small daily ROM and 3GB for a decent heavy use daily ROM.
  • Why does "Settings" -> "Storage" only show 1-3GB total?  Where's my other space?!   It's there, but the shared "Internal SD card" space is mounted in a way that the total isn't calculated correctly.   Try not to let this bother you.
  • Can I flash the "Stock" ROM?  I always recommend "No."  And the main reason for that is: untested.   If you flash to your stock slot please don't complain about issues or other oddness.   You can bring up valid "bug"-like behaviour, just no whining please.

Edited by Hashcode, 06 October 2013 - 12:54 AM.

  • 5 Likes

OP Hashcode

Hashcode

Developer

Posted 04 October 2013 - 10:45 PM #4

WHAT DID IT TAKE TO GET SAFESTRAP ON THE NEW MOTOROLA'S (MOTO X/ULTRA/MAXX):

  • First, this was probably the hardest hijack I've ever worked on.  It's complicated by so many different issues, I felt the need to outline them in a single post.
  • F2FS: This is a new filesystem used by Motorola for the /data partition.  This isn't EXT4 like your Grandma's smartphone.  It's a "built-from-the-ground-up" filesystem designed for emmc / flash devices.   It doesn't use sdcard emulation for turning the /data/media mount space into something that looks/acts like an internal sdcard.  The kernel driver has built-in emulation.  Anyway, it's a pain in the ass to work with as well for using the same space across multiple ROMs.  So I had to fudge back in the emulation on rom-slots.
  • Write-Protection handling: I added a process which checks the write_protect status during a recovery entry and will reboot the phone automatically to recovery (write protect disable) mode if needed.
  • The MotoX has some odd start up binaries.  One of them is started the second the /system is mounted by the locked ramdisk.  I found out the hard way that you don't want to kill off this binary in mid firmware load.  Modem needs quite a while to straighten itself out.   So there's a work around done to the stock /system which puts this binary on hold and attempts to start it after the hijack check.  (THIS DOESN'T WORK RIGHT YET AND IS A WIP)
  • There's a complicated set of translations done to the ramdisk "on-the-fly" so that we can backup the stock partition and restore it to a rom-slot for themeing, etc.  This took quite a while to work out correctly.
  • Blah blah usual troubleshooting junk for getting a device up and running.

 

Anyway, fun times.


Edited by Hashcode, 04 October 2013 - 10:55 PM.

  • 9 Likes

OP Hashcode

Hashcode

Developer

Posted 04 October 2013 - 10:45 PM #5

UPCOMING FEATURES:

  • Changeable sizing on the partitions for rom-slots.   Say you don't want a 1GB /system or you want a 2.5GB /data.  OK!
  • Automated handing of stock kernel modules.  Newer devices (Like the MotoX) have a sha1sum verification process which only allows for using the stock kernel modules that go w/ the device.  TO that end, Safestrap will automatically move them in after any flash or nand restore to avoid conflicts.
  • Virtual "boot" partitions for holding ramdisks (and potentially kexec kernels).  So, when flashing ROMs, they won't have to have any special /system/etc/rootfs folders like we have currently on other devices.   Just the regular boot.img like normal.    After the flash is done, that boot.img will be extracted and repacked with the info SS needs to boot it on whatever slot you flashed it to.
  • Looking to add OTG drives into recovery for backing up / restoring from directly.  Saving room on the internal space.

Edited by Hashcode, 04 October 2013 - 11:12 PM.

  • 7 Likes

j2cool

j2cool

Forum Hopper

Posted 05 October 2013 - 01:10 AM #6

So I've just tried this, and I'm not sure if it had something to do with the APK, or something else, but once I installed the recovery, I have rebooted, did not get a splash screen with the options like I should have, and am now in the OS with no phone, data or wifi, apparently.

 

Since I have no phone/data, I'm assuming something worked, since that's an expected issue. But somehow, the drivers for the phone seem to have been deleted? I'm not even sure how that happened. I had just used adb reboot recovery right before the install to get to write_protect off mode, so I'm not sure what went wrong. Rebooting to recovery does not bring up safestrap splash, and I have no data or connection to the computer at the moment. I'm not sure where to go from here, or what I did wrong.

 

I have the VZW model Moto X, consumer (locked) edition. Any help would be greatly appreciated.

 

EDIT: Wifi seems to have randomly started working again. Maybe it's only tangentially connected to this whole thing.

 

EDIT 2: Was able to reinstate the ADB driver manually, still no MTP connection.


Edited by j2cool, 05 October 2013 - 01:30 AM.

  • 1 Likes

Posted Image


bhundven

bhundven

Code Junky

Posted 05 October 2013 - 01:28 AM #7

Epic! Keep up the good work!
I'm gonna wait to see how public testing goes. ;)

Sent from my XT1058 using Tapatalk 4


  • 0 Likes

xlightwaverx

xlightwaverx

Average Android

Posted 05 October 2013 - 03:07 AM #8

HighSpeed GigaBit Mirror Added:

 

http://downloads.cra...ashcode0f/motox

 

Keep up the great work hashcode0f!


  • 1 Likes

GTalk/Email: xlightwaverx[@]gmail.com

x4_logo.png.pagespeed.ic.voMTetxHpH.png

 

 


shane1

shane1

Android Beginner

Posted 05 October 2013 - 05:05 AM #9

Installs no problem but I'm having the same issue of not being able to get into safestrap. Phone boots and looses service and says its installed.
  • 0 Likes

dmbfan13

dmbfan13

Average Android

  • 154 posts

Posted 05 October 2013 - 07:00 AM #10

Very interested in this...I think I'll wait till I know everything is working as it is intedned.

 

Nice work Hashcode!


  • 0 Likes