After installing CM 10.2 nightly, my Galaxy S4 only shows the Samsung logo and turns off right after. How can I fix this? I have the Samsung Galaxy S4 Rogers Canadian version that came with TouchWiz out of the box. When I heard that 4.3 Jellybean was out, I immediately tried looking for a guide to flash my S4. In the end, I flashed it, everything seems to be working, but I am not sure If I flashed it the right away. This isn't my main problem, just summarizing what i have done to my phone incase it might help.

So my problem is, I can't flash my phone with CyanogenMod 10.2. I went into recovery mode with CWM and I erased data, cache and dalvik cache. Install from external SD zip --> clicked the CM 10.2 Nightly file and it installs. Rebooted phone and it wouldn't boot up, samsung logo would show up but it would just turn off right after. After that I went into recovery mode and deleted the dalvik cache and rebooted and to no avail, same thing happened.

So in my head, I was thinking that maybe its not working because I flashed the stock 4.3 wrong. So i downloaded a stock 4.2.2 Rogers Canadian Rom and tried doing the same procedure to install that, but this time i got an error saying (might not be the exact error, just thinking from the top of my head) " E: can't open /external_sd (bad)".  I had researched this error and people were telling me it was from a corrupted file, so I downloaded another one.  This time it didn't say anything, just said "Aborted (sorry somewhere along those lines i completely forgot)"

Please, please help me. I am so frustrated and confused.

Phone Info

root: yes
Recovery: CWM
Model Number: GT-I9505G
The nightly builds of Cyanogenmod are for testing only. They're not suitable for a phone that you actually want to use. The nightly build can be completely different from one night to the next, and might not even have passed any tests. Not booting at all is a very likely outcome; the next day, it might boot fine, but corrupt your filesystem as soon as you try to use it.

If you want to install Cyanogenmod on your phone and actually be able to use the phone, you should download and install the stable build. If you want something that's newer and not quite so well tested, but still likely to mostly work, you can try a release candidate version instead. There are no guarantees whatsoever for the nightly build.

Looking at the Cyanogenmod website, it appears there isn't a stable release for your device yet. Perhaps this is why you tried the nightly build. If there has never been a stable release for your device, it's even more likely that the nightly build is in an incomplete, not-working state, and will continue to be until the volunteers can test it on real devices and fix all the problems. That said, there does seem to be a release candidate for 10.1.3, so that is probably the best choice.

The bad SD card error you got might be a symptom of the nightly build having corrupted your SD card. Before trying to flash a new ROM, you should try to put the SD card in a PC and scan the filesystem for errors (e.g. using fsck, or another method depending on the OS your PC uses), or use a fresh SD card. After that, try again to flash a stock ROM or a stable release of Cyanogenmod.

Supporting 10.2 on your device would take a lot of volunteer time, and devices to test on. If you want to help get a stable release for your device sooner, you could offer to help the developers with your time or money to support the development. Details are towards the bottom of this page.