NOTE: This guide was originally written for CM 13.0 but is in the process of being updated for LineageOS. Except for OS name and version number, the steps should be exactly the same.
The following should work for rooted (instructions on how to do that) Verizon Samsung Galaxy S5s (SM-G900V, kltevzw) running stock Android 5.0 Lollipop and 15 Samsung eMMCs (see Phase 0 to determine whether your S5 satisfies the eMMC requirement). As of this writing, it does not work for S5s with 11 Toshiba eMMCs. Due to the possibility of the bootloader unlock exploit being patched in the Marshmallow update, I’d highly suggest doing this BEFORE updating to any stock Marshmallow OTA.
The steps below can also be long, hard, and frustrating. They will also wipe your phone (SD card included) except for personal files on internal eMMC storage, so make sure everything you need on the card is backed up. Also ensure this is something you really want to do and/or there’s a phone out there you’d actually feel good about buying in case you brick your S5.
The upside is you’ll be getting the latest version of Android long before the official Verizon update, you’ll no longer be trapped in Verizon’s byzantine update process, and you get adoptable storage.
If you get stuck, hit up any of the forum threads linked to at the end of the post for assistance.
Phase 0: Check to see if your phone is supported.
- Install Root Explorer or ES File Exploer/Manager Pro (actually, any file explorer with root access and browsing works).
- Launch Root Explorer and grant it root access.
- Tap the ROOT tab.
- Open the file /sys/block/mmcblk0/device/cid. If the number you see in that file starts with 15, your device is supported and you may continue. If not, you’ll have to wait for a matching exploit.
- Charge your S5 to 100% as some steps involve the phone being completely disconnected from USB.
Phase 1: Download everything you need, install some of them.
- Download and install Flashfire. If that link doesn’t work for you, opt into the testing channel and then try it again.
- Download and install Busybox.
- Open Busybox, tap INSTALL and wait for the process to complete.
- Download SamsungUnlockerS5.apk to your device, but don’t install it yet.
- Download and install the latest Samsung USB drivers on your PC (scroll down to where it says Manuals & Downloads).
- Download the latest Odin archive to your PC and decompress the archive.
- Download the latest TWRP *.img file.
- Download the lastest CyanogenMod 13.0 (CM 13.0) nightly build to your device’s eMMC internal storage.
- Download Open GApps:
- At the webpage above, check the radio buttons for ARM under Platform, 6.0 under Android, and stock under Variant. Flashing this combination later on will give you the same stock Google apps as a Nexus device.
- Click the download icon.
- Transfer Open GApps to your S5’s internal eMMC storage.
- Download the latest firmware (referred to as “baseband” in Settings -> About Phone) for the S5’s radio. Use the latest *non-hlos file under the “Odin” heading here. If your baseband >= what’s listed there, skip this step. If the files are .tar.md5, you will need to extract the .bin files from them using 7-Zip or some other similar utility.
Do not run BlueStacks or any such emulation/virtualization applications on your PC during the unlocking or installation process as it may interfere with Odin’s functionality.
Though you should’t need it for this process, the entire NCG ROM (baseband, etc.) is here. Some commenters have found it useful, so there it is.
Phase 2: Disable reactivation lock.
I put this in its own phase because it’s that important. If reactivation lock is enabled you won’t be able to wipe and reset the phone as needed for this to work.
Follow the instructions for the S5 here.
Phase 3: Flash the new baseband to the S5 using Odin.
This will ensure your phone can connect properly to Verizon’s network.
- Follow Steps 12 to 16 here.
- Click the CP button and select the baseband file.
- Click Open.
- Wait for the messages in the Message window to settle on
- Click Start. Odin will update the S5’s baseband and reboot the phone.
- Upon rebooting, ensure the baseband installation was successful by checking Settings -> About Phone. The last 3 letters of the version number should match those of the firmware you flashed (e.g. PB1).
- You will need to do Steps 1 to 6 above for both modem.bin & NON-HLOS.bin files.
Phase 4: Unlock the bootloader.
This will wipe your SD card. Ensure you’ve backed up anything on it you want to keep before this. It will, however, leave the phone’s eMMC storage untouched.
- Disconnect your phone from any USB power or data source. Be sure to do this or the S5 will relock the bootloader upon rebooting.
- Install SamsungUnlockerS5.
- Launch the above app.
- Grant root access when prompted.
- Tap the Install SamBootloader Unlocker button.
- Grant root access again.
- Wait for the terminal to appear (it may take a minute or 2). Do not do anything else on the phone during this wait time except ensure the screen stays alive.
- When prompted, type
- Hit Enter and wait for the phone to turn off.
- Boot into download mode by pressing Volume Down, Power, and Home buttons simultaneously.
- Press Volume Up at the prompt.
- To confirm the bootloader is unlocked, ensure the line
MODE: DEVELOPERappears on the 3rd to last line in the upper left of the screen. If it doesn’t, repeat steps 1 to 11 again as you probably missed something.
- Turn the phone off, then turn it on again to boot back into stock Lollipop.
This Phase can be tricky. If it doesn’t work the first time:
- Turn the phone off and ensure it’s disconnected from any USB or other power source.
- Remove the battery.
- Wait 30 seconds.
- Put battery back in.
- Turn phone on and boot into stock Android.
- Reinstall BusyBox.
- Reboot the phone into stock Android.
- Install the .apk again.
- Run through the unlock process again.
Phase 5: Move necessary files to root of microSD card.
- Move the CM 13.0 nightly build and Open GApps archives to the root of your microSD card. Note that we didn’t move them earlier as the bootloader unlock would have wiped both files.
Phase 6: Flash the custom TWRP build.
- Open Flashfire (general documentation).
- Tap the floating action button.
- Tap Flash firmware package.
- Select the *klte.img file from Phase 1 Step 7.
- Tap Flash. The S5 will reboot into stock Lollipop.
- Turn the phone off.
- To check whether the recovery flash was successful, press Volume Up, Power, and Home simultaneously. This should boot the S5 into the new recovery environment (ignore any SEAndroid errors as long as booting into recovery is successful).
Phase 7: Install CM 13.0 AND Open GApps.
- Reconnect the phone to a USB power source to ensure there’s no power failure during the installation.
- While still in the recovery environment, follow Steps 7 – 9 here.
- Select the option to add additional zips/packages and add Open GApps to the list. This is important, as firing up CM 13.0 without Google Apps can be a very bad time.
- Swipe to Install both archives as indicated.
And that’s it! After both packages are installed the S5 will then boot into CM 13.0 and you can set it up from there. And because your SIM didn’t change and your baseband is the latest version, you don’t have to worry about reactivating the phone.
Phase 8: Getting started with CM 13.0.
A few pointers to get you up to speed:
- CM 13.0 takes significantly longer to boot than stock Lollipop, though this may be due to my having adoptable storage enabled.
- Root access is managed neatly from within Developer Options, which you enable by following these steps.
- Yes, adoptable storage works beautifully and doesn’t slow the phone down at all.
- Google Camera is absolutely terrible on the S5. Use Camera MX instead.
- Ignore any SIM card errors you see upon booting up, they usually go away once the radio is initialized, which may take a minute. Just be patient.
- You can access the hidden phone info app for troubleshooting by entering *#*#4636#*#* from the dialer.
Phase 9: Backup your CM installation before updating your build.
This is unfortunately tricky due to TWRP’s current tendency to corrupt adoptable storage. Option A below ensures TWRP never (phyiscally) touches your storage – which should (note the emphasis. It’s possible a dirty flash or backup might cause the OS to “forget” the adopted storage, but so far I haven’t seen that happen) provide 100% protection against corruption – while Option B is significantly less safe but doesn’t involve physically pulling the phone apart.
Option A: Remove the microSD card before doing anything.
- Power off the S5.
- Remove microSD card.
- Boot into TWRP.
- Do all the steps below and in Phase 10 with the microSD card omitted.
- Power off the S5 again.
- Put the microSD card back in.
- Reboot into system.
Option B: Follow the below instructions as written instead.
Yes, this is a separate and necessary phase as nightly build bugs can be bad enough to require either restoring a full backup or a clean install to recover from. Seriously. Read the horror story at the link.
CAUTION: There is a semi-known issue with TWRP that it corrupts USB drives if they are connected while the phone is rebooted back to System and corrupts (adopted) SD cards if updates are installed from them.
The workaround for this is to simply avoid doing both: DO NOT install updates directly from the adopted SD card. Install them from Internal Storage only. Do not reboot from TWRP into System with the USB drive connected and/or selected in TWRP or with the SD card selected. ALWAYS reboot to System from TWRP with Internal Storage selected and no USB storage attached.
To backup your phone:
- Get a USB 2.0 OTG cable and 16+ GB USB 2.0+ flash drive with nothing else on it.
- (ExFAT) format the drive by 1 of:
- Using the PC instructions here.
- Connecting it to the S5 via the OTG cable and going to Settings -> Storage & USB.
- Tap the notification that appears when the drive is connected.
- Reboot into recovery.
- Connect the OTG cable and drive to the S5.
- Tap Backup.
- Tap Select Storage.
- Tap USB.
- Tap OK.
- Under the BACKUP tab, ensure Boot, System, and Data are checked.
- Under the OPTIONS tab, check Skip MD5 generation during backup.MD5 sounds like a nice idea, but it only checks for and doesn’t fix backup corruption. In other words, if your backup is toast, MD5 won’t actually fix the problem and you’ll find out about the corruption during restoration anyway. Besides, the official OTA updates don’t use it. The last reason not to use MD5 is it nearly doubles backup times compared to not using both it and compression.
- Under the BACKUP tab, Swipe to Backup.
- When the backup is complete, tab BACK.
THE NEXT STEPS ARE VERY IMPORTANT TO AVOID CORRUPTION OF THE USB DRIVE. DO NOT SKIP THEM.
- Tap Select Storage.
- Tap Internal Storage.
- Tap OK.
- Disconnect the USB drive from the S5.
As an added precaution, connect the USB drive to another Android device or PC to ensure the it hasn’t been corrupted before proceeding with an update.
I don’t advise enabling compression or encryption; backing up my 200+ app installation with them disabled takes around 300 seconds (TWRP gives you time report at the end). With MD5 enabled, that jumps to around 500 seconds. With both MD5 and compression enabled, backups take a whopping 1300 seconds, which isn’t worth it for a daily operation. Just get a sufficiently large drive; they’re inexpensive enough.
Phase 10: Updating CM 13.0 in place with adoptable storage enabled.
If you have adoptable storage enabled want to update your nightly build, do this:
- Tap About Phone -> CyanogenMod updates.
- Hit the refresh icon and download the build when prompted.
- After the download is complete, use an explorer app with root access to move the archive (found in /cmupdater on the microSD card) to /data/Media/0/twrp (you may have to create the latter folder if it doesn’t already exist).
- Boot into recovery as in Phase 6 Step 7 and install the update as in Phase 7. None of your apps or data will be affected.
- When the update is complete, tap Wipe cache/Dalvik.
- Swipe to Wipe and wait for the operation to complete.
- Tap Reboot System.
How does it all run? Here’s my review of CM 13.0 on the S5.
Here’s how to get back to a stock rooted ROM (while leaving your unlocked bootloader and custom recovery in place) if you ever need to.
Thanks GeTex (bootloader unlock thread), jrkruse (SamsungUnlockerS5.apk), haggertk (CM 13.0 kltevzw build thread), keysoh2 (how to flash firmware/modem in ODIN), Dees_Troy (TWRP klte build thread) and M1chiel (updating CM 13.0 with adoptable storage enabled) for the methods used in this post.
If you’re having problems, comment or get back to the threads linked to above.