This is a guide for advanced users. Do not blame us if you brick the device or you lose any important data in the process.

It is highly recommended for you to create a NANDROID Backup of the ROM that is currently installed on your device.

The Samsung Galaxy S4 battery charge levels should be over 50%, so that the device won’t switch off in the middle of the updating process.

Read the entire tutorial and don’t any steps listed below.

Now that you know all about how to correctly prepare your device for the update, you can continue to the next part of this post. Note that in case you cannot complete the installation, then you can ask for more help in comments.

Now boot the phone into Custom Recovery Mode.
– both CWM and TWRP are supported by this tutorial.
– if you don’t know how to boot into custom recovery mode, then read here how to do it.

First thing you need to use the Custom Recovery Mode for, is to create a NANDROID Backup of your currently installed ROM:
– CWM Recovery: select ‘backup and restore’ option, then confirm the process.
– TWRP Recovery: press Backup, select all system partition data you wish to save. Confirm.
> this file will be useful in case your phone doesn’t boot with the new ROM, as you can easily use the custom Recovery mode and restore your device to a working state.

Now you need to apply the ‘factory reset’:
– CWM Recovery: select ‘wipe data/ factory reset’. Confirm the process.
– TWRP Recovery: press Wipe, then Factory Reset. Confirm.
> if your device is already sporting a previous CM 10.2 Nightly build, then you can skip this step. However, if your phone doesn’t boot with the new OS, then you will have to return to this step and apply factory reset.

Next, install the custom ROM zip:
– CWM Recovery: select ‘install zip from sdcard, then from the next menu select ‘choose zip from sdcard’. Find the CM 10.2 Nightly zip and install it.
– TWRP Recovery: press Install, then you have to browse the internal storage for the CM 10.2 Nightly zip. Confirm that you wan to update your device using the blue button shown at the bottom of the screen.
> the installation shouldn’t take more than a couple of minutes, which is why you shouldn’t press any buttons until the whole process is complete.

Now you should repeat step 10 and install the Gapps zip as well.

After both files have been flashed with success, you should get back to the main Custom Recovery Mode menu.

Reboot your device into normal mode.
– if the first boot process takes more than 10 minutes and it doesn’t complete loading all files or it enters a boot loop, then you will need to boot again into Recovery Mode. Repeat the entire tutorial once again.

If everything went according to plan, then you will see the CM 10.2 Nightly / Android 4.3 Home Screen. Enter your Google Account details and then take control over your device.

These were the steps you had to take in order to update the phone. For any other questions use the comments field below.

In case you don’t like this new ROM or you’ve detected major bugs, then you can restore your device to its previous ROM using the file created in step 8. Use the same custom Recovery screen to restore the NANDROID Backup file.

If you like the CM 10.2 Nightly and how your Samsung Galaxy S4 is working with it installed, then you need to know that you can keep updating it with new CyanogenMod 10.2 Nightly builds using the CM updater tool from the Setting menu.