[Samsung Galaxy Mega] Superdiv:
CyanogenMod is a free, community built, aftermarket firmware distribution of Android 5.1 (Lollipop), which is designed to increase performance and reliability over stock Android for your device..

#include
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/

CyanogenMod is based on the Android Open Source Project with extra contributions from many people within the Android community. It can be used without any need to have any Google application installed. Linked below is a package that has come from another Android project that restore the Google parts. CyanogenMod does still include various hardware-specific code, which is also slowly being open-sourced anyway.

All the source code for CyanogenMod is available in the CyanogenMod Github Repo. And if you would like to contribute to CyanogenMod, please visit out Gerrit Code Review.

Device-specific source code for the Samsung Galaxy Mega 5.8 are available from

https://github.com/ghsr/android_device_samsung_i9152 and

https://github.com/ghsr/android_kernel_samsung_i9152

Patches:

Thanks to @pawitp and his following patches: https://gist.github.com/pawitp/cba169c87dba57eea8ef

Do not submit bug on CyanogenMod issue tracker

Downloads

ROM : Google Drive or WebDav

GApps : PA GApps or WebDav - GApps 5.1

WebDav the login/password 9152

What works?

Wi-Fi

Bluetooth

RIL (Calls, SMS, Mobile Data)

GPS

Sensors (Accelerometer, Compass, Light, Proximity, etc.)

Camera (photo)

Video playback

Audio (playback & recording)

Everything else not listed under "known issues"

Known Issues

"Receive incoming call while data is enabled" is always enabled

Installation Instructions

Make a backup!

Install a custom recovery with SELinux support

Download the latest build

Wipe data if coming from stock or another ROM (You may get a "staus 7" error if you fail to wipe.)

Flash ROM using your custom recovery

Flash Gapps

Reboot

Enjoy!

Update Instructions

Make a backup!

Download the latest build

Flash ROM using your custom recovery

Flash Gapps

Wipe cache

Wipe dalvik cache

Reboot

Enjoy!

Changelog

20150410: Updated to Android 5.1

20150510: Updated to Android 5.1.1, Enabled performance profiles, Implement display color calibration, Fixed screen pinning, Encryption on f2fs, Lags when using LiveDisplay, Unable to change SIM name, Having multiple STK icons, Fixed simultaneous regulation of the volume of the ringtone and notifications, Upstream merge.

20150530: Upstream merge, Android updated to 5.1.1_r3

20150614: Upstream merge, Integrated SuperSU

20150718: Upstream merge

20150823: Upstream merge

20150905: Upstream merge

20151024: Upstream merge, Android updated to 5.1.1_r24, Preinstalled KernelAdiutor

20151202: Upstream merge, Fix bootanimaton KernelAdiutor last version

FAQ

F2FS

This Rom supports f2fs since the latest build. Don't ask me, what it is. Just google it.

Instructions for f2fs:

Download the modified twrp recovery for f2fs based from here and flash it

Save your data, your whole internal storage will be formatted soon.

Put the latest rom build and gapps on your EXTERNAL sdcard

Format data and cache to f2fs using twrp recovery

Flash the rom and gapps

DO NOT FLASH A KERNEL, WHICH DOES NOT SUPPORT F2FS

If you want to revert back to the usual ext4 partitions, format data and cache with twrp recovery to ext4.

Reporting Bugs

You are allowed to report bugs only in this thread.

Grab a logcat right after the problem has occurred. (Please include at least a few pages of the log, not just the last few lines, unless you know what you're doing.)

If it is a random reboot, grab /proc/last_kmsg. (Do not bother getting a logcat unless you can get it just before the reboot. A logcat after a reboot is useless)

If the problem disappears after running "setenforce 0" from a root shell, grab /data/misc/audit/audit.log

Remember to provide as much info as possible. The more info you provide, the more likely that the bug will be solved. Please also do not report known issues. The following is a useful format to follow.

What is your--
Radio (baseband):
CM version:
CM Download url:
Gapps version:

Did you--
wipe:
restore with titanium backup:
reboot after having the issue:

Are you using--
a task killer:
a non-stock kernel:
CMSettings/Performance settings (other than stock):
Dual SIM:
other modifications:

Provide any additional information (observations/frequency of problem/last version it worked on/etc) as needed:

Credits

CyanogenMod team

@pawitp

@xenon92

@LuK1337

@andixlm

@KINGbabasula

@CoolDevelopment

@GHsR

XDA:DevDB Information

CyanogenMod 12.1, ROM for the Samsung Galaxy Mega 5.8

Contributors

GHsR, Superdiv

Source Code: https://github.com/CyanogenMod

ROM OS Version: 5.1 Lollipop

ROM Kernel: Linux 3.0.x

Version Information

Status: Stable

Created 12-04-2015

Last Updated 02-12-2015