[Samsung Galaxy Mega] Superdiv:
CyanogenMod is a free, community built, aftermarket firmware distribution of Android 6.0 (Marshmallow), 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:

Device tree: https://github.com/ghsr/android_device_samsung_i9152

Kernel source: https://github.com/ghsr/android_kernel_samsung_i9152

Compatibilitiy Patches: https://github.com/ghsr/build_tools/tree/cm-13.0/patches

WebView: https://github.com/pawitp/android_external_chromium-webview

Downloads

ROM: Google Drive and WebDav - login/password 9152

Gapps: http://opengapps.org

What works?

Wi-Fi

Bluetooth

RIL (Calls, SMS, Mobile Data)

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

Camera

Video (playback & recording)

Audio (playback & recording)

GPS

Everything else not listed under "known issues"

Known Issues

Runtime storage permission does not work properly (setns patches are not applied, see PermissionsHostTest CTS test)

Additionally, Dual SIM has the following limitations (once they work):

Both SIMs are always enabled (no way to disable one SIM)

"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/factory reset if coming from stock or another ROM (You may get a "staus 7" error if you fail to wipe.)

Flash the ROM and then GApps

Reboot your phone

Enjoy!

To upgrade to a newer build, simply flash the zip. There's no need for data wipe or flashing Google Apps again. (However, if you are experiencing strange issues, you may want to try a wipe.)

Changelog

20161118: Upstream merge, Updated Kernel Adiutor to version 0.9.4.4.2, Updated SuperSU 2.79
20161214: Upstream merge, Updated Kernel Adiutor to version 0.9.4.2
20161118: Upstream merge, Updated Kernel Adiutor to version 0.9.4
20161014: Upstream merge
20160903: Upstream merge, Updated SuperSU 2.78, Updated Kernel Adiutor to version 0.9.30.2
20160807: Upstream merge, Added OTA update, Updated Kernel Adiutor to version 0.9.27.1
20160711: Upstream merge, Updated SuperSU to version 2.76, Integrated Yahoo Weather Provider
20160604: Upstream merge
20160508: Fixed youtube issue (stopping video playback after 5-7 seconds), Enabled gesture typing and fixed LatinIME fc, Fixed unstable usb connection, Fixed runtime storage permission (applied setns patches in the kernel), Enabled auto power modes, Added some encryption fixes, Upstream merge, Update to Android 6.0.1_r43
20160424: Upstream merge, Update to Android 6.0.1_r30
20160321: Upstream merge, Update SuperSU 2.65
20160314: Upstream merge, Update to Android 6.0.1_r22
20160227: Upstream merge, Fixed writing of files Recorder to the SD card, Integrated SuperSU, Updated KernelAuditor
20160211: Upstream merge
20160202: Upstream merge
20160120: Initial release

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 13, ROM for the Samsung Galaxy Mega 5.8

Contributors

GHsR, Superdiv

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

ROM OS Version: 6.0.x Marshmallow

ROM Kernel: Linux 3.0.x

Version Information

Status: Stabile

Created 20-01-2016

Last Updated 30-12-2016