[Samsung Galaxy Mega] GHsR:
CyanogenMod is a free, community built, aftermarket firmware distribution of Android 5.0 (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 : https://drive.google.com/folderview?id=0B4y1nlqbIOgZN0tZV2cyRmV5bDA&usp=drive_web or https://www.mediafire.com/folder/vblnlwtmfpbba/CM12

PA Gapps : http://xdaforums.com/paranoid-android/general/gapps-official-to-date-pa-google-apps-t2943900

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

FM Radio does not work

Sometimes wake up causes music stutter

Camera app sometimes crash on close

Unable to un-pin screen without rebooting

Additionally, Dual SIM has the following limitations:

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 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

20150314: Fixed flashlight tile. Added custom Bootanimation, "storage options" for the camera, f2fs support for data and cache. Upstream merge.

20150223: Fixed message app fc. Upstream merge.

20150221: Fixed external storage permissions, device encryption. Upstream merge.

20150219: Upstream merge.

20150209: Upstream merge.

20150122: Fixed .wav recording, wrong SIM name, app2sd on ExFAT, call settings crash, crash in messaging, "Charge only" option in USB computer connection, SystemUI crash. Optional overclocking to 1.6 Ghz. Upstream merge.

20150105: Fixed status bar brightness adjustment, dialer search text taking 2 lines, Wi-Fi Hal. Added fixes for bt headset music playing. Upstream merge

20141227: Fixed volume key, improved switching data, per-sim ringtone, "up" button in call settings, lock screen double carrier display, missing settings for volume key, SIM name not persisting, Settings "Running" crash, Miracast, don't turn capacitive button backlight on screen touch, screen record, freeze on low video RAM, STK, mount SD card option in USB computer connection. Removed crashing "X-Divert" setting. Update to Android 5.0.2.

20141218: Fixed app name/icon not displayed with app2sd, toggling SIM2 data from Quick Settings, use audioflinger for resampling, APN selection not being respected, FC when accessing mobile network settings, video freeze in YouTube/browser, screen off animation, quick message

20141207: Improved root compatibility, android 5.0.1, app2sd

20141201: Fixed voice note in WhatsApp, SIM PIN, incoming call crash, 2G/3G selection in non-English languages. SELinux is now in enforcing mode (you may need to wipe if you have ever used a custom kernel with SELinux disabled), added buttons backlight setting, FFMPEG codecs, fade screen off animation

20141124: Fixed FC when dual SIM disabled, unable to select 2G/3G, "Carrier Settings" FC, sometimes not able to set APNs, low Wi-Fi download performance when screen off

20141121: Fixed .wav playback, "call feature" crash, random reboots, video recording, low call volume, "mount /data" error in install script, off-mode charging, compatibility with smaller /system partition, added multi-user support for phones

20141118: Fixed installation

20141117: Initial release (this build is not working )

FAQ

How do I enable/disable Dual SIM?

Dual SIM support is enabled by default. If you only use 1 SIM and wants to disable Dual SIM support, you can use the following instruction:

Enable:

su
setprop persist.radio.multisim.config dsds

Disable:

su
setprop persist.radio.multisim.config none

(Instruction screenshots)

Can you include Feature X into your ROM?

No. This ROM will have CyanogenMod's feature set.

Can you include S-Note/S-Planner/MultiWindow/Insert Samsung App Here?

No. This is an AOSP ROM and cannot have TouchWiz applications.

Can you include call recording?

No. CyanogenMod does not include call recording to avoid potential legal issues.

Can you add Feature X to the stock ROM?

No. I don't work on stock ROMs.

What kernel does this ROM use?

A slightly modified version of the stock kernel, the source code is linked above.

I've heard that Broadcom doesn't release source, how can you make this ROM?

Contrary to the popular belief, userspace driver source code is not always required to make an AOSP-based ROM as long as the proprietary binaries shipped with the device does not modify the API too heavily (or is from a very different version of Android). Instead of modifying the source code of the drivers, the Android source code was adapted to be able to use the proprietary binaries.

Can I use your ROM as a base?

http://source.android.com/source/licenses.html

Most of Android/CyanogenMod is licensed under the Apache License with other small parts licensed under other open-source licenses. Which means that you may modify and redistribute without asking for permission as long as the proper credits is given and it is not misappropriated as being the official CyanogenMod. (In other words, you must say that it is based on pawitp's unofficial CyanogenMod, but is not related to CyanogenMod in any other way.)

Will you make this official CM?

Due to the amount of work and commitment involved, I am not planning to make an official CM port.

Can contacts be saved to phone/SIM?

No. It is not supported in AOSP-based ROMs.

Can I send files over Wi-Fi Direct?

Yes, but you must use third-party applications. The implementation provided on Samsung ROMs is not an open standard. AOSP/CM does not provide a native way to send files over Wi-Fi Direct.

Can I mirror your ROM?

You're free to, but I will not list it in this post.

Will feature X from a previous version of CM be implemented?

I don't know, probably will be, eventually. I don't really involve myself in the feature-set side of CM.

Will you add OTA support?

No.

I cannot add APNs

Make sure you set the correct MCC/MNC code, the APN will not appear otherwise. Also make sure to use menu -> save (back button means discard).

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

@Kiborg_Man

XDA:DevDB Information

CyanogenMod 12, ROM for the Samsung Galaxy Mega 5.8

Contributors

GHsR, Kiborg_Man

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

ROM OS Version: 5.0.x Lollipop

ROM Kernel: Linux 3.0.x

Version Information

Status: Stable

Created 2014-11-17

Last Updated 2015-03-14