How to update Samsung Galaxy S5 stock partitions without breaking custom ROM or recovery

Don’t just flash modem firmwares and think you’re done.

Advertisements

The following is directed at Samsung Galaxy S5s running custom ROMs and custom recovery environments only. The Galaxy S5’s internal storage has multiple partitions, each with its own separate image. For the sake of this discussion, we’ll divide the partitions into 2 groups: customized and stock.

Customized partitions are the ones you’ve put a custom image onto. For most devices running custom ROMs, that’s the /recovery – this is where TWRP, CWM, etc. live – and /system – where the actual (custom) Android phone OS lives – partitions.

Stock partitions are the partitions with unmodified OEM images. For most devices running custom ROMs, that’s every partition except /recovery and /system. Because some of these partitions contain firmware for the phone’s hardware components and said firmware was developed for a particular version of Android, it’s important to keep them updated. It isn’t too hard to see how, for example, pairing firmware designed for Android 4.4.2 with a custom Android 7.1.1 ROM could cause problems.

This guide will show you how to update as many of the stock partitions as possible without touching the customized partitions:

  1. Download and install 7-Zip.
  2. Download the latest stock firmware (where “firmware” in this sense means an archive containing images for all partitions) from SamMobile.You’ll need to search by your phone’s model number at that page.
  3. Decompress the archive from the above step. If you find it contains a .tar.md5 file; decompress that too.
  4. In the folder containing the extracted files, select the following:
    • NON-HLOS.bin – This is the 4G LTE modem firmware.
    • modem.bin – This is the 2G & 3G modem firmware.
    • rpm.bin – This is the resource and power manager.
    • sbl1.mbn – This is the secondary bootloader.
    • tz.mbn – This is the trust zone.
    • sdi.mbn – This contains transmission band info (?)
    • aboot.mbn – This is the phone bootloader. SELECT THIS ONLY IF YOUR PHONE SHIPPED WITH AN UNLOCKED BOOTLOADER (i.e. DO NOT SELECT IT IF YOU’RE USING A VERIZON S5 AS YOU WILL RE-LOCK THE BOOTLOADER.)
  5. Follow Steps 6 to 11 here.

And that’s it. All your partitions will be safely updated without touching your custom ROM or custom recovery.

Thanks haggertk for the method, E:V:A for partition details, and Campbell Vertesi for the NON-HLOS.bin and modem.bin descriptions.

How to safely update your rooted Verizon Samsung Galaxy S5 to to the NK2 build

Because xda-developers instructions – like most forum guides – are poorly written.

This post assumes you’ll be updating from the NCG (Android 4.4.2) build the Verizon Samsung Galaxy S5 (SM-G900V) was released with. This method will not affect your files or apps on internal storage or the SD card in any way, so don’t worry about your phone being wiped.

  1. Ensure drivers for your phone are installed.
  2. Ensure towelroot is installed so you can easily re-root later.
  3. Ensure the System Updates app, SDM 1.0, is enabled. You’ll need it for the OTA update in a later step.*
  4. Ensure SuperSU is already installed.
  5. In Settings, tap Security.
  6. Under FIND MY MOBILE, uncheck the Reactivation lock box to prevent your SIM card being borked during the process.

    Note: do NOT proceed to Step 7 until Steps 1-6 have been completed.
  7. Download G900V_NK2_Stock_Kernel.tar.
  8. Download G900V_NCG_Stock_Kernel.tar.
  9. Download G900VVRU1ANHA_G900VVZW1ANHA_VZW.zip.
  10. Download ODINv3.10.rar.
  11. Decompress all the above .zip and .rar archives only. Do not decompress the .tar file(s).
  12. Turn off the S5.
  13. Hold Volume Down + Home + Power simultaneously to enter Download Mode.
  14. Press Volume Up to continue as indicated onscreen.
  15. Launch Odin from its decompressed folder.
  16. Connect the S5 to your PC via USB 2.0+ cable. This should result in Odin detecting the phone as below:

    Note the highlighted slot and "Added" message which indicate Odin's detection of the S5
    Note the highlighted slot and “Added” message which indicate Odin’s detection of the S5
  17. In the Odin window in the Files [Download] section, check the AP box.
  18. Click the AP button and select the G900VVRU1ANHA_G900VVZW1ANHA_G900VVRU1ANHA_HOME.tar file, found in the decompressed G900VVRU1ANHA_G900VVZW1ANHA_VZW.zip folder.
  19. Click Start. The S5 will update and boot into to the NHA build.
  20. In the S5’s Settings, tap System Updates.
  21. Tap Check for new software update.
  22. Accept, download, and install the available OTA NK2 update.
  23. When the S5 has successfully rebooted, turn it off.
  24. Put the S5 into Download Mode again as in Step 13.
  25. Repeat Steps 16 to 18 for the G900V_NCG_Stock_Kernel.tar file, with the exception that the S5 will now boot into the NK2 build, albeit running on the *NCG kernel.
  26. Open towelroot.
  27. Tap make it rain and wait for the rooting process to complete.
  28. Reboot the phone if towelroot doesn’t do that automatically.
  29. Open SuperSU and let it update the binary normally if it prompts you to do so.
  30. Repeat Steps 22 to 24 for the G900V_NK2_Stock_Kernel.tar file. The S5 will now boot into the NK2 build with matching kernel and root access.

*If you forget to do this, you won’t be able to OTA update in Step 18. In that case, follow Step 23, boot into the NHA build on the NCG kernel, and then root. Reboot and re-enable SDM 1.0, then continue the process at Step 18.

Credit JTidler & muniz_ri for the above instructions. I wrote this guide as an easier to understand and follow version for users like myself who don’t flash kernels and images as a matter of course.