[RECOVERY LOCKED/ME7] Safestrap Recovery v3.62 [WIP DISCUSSION]

Hashcode

Senior Recognized Developer
Sep 3, 2011
3,426
23,731
263
CURRENTLY THERE IS AN UNKNOWN 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 STATUS:
Testing ROM boot from virtual slots
(See Post #2)


CURRENT TESTS:
TEST #1: Hijack stability to enter recovery on every boot. RESULT: PASS
TEST #2: Reboot to recovery functionality RESULT: PASS
TEST #3: Recovery removal leaves device in clean state RESULT: FAIL
TEST #4: ADB access from recovery RESULT: PASS
TEST #5: ROM-slot creation RESULT: PASS
TEST #6: Backup stock ROM RESULT: PASS
TEST #7: Restore stock ROM RESULT: PASS
TEST #8: Initial 2nd-init ROM installation on rom-slot RESULT: PASS


Hello my name is Hashcode and I'm developing a new version of Safestrap for the locked versions of the Samsung Galaxy S4.

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.

This thread will initially serve as discussion and status updates regarding my progress and then later turn into a support thread where community members can support each other as needed.

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.1.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:

  1. Here you can create virtual ROM-slots (up to 4) 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.
  2. 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.
  3. 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.

HOW DO I INSTALL SAFESTRAP?

  1. Download the Safestrap APK (when it's ready).
  2. Find the APK using a Filemanager tool and open it on your device, then click “Install”.
  3. (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.)
  4. Once installed, open up the Safestrap application as you would any other app.
  5. 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..
  6. 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.
  7. 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.
  8. That’s it for the installation! Read below for a brief overview of Safestrap Recovery v3.x

SAFESTRAP RECOVERY (v3):

As of version 3.5x, Safestrap Recovery is now based on TWRP 2.6.1.x. For more on TWRP you can visit their website: http://www.teamw.in/

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.

MAIN MENU:

  • Boot Options: This area is for managing your virtual ROM-slots. You create a new ROM-slot by clicking on one and if it doesn’t exist you will be prompted to create it. Follow the on-screen guides. Once a ROM-slot is created you select that slot to activate or delete it. Under each ROM slot (once created) you can:
    • Activate: Makes the chosen ROM-slot the “current” one, where almost all of the features of TWRP affect that slot. This will also be the ROM that is booted.
    • Set Nickname: For convenience you can set a small name for each ROM-slot. This is limited to 10 characters as it will eventually be added to the beginning of backup names. This name is shown on the ROM-slot button once it is set.
    • Check FS: This performs a file system checks on the ROM-slot and fixes any errors found.
    • Delete: Delete the ROM-slot files (disabled if the ROM is active — please choose another ROM-slot to activate and then come back) USE WITH CAUTION, THERE’S NO GETTING THESE BACK UNLESS YOU HAVE BACKUPS.
  • Install: This is for flashing a .zip file to the currently active system. Currently, this is disabled for the stock system. In a future release I will enable flashing to the stock system.
  • Backup / Restore: This should be self-explanitory, but you use these options for making backups of the currently selected system. Or restoring a previously made backup to the currently selected system (regardless of where you backed it up from). DON’T RESTORE A CUSTOM ROM-SLOT BACKUP TO THE STOCK ROM. THIS WILL MOST LIKELY BRICK YOUR PHONE.
  • Mount: You can manually manage mounts here. NOTE: the “system”, “data” and “cache” mounts will use the currently selected ROM-slot.
  • Wipe: Manually erase portions of the device. NOTE: You only have 1 internal and 1 external SD card. These are not “virtual” if you erase them. They are gone. Use with caution. Wiping the “system” when “stock” ROM is selected will try and keep the Safestrap hijack in place.
  • Advanced:
    • Copy Log to SD: Experienced something odd and want to report it? DO THIS and include the log when you send me the report. Otherwise, the recovery.log will disappear when you reboot.
    • Fix Permissions: This can fix up ROMs which are displaying odd force close issues, etc. You will probably never need to do this.
    • Partition SD Card: You can add ext3 partitions to the external SD card if you want. I’m not sure we have much of a need for this on our devices.
    • File Manager: This works like any other file manager inside Android. You can thank the TWRP people for this, because it is quite possibly one of the best features I’ve ever seen in a recovery.
    • Terminal Command: Also very handy for those once in a while moments when you have to do something via terminal but don’t have adb handy. USE WITH CAUTION
    • Settings:
      • Here you can turn on and off signature verification of .zip files
      • Force MD5 sum checks on .zip files prior to flashing
      • “Use rm -rf instead of formatting” this may or may not be checked in Safestrap, but the key partitions which are signed and cannot be truely formatted will automatically use this feature
      • There are a few other checkbox options in here. Please know what you are doing.
      • Simulate most actions for theme testing. If you have this checked, Safestrap/TWRP will not perform most actions but show the dialog boxes so you can review theme elements. If you turn this on, it STAYS ON till you turn it off. And will show “SIMULATING ACTIONS” up top.
      • Set the Time Zone (use “Set Time Zone” button after choosing which time zone you want)
      • Restore Defaults. Use this to reset all options back to default as it came when you installed for the first time. Does not erase backups or ROM-slots, tho it might change the active slot.
  • Reboot: Choose from 2 options for rebooting “System” which performs a reset/reboot of the device and “Power Off” which turns the device off.
 

Attachments

Last edited:

Hashcode

Senior Recognized Developer
Sep 3, 2011
3,426
23,731
263
CURRENTLY THERE IS AN UNKNOWN ISSUE WHERE IF YOU HAVE ENCRYPTION ENABLED AND INSTALL SS IT BOOTLOOPS. IF YOU FIT THIS DESCRIPTION PLEASE STAY AWAY FROM SAFESTRAP FOR NOW.

BE WARNED: INITIAL TESTS CAN BE BUGGY AND CAN CAUSE YOUR STOCK INSTALLATION TO BE SCREWED UP. ONLY ADVANCED TESTERS SHOULD TRY THE FOLLOWING TESTS.


CURRENT TESTS:
TEST #1: Hijack stability to enter recovery on every boot. RESULT: PASS
TEST #2: Reboot to recovery functionality RESULT: PASS
TEST #3: Recovery removal leaves device in clean state RESULT: FAIL
TEST #4: ADB access from recovery RESULT: PASS
TEST #5: ROM-slot creation RESULT: PASS
TEST #6: Backup stock ROM RESULT: PASS
TEST #7: Restore stock ROM RESULT: PASS
TEST #8: Initial 2nd-init ROM installation on rom-slot RESULT: PASS


ROMS TESTED AS ROM-SLOTS (Means they boot -- not run perfectly):
- BACKUP / RESTORE of STOCK
- GPE ROM: http://forum.xda-developers.com/showthread.php?t=2343355


A NORMAL function of TWRP recovery is to blank the screen after a certain amount of time. By pressing the power button, it should turn the screen back on and show a "slide to unlock" page. The timing for the screen blank can be set under "Advanced" -> "Settings" -> "Screen"
 
Last edited:

trook

Senior Member
Sep 7, 2010
299
140
73
Wildomar Ca
Wow, safestrap has changed a lot since the bionic days. Thank you for everything, whether it works out or not. Thank you. I'm sure you have testers lined up but if you need anything else say the word.

Sent from my SCH-I545 using xda app-developers app
 
Last edited:
  • Like
Reactions: kvl19

Noremacam

Senior Member
Feb 23, 2008
54
8
0
What are the chances of you doing a cwm version or are you working only with twrp?

Sent from my SCH-I545 using Tapatalk 2
Since it requires very heavy modification of twrp, the effort to modify another seems too costly for any perceived benefit.

Sent from my SCH-I545 using XDA Premium 4 mobile app