[Verizon Samsung Galaxy S 4] npjohnson:
Hey All!

MODERATORS: Please change the name of this thread to "[ROOT] [RECOVERY] [ODIN] [APK] All-in-One Guide" and maybe sticky it? (:

Before Reading this guide, check your Bootloader version in Settings ==> about this phone, it looks like VRUFxxx, if on MDK, go here NOW http://xdaforums.com/showthread.php?t=2292112, this guide uses CWM recovery, but there are others, just google either "PhilZ touch Recovery Galaxy S4 Verizon Loki" or "TWRP Recovery Galaxy S4 Verizon Loki" if you don't like CWM.

If on any other bootloader, Flash the MK2 Full-Wipe Tar (below in the ODIN section) if you want to run 4.3 Jellybean ROMS, or NC5 Full-Wipe Tar if you want to run 4.4.x Kitkat ROMs

MAJOR EDIT - SafeStrap can now boot (very few) Google Edition (AOSP) ROMs!!! After getting SafeStrap 3.72 installed, SELinux set to Permissive, and your bootloader on NC5, you can wipe /data /system and /cache (as well as dalvik-cache), the Google Edition ROM linked later in the thread under the SafeStrap Compatible ROMs Section, and of course flash either NC2 Modules or NC5 Modules depending on your bootloader version.

ROOT

To begin I didn't create this, Geohot (George Hotz) did, I am just sharing it with this forum and creating a discussion type post for it, as not to junk up the initial thread.

It exploits CVE-2014-315, which exists in all Kitkat 4.4.2 (and Nexus 4.4.3) devices. This will work on all 4.4.2 (and some 4.4.3) devices as long as they don't have /system write protection (Like newer Moto and HTC phones...)

This was originally thought to be a useless vulnerability due to the fact that when exploited it only gave access to a remote root shell for ~15 seconds before SELinux implementations kick on and kill it, or in most cases it causes the system to reboot upon exploitation (I still don't understand why this happened...?)

Geohot however, found a way to shape this vulnerability into the amazing exploit TowelRoot. It comes in the form of an installable APK

Prerequisites: Enabled Unknown sources in settings

1. Navigate to http://towelroot.com

2. Click the lambda (the greek letter) or download here https://www.dropbox.com/s/71a7e8wdscbdd0t/tr.apk

3. Open the APK file and click install

4. Follow on-screen prompts

Now you can either use SafeStrap which can flash mods/zips/ROMs:

SafeStrap Method

Note: SafeStrap doesn't work with encryption turned on (disabled by default). If you don't know if you don't have encryption on/your phone isn't a business phone (in which case you shouldn't be doing this!!!) then you most likely don't have encryption on!!

5. Use this app to change your SELinux mode to "Permissive" https://play.google.com/store/apps/details?id=com.mrbimc.selinux, this is required to use SafeStrap

6. Install SafeStrap 3.72 APK from this thread http://xdaforums.com/showthread.php?t=2448925, NOT 3.71 FROM THE VERIZON THREAD!!! Then click install in the SafeStrap App

7. Flash http://download.chainfire.eu/451/SuperSU/UPDATE-SuperSU-v2.01.zip, this step is NOT OPTIONAL, without this file, your SU Binaries will not update!!! (This is important!). Do this by rebooting your phone and clicking "recovery" when safestrap prompts you, then clicking "install" and selecting the /zip linked above, then swiping to flash, and rebooting.

Normal Method

5. Download http://download.chainfire.eu/451/SuperSU/UPDATE-SuperSU-v2.01.zip

6. Use ES File Explorer https://play.google.com/store/apps/details?id=com.estrongs.android.pop and unzip the file

7. Open the /common folder in the unzipped file, and copy the SuperUser.apk to the /system/app/ folder in the root of the phone, confirm any SuperUser Access requests at this point

8. Reboot

9. Open SuperSU and under the settings tab, update your SU Binary

10. Profit

TWEAKS

(Optional)

10. Flash http://www.androidfilehost.com/?fid=23487008491962487 in SafeStrap to enable wifi tethering

11. Use https://play.google.com/store/apps/details?id=com.bitcubate.root.busybox.complete to update to the newest version of BusyBox (The more popular BusyBox apps wouldn't work for me/ didn't have the newest version)

SAFESTRAP NOTES/HOW TO

- Have Wifi/Data/Bluetooth issues? Flash NC5 Modules and wifi fix:http://www.androidfilehost.com/?fid=23487008491963692

- Still have Wifi/Data/Bluetooth issues after NC5 Modules? Wipe clean and ref lash your ROM and this time try the NC2 Modules and wifi fix:http://www.androidfilehost.com/?fid=23487008491963696

- We CANNOT just flash a custom recovery, our bootloader is locked, and won't be unlock in the foreseeable future, we have to use SafeStrap instead

- To flash a ROM, reboot the phone, and click the menu button during boot up to get to SafeStrap, go to "Mount" ==> Check /System, leave the others checked

Then go back to the menu, go to "Wipe" ==> /System and swipe to wipe, you do not have to wipe /data, but it is strongly recommended (But this WILL wipe your data!!!)

The go back to menu, click "Install" select you ROM's .zip file AND SuperSU 1.99v4.zip to be safe

- You cannot use ROM Slots because this version of SafeStrap is made for the ATT S4, because of that we have some incompatibilities, you can only install to the "Stock" Slot

-

BEWARE

of flashing a Custom ROM and wiping /system, because if wipe /system,

YOU ARE ERASING SAFESTRAP

, if you flash a ROM that doesn't boot/is incompatible, you will have to ODIN back to stock!!!

- On a similar note, don't just flash a new ROM over your current ROM without wiping /system, as "dirty" flashing never ends well

- Most ATT SafeStrap 4.4.2/3 ROM work on the Verizon version, just a matter of testing them!!!

ROMS THAT ARE CURRENTLY COMPATIBLE WITH SAFESTRAP 3.72

Pre-Rooted 4.4.2 - Removes BloatWare stuff and implements the features from the International version that Verizon removed http://www.androidfilehost.com/?fid=23329332407590564

Google Edition ROM (TW Kernel) Option 1 - Google Edition ROM that

IS

compatible with SafeStrap, although not everything works... I know it says ATT, but I have tested and it works on verizon[/B]http://xdaforums.com/showthread.php?t=2767026

Google Edition AOSP (TW Kernel) Option 2 - Madre de Dios.... Google Edition for Safestrap, who'd of thunk. It is the latest 4.4.4 and everything except for MTP Mode (file transfer), and Wifi is touchy... but who cares, AOSP!!! http://www.livewinter.com/mirror/get_file.php?id=30

BlackBox - An AOSP themed ROM that keeps many Samsung features, just google "BlackBox ROM S4 for a list of features/screenshots http://www.androidfilehost.com/?fid=23501681358541454

HyperDrive RLS 16.1 - TouchWiz S5/Note 3 with many awesome baked in features http://xdaforums.com/showthread.php?t=2301724

Purified ROM - AOSP Themed with custom toggles http://xdaforums.com/showthread.php?t=2759811

gDux - Highly Customized TouchWiz/AOSP, hard to explain, but really cool!!! http://xdaforums.com/showthread.php?t=2759786

Blue Chrome Edition - Googlie made this.... I don't know anything about it, wanna describe it [MENTION=2257191]googlie[/MENTION]? http://www.androidfilehost.com/?fid=23329332407588272

PhoeniX ROM V8.0.1 - Strongly tweaked ROM based on TouchWiz, again just google "PhoeniX ROM S4" for description/screenies http://www.androidfilehost.com/?fid=23501681358541455

FoxHound ROM - One of the best ports I've found around, there are so many options that no 2 installs of Foxhound are the same, you could live with just raflashing different options of this ROM and be happy for a long time...http://www.androidfilehost.com/?fid=23487008491966537

Baja ROM - AOSP/TouchWiz Hybrid http://xdaforums.com/showthread.php?t=2696872

Echoe ROM - First 4.4.2 TouchWiz ROM made for out phone, very stable/stock-ish with some added features http://xdaforums.com/showthread.php?t=2702592

Eclipse - My personal favorite!!! My daily runner. Best Google themed TW ROM that exists in my opinionhttp://xdaforums.com/showthread.php?t=2351840

This is a link to [MENTION=2257191]googlie[/MENTION]s downloads folder in case anybody wants it, there are some work in progress ROMs and ROM backups (.rar files,) you can check out in there, to use those just unRAR them into you SafeStrap folder on you SD Card, and then restore the backup in SafeStrap

HOW TO BOOT TO RECOVERY/DOWNLOAD MODE

Stock Recovery Mode = Hold Volume Up + Home Button + Power until it buzzes, then release the power button

Download/ODIN Mode = Hold Volume Down until it buzzes and when prompted push volume up to accept

SafeStrap Recovery = "Reboot to Recovery" buttoning the SafeStrap app does not work, instead turn the phone off and turn it back on, then push the menu button after the Samsung Screen goes away

Note - If you see a "Samsung Custom" screen with an unlocked padlock, it doesn't mean you have an unlocked bootloader!!! Don't get your hopes up, it just means that the phone is customized software wize.

ODIN GUIDE

ODIN is a program used to return Samsung phones to stock, it provides many ways to restore the different partitions of the phone;

F. Reset Time - Doesn't ever hurt anything, usually recommended/necessary, but I am not completely sure what it does?

Auto Reboot - Check unless you plan on flashing multiple files before reboot (not recommended)

PIT File - Necessary when completely repartitioning the phone, in most cases will wipe the whole phone clean (excluding [MENTION=2257191]googlie[/MENTION]s/@Surge1223s guide to downgrade from NC5), it is a partition table template. Comes in the form of a .PIT file.

BL (Called Bootloader in older versions of ODIN) - Restores Bootloader, don't jack with this unless you know what you are doing, you cannot flash any bootloader lower than the on you are currently on! Ex. NC5 ==> MDK won't work, there are some small exceptions like [MENTION=2257191]googlie[/MENTION]s NC5 ==> MK2 Downgrade, this was only possible due to the NC2 leak that allows downgrades. These files must be signed by Samsung. Comes in the form of a .tar file

AP (Called PDA in older versions of ODIN) - Restores to /System, doesn't Wipe it, just overwrites if necessary. Comes in the form of a .tar file

CP - (Called Phone/Modem in older versions of ODIN) - Restores Modem, wipes it and overwrites with new version. Comes in the form of a .tar file

CSC - (Called Cache in older versions of ODIN) - Restores to /Cache, wipes it and overwrites with new version. Comes in the form of a .tar file

UMS - I am unsure... Anyone? Possibly custom file flashing for Developer editions...?

ODIN 3.09 - Stock ODIN program, used in ALL cases except downgradeshttps://www.dropbox.com/s/b1kjainbic4iloo/Odin_v3.09.zip

ODIN 3.10 - made by [MENTION=2257191]googlie[/MENTION] I believe? Used in his guide for downgrading http://www.androidfilehost.com/?fid=23329332407587822

NC5 No-Wipe and Full-Wipe Tars - No-Wipe (Use in most cases) will leave your data in tact but restore /system to stock, Full-Wipe restores everything to stockhttp://xdaforums.com/showthread.php?t=2735172

MK2 No-Wipe and Full-Wipe Tars - http://xdaforums.com/showthread.php?t=2578209

MDK Full-Wipe Tar (If anyone has a link to a No-Wipe, please post it) - http://xdaforums.com/showthread.php?t=2289325

HOW TO RUN 4.3 ROMS IF ON NC5/NC2

This is made for NC5 phones, but will also work on NC2 and allow you to retain the NC2 Bootloader. If you don't know if you are on NC2, THEN YOU ARE NOT, very few people are on NC2, and those that are are there because they know what they are doing (hopefully).

If you want to run 4.3 ROMS in SafeStrap unRAR this file and place it in the AP slot of ODIN (credits to [MENTION=2257191]googlie[/MENTION]) http://www.androidfilehost.com/?fid=23501681358537591, then reboot to stock recovery and wipe data and cache, then reboot and use SafeRoot to Root http://xdaforums.com/showthread.php?t=2565758 and install SafeStrap 3.71 from here http://xdaforums.com/showthread.php?t=2441441 and finally flash your 4.3 ROM found here: http://xdaforums.com/show....php?t=2630040

If you have issues, flash the different fixes (Wifi, Voice, Data, etc.) from this thread http://xdaforums.com/showpost.php?p=51955929 in SafeStrap, READ WHAT THEY ARE BEFORE FLASHING

SAMSUNG KNOX

To disable/remove KNOX from stock ROMs:

Download: To Disable: Titanium Backup https://play.google.com/store/apps/details?id=com.keramidas.TitaniumBackup

To remove completely use RootAppDelete https://play.google.com/store/apps/details?id=zsj.android.uninstall, use Pro mode within the app when it asks

Open the app that you downloaded above (either one depending on your choice) Tap the search button and type ‘Knox’ and you’ll get the list of all the files named as knox.

Freeze/Remove (Pro-Mode) the following using titanium backup/RootAppDelete, to find them just search "KNOX"

Delete/Freeze

com.sec.enterprise.knox.attestation

com.sec.knox.eventsmanager

KLMS Agent

KNOX

Knox Notification Manager

KNOX Store

I will be updating this thread as more comes out.

Please refrain from asking stupid questions like "It wonnnnn't boot?" and "Why it no work?", give a good question, and we will give a good answer.

Have Fun!!! :p

Edit: Added Dropbox Mirror (because some people are having issues with the TowelRoot site... maybe overloaded? XD )

Edit 2: I added a WHOLE lot to this thread and converted it to an All-in-One type guide, hope you enjoy