[ROM][4.4.4][UNOFFICIAL]CyanogenMod 11 || Beta 5

corphish

Recognized Developer / Inactive Recognized Contrib
Apr 16, 2014
1,014
2,451
153
Durgapur
Code:
#include <std_disclaimer.h>
/*
* 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 a free, community built distribution of Android which greatly extends the capabilities of your phone.

What's working
  • Mostly everything except for those mentioned in Not working list.

What's not working
  • Video Recording.
  • Mobile data on one of the SIMs when using dual SIM.

Screenshots


Installation Instructions
  • If you are flashing from stock :
    • You need to have an SELinux enabled recovery. Use TWRP or CWM 6.0.5.1. Use the CWM which is in the downloads section below.
    • Download the CM11 zip and put in phone.
    • Reboot to recovery.
    • Wipe data/factory reset.
    • Wipe cache.
    • Install the CM11 zip.
    • (Optional)Flash Gapps (find it in downloads section).
    • Reboot.
  • If you are upgrading from CM11 (Assuming you have a SELinux enabled recovery):
    • Download the CM11 zip and put it in phone.
    • Reboot to recovery.
    • Simply flash the CM11, no need to wipe anything.
    • Reboot.

Todo
If you want to use dual SIM, open terminal emulator and execute following:
Code:
su
setprop persist.radio.multisim.config dsds
reboot
Troubleshooting
Visit this thread and post your queries there, and you may well be replied.

Download
CyanogenMod 11 - Beta 5
Gapps

Source

Credits
@Unjustified Dev and @Doc_cheilvenerdi.org - For starting the CM project, initial tress and stuff.
@psych.half - For his fixes in CM10.1, ideas and ofcourse for his kernel.
@Dreamstar - For his SELinux enabled recovery, without which CM11 was not possible.
@andii_nr - For fixes.
@doesntexits and @ngoquang2708 - For their works in SGV, patches and their help.
@DigiGoon - For his highly compressed CM11 sources.
@dhinesh77 @pawitp and others - Various fixes and references have been taken from their work.

XDA:DevDB Information
CyanogenMod 11, ROM for the Samsung Galaxy Star

Contributors
corphish, Dreamstar, psych.half
ROM OS Version: 4.4.x KitKat
ROM Kernel: Linux 3.0.x

Version Information
Status: Beta
Current Beta Version: 3.0
Beta Release Date: 2016-01-24

Created 2015-12-18
Last Updated 2016-05-25
 
Last edited:

corphish

Recognized Developer / Inactive Recognized Contrib
Apr 16, 2014
1,014
2,451
153
Durgapur
Changelog

Code:
[B]Beta 4_r2 - 9 March 2016[/B]
-It fixes all the stuff which broke in beta4, but were working in beta3.
--Fixed in call audio volume.
--Fixed WiFi tethering.
-Source underwent major cleanup again, we have eliminated most of the source patches, which are now device specific units.
--Compiled Camera, HWComposer from source.
--Detached MemoryHeapIon from binder and compiled it as separate unit.
--We now have our own RIL class. No source hacks to get RIL working.
-Fixed the weird 'No resources found' like message in recovery while flashing.
-Added WiFi direct permissions.

[B]Beta 4 - 20 February 2016[/B]
-Fixed Bluetooth.
-Fixed Bluetooth tethering.
-Fixed Offline charging.
-Fixed Dual SIM.
-Fixed data subscription (2nd SIM mobile data)
-Fixed reboot to recovery.
-Fixed more dalvik VM related memory issues (like app crashes).
-Fixed artifacts observed while screen rotation.
-Fixed black preview in Camera app, glitches in dialer app.
-Activated HW Rendering.
-Fixed audio recording.
-Audio HAL is compiled from source, is AOSP compatible, but may have limitations because all Samsung's optimizations (if any) in Audio HAL is gone.
-Added more SPRD specific OMX libs.
-Compiled various EGL related blobs from source, updated some of them.
-Compiled sensors HAL from source.
-SELinux is enabled and is now enforcing.
-Picked various critical fixes in kernel from @psych.half 's kernel.
-Switched to GCC 4.7, which is the default toolchain in CM.
-Removed various debugging in kernel.
-Implemented @psych.half's CPUFreq driver (min - 1000Mhz, max - 1200 Mhz).
-Enabled ondemand and powersave governor.

[B]Beta 3 - 24 January 2016[/B]
-Fixed Mobile Data.
-Fixed WiFi tethering.
-Fixed USB Tethering.
-Fixed audio routing to loudspeaker and headphones during call when switched to.
-Fixed various app crashes, app installation issues and memory related issues.
-Updated kernel to latest of works by @psych.half

[B]Beta 2 - 18 January 2016[/B]
-Fixed External storage (thanks to [user=220904]@andi[/user]i_nr)
-Switched to updated kernel (updated meaning updates from both stock and kernel patches) by @psych.half. This should fix the brightness bug and the battery bug that some users face. WiFi driver is also updated.
-Fixed IMEI for good. IMEI is now detected the way it is done on any android phone. No need to use any apps for that.
-Fixed USSD dialing/receiving.
-Switched to single-SIM mode (because dual SIM is broken).
-Remove loads of unneeded services.

[B]Beta 1 - 12 January 2016[/B]
-mint -> mint2g
-Fixed battery, its status and everything related to it.
-Fixed Web Browsing and related stuff.
-Updated ramdisk.
-Enabled CPU frequency scaling in kernel.
-Enabled KSM (Kernel Samepage Merging).
-Applied fixes for external storage by [user=220904]@andi[/user]i_nr (Needs confirmation)
-Initial fixes for RIL.

[B]Alpha 2 - 25 December 2015[/B]
-Fixed audio (both from speakers and headphones).
-Fixed HWComposer.
-Fixed EGL crashes and random reboots.
-Fixed camera to some extent (it starts, but cant save pics).
-Camera HAL included is new one compiled from source (BETA version, some more features than the stock HAL).
-Fixed microphone to some extent (it starts listening, but does not record anything).
-Switched to de-odexed builds.
-Updated blobs.

[B]Alpha 1 - 18 December 2015[/B]
-Initial release.
Tracker
Its hard for me to remember all the stuff I fixed in the meantime. So I will update this post (hopefully) with the stuff that has been fixed and will be available in next update.
Following things have been fixed and will be available in next update :
  • Re-fixed WiFi tethering.
  • Fixed in-call loudspeaker volume.
 
Last edited:

corphish

Recognized Developer / Inactive Recognized Contrib
Apr 16, 2014
1,014
2,451
153
Durgapur
Support

F.A.Q

Q. I have faced some issues, which is not mentioned in the 'Not Working' list........?
A. For bug reports, the least we can expect from you is a logcat taken during the issue. Or atleast, you could tell us how and when did you face the bug, how can we reproduce the bug to fix it. Reports without any of these will be ignored.

Q. I got a status 7 error when flashing the CM11 zip...? / My device is stuck at boot logo after flashing CM11...?
A. Please use the recovery that is mentioned in the downloads section. It is recommended to use TWRP as it is known working for all.

Q. I put the ROM zip in internal memory while I was in stock ROM, but when I go to TWRP and try to flash it, the zip is not there, help!
A. TWRP uses psych.half's storage hack that he did in CM10.1. You will need to mount /data (its generally done by default), and then go to /data/media and there you can find the zip.

Q. I successfully flashed CM11, but all my data in internal memory is gone!
A. It hasn't, you can still find them in /data/media.

Q. Can you add XYZ feature to the ROM?
A. No!

Q. Can I use your ROM/any part of ROM and modify it and release it separately?
A. Yes you can. But please mention proper credits.

Q. I flashed this ROM, but I dont find any Google App, where can I find it?
A. Flash gapps mentioned in OP.

Q. Are any 3rd party utilities/kernels/themes/mods supported?
A. No, not yet. If they are supported, it will be clearly mentioned in their respective threads.

Q. If no mods are supported, how can we customize our experience?
A. This is CyanogenMod, a completely different ROM from stock. As of now, no kernels are supported, but you can customize the looks using CM11's highly customizable theme engine.

Bug reporting
How to report a bug?
  • First off all, check the 'not working' list and see if the bug you are facing is already mentioned or not. If it is, stop right away because the concerned people working on the ROM are aware of the issue.
  • If the bug/issue is not mentioned in 'not working' list, check the Frequently Asked Question (F.A.Q) and see if issue is resolved already.
  • If the issue you face is not in FAQ either, you would probably post a reply in this forum, and not PM anyone, about the bug.
    • Attach a logcat.
    • If not possible, mention a proper way how you encountered the bug.
    • Also mention any 3rd party stuff you installed. (Like mods, themes, kernels etc)

Following things WILL NOT be considered as bugs. So please do not post such bug reports, they will be ignored.
  • Low benchmark scores. Even if Stock results better.
  • Poor performance in gaming. Even if Stock results better.
  • High RAM usage/low RAM available.
  • Various kernel control app crashes.
  • Crashes of various UI elements when a custom theme/mod is applied.
  • Random reboots, and other issues caused by flashing custom kernel.
 
Last edited:

corphish

Recognized Developer / Inactive Recognized Contrib
Apr 16, 2014
1,014
2,451
153
Durgapur
Status Update

We have been working, and... :
  • Audio -Its fixed, both audio from speakers and headphones.
  • HWComposer -Its fixed too, patches to libbinder worked.
  • Camera - Umm, its broken. Problem is, I expected Camera to be fixed by patching libbinder, but it didn't, camera HAL was not loading at all. I eventually got the HAL to load, but it would then cause various system instabilities, so its still broken.
  • Microphone - Well, microphone does listen to when any respective app is started, but won't record anything (unlike last time, where it won't listen and start recording at all).
  • RIL - Well, that's really a tough one to fix.
  • Random Reboots and Freezes - Random reboots are gone, but freezes (caused due to EGL issues) still persists.

P.S : Sources are constantly being updated, patches will only be released after a next release is made. As of the current released build (Alpha 1), not much patches are used, except for those which are mentioned in the device tree.
 
Last edited:

BatDroid

Senior Member
Oct 20, 2015
1,947
375
0
Look! On the rooftop!
We have been working, and... :
  • Audio -Its fixed, both audio from speakers and headphones.
  • HWComposer -Its fixed too, patches to libbinder worked.
  • Camera - Umm, its broken. Problem is, I expected Camera to be fixed by patching libbinder, but it didn't, camera HAL was not loading at all. I eventually got the HAL to load, but it would then cause various system instabilities, so its still broken.
  • Microphone - Well, microphone does listen to when any respective app is started, but won't record anything (unlike last time, where it won't listen and start recording at all).
  • RIL - Well, that's really a tough one to fix.
  • Random Reboots and Freezes - Random reboots are gone, but freezes (caused due to EGL issues) still persists.

P.S : Sources are constantly being updated, patches will only be released after a next release is made. As of the current released build (Alpha 1), not much patches are used, except for those which are mentioned in the device tree.
just the ril
 

corphish

Recognized Developer / Inactive Recognized Contrib
Apr 16, 2014
1,014
2,451
153
Durgapur
Alpha 2 is up

Changelog
-Fixed audio (both from speakers and headphones).
-Fixed HWComposer.
-Fixed EGL crashes and random reboots.
-Fixed camera to some extent (it starts, but cant save pics).
-Camera HAL included is new one compiled from source (BETA version, some more features than the stock HAL).
-Fixed microphone to some extent (it starts listening, but does not record anything).
-Switched to de-odexed builds.
-Updated blobs.

Download updated in OP
This build is intended to see how our phone runs kitkat, explore kitkat's new features (if you haven't already), in a decent, less-annoying way. This is not intended for daily use.

About RIL?
That's all I get. We have fixed baseband too, but not included in this release.



Perks of the new camera HAL?
Well, camera might not be fully functional, but that is not because of the new HAL being used, things are same even with stock HAL. This HAL works perfectly with CM10.1. Only bug is the camera preview format has weird colours (just like what we have in recovery, blues look orange and all that). Anyway,

 
  • Like
Reactions: Albe96 and yahiamno

corphish

Recognized Developer / Inactive Recognized Contrib
Apr 16, 2014
1,014
2,451
153
Durgapur
Ah GT-S5283 is qcom, I just saw it in download when searching opensource.samsung.

mfserial looks like code for AT/UART for baseband.
Samsung has it disabled cause it wrote their own mfserial.
Yup I checked the RIL implementation in stock. I havent had time to fully reverse eng the stuffs. But heres what I found.

Check the last blocks of code in stock 'init.sp8810.rc' , you see the #datarouter. Thats where the RIL is.
The DR,SMD,DTT,BCS,mobex daemon are responsible for parsing the raw UART, setting up CSC and sending data to framework.

So first try adding those and see.

And if that doesnt work they are using broadcasts to these apps, so you might need to hack on these.

com.sec.app.RilErrorNotifier
com.android.samsungtest.RilDTTCommand
Well, adding those surely did 'something' to RIL. Well things went worse, but atleast now we know they are related to RIL.
Like, initially, sim0 radio was off, but sim1 radio was out of service, now both are off.

Anyways, I was comparing the radio logs of stock and cm11, let's take IMEI for instance, and see how it looks like :
Stock:
Code:
D/[B]RILC[/B]    (  102): [0021]< GET_IMEI [COLOR="SeaGreen"]{35**************}[/COLOR]

D/RIL     (  102): put Channel ID '4'

I/RILC    (  102): -->CommandThread [1020] free one command

D/RILJ    (  823): [rild1] [0021]< GET_IMEI
And in CM11:
Code:
D/use-Rlog/RLOG-[B]RILC[/B](   92): [0023]< GET_IMEI [COLOR="Red"]fails by E_GENERIC_FAILURE[/COLOR]
Any ideas?
We are using SamsungBCMRIL (which is the extension of AOSP RIL itself) in the framework side. PS : That RIL class is fix for dialing, manual network mode etc, basic stuff like signals and imei should work with default setup.
And we are using all the ril blobs from stock ROM

Also, the have you checked the following scripts?
ext_data.sh
ext_kill.sh

They override props by getting original props using getprop, but when I try getprop in terminal emulator, nothing is returned o_O

Edit : @psych.half
After a bit more debugging, I found the reason why IMEI detection fails, radio fails to turn on etc.
it is due to the fact that, respective AT Commands are failing, not all commands fail, but critical commands fail :crying:
Here's how AT commands are handled in stock:
Code:
D/AT      (  102): Channel4: AT> AT+CGSN

[COLOR="SeaGreen"]D/AT      (  102): Channel4: AT< 35**************

D/AT      (  102): Channel4: AT< OK

D/RILC    (  102): [0021]< GET_IMEI {35**************}[/COLOR]
And in CM11 :
Code:
D/use-Rlog/RLOG-AT(   92): Channel4: AT> AT+CGSN

[COLOR="Red"]D/use-Rlog/RLOG-AT(   91): Channel2: AT< ERROR[/COLOR]
So any ideas? How ATs are parsed?
All we can do is in framework level, and add/remove blobs. We can't do anything with ril blobs.
 
Last edited:

psych.half

Senior Member
Jun 29, 2014
183
218
0
Well, adding those surely did 'something' to RIL. Well things went worse, but atleast now we know they are related to RIL.
Like, initially, sim0 radio was off, but sim1 radio was out of service, now both are off.

Anyways, I was comparing the radio logs of stock and cm11, let's take IMEI for instance, and see how it looks like :
Stock:
Code:
D/[B]RILC[/B]    (  102): [0021]< GET_IMEI [COLOR="SeaGreen"]{35**************}[/COLOR]

D/RIL     (  102): put Channel ID '4'

I/RILC    (  102): -->CommandThread [1020] free one command

D/RILJ    (  823): [rild1] [0021]< GET_IMEI
And in CM11:
Code:
D/use-Rlog/RLOG-[B]RILC[/B](   92): [0023]< GET_IMEI [COLOR="Red"]fails by E_GENERIC_FAILURE[/COLOR]
Any ideas?
We are using SamsungBCMRIL (which is the extension of AOSP RIL itself) in the framework side. PS : That RIL class is fix for dialing, manual network mode etc, basic stuff like signals and imei should work with default setup.
And we are using all the ril blobs from stock ROM

Also, the have you checked the following scripts?
ext_data.sh
ext_kill.sh

They override props by getting original props using getprop, but when I try getprop in terminal emulator, nothing is returned o_O

Edit : @psych.half
After a bit more debugging, I found the reason why IMEI detection fails, radio fails to turn on etc.
it is due to the fact that, respective AT Commands are failing, not all commands fail, but critical commands fail :crying:
Here's how AT commands are handled in stock:
Code:
D/AT      (  102): Channel4: AT> AT+CGSN

[COLOR="SeaGreen"]D/AT      (  102): Channel4: AT< 35**************

D/AT      (  102): Channel4: AT< OK

D/RILC    (  102): [0021]< GET_IMEI {35**************}[/COLOR]
And in CM11 :
Code:
D/use-Rlog/RLOG-AT(   92): Channel4: AT> AT+CGSN

[COLOR="Red"]D/use-Rlog/RLOG-AT(   91): Channel2: AT< ERROR[/COLOR]
So any ideas? How ATs are parsed?
All we can do is in framework level, and add/remove blobs. We can't do anything with ril blobs.
On closer inscpection the datarouter is for another functionality. You know in stock ROM we can use select which SIM to use mobile data from.

Afaik, BCMRil is for Broadcom ones Spreadtrum doesnt seem to need a seperate RIL class

So maybe we need to take libreference-ril.so and libril_sprd.so from another sprd which doesnt depend on samsung's stuff. Samsung made a lot of modification on libril on this one.. Heck there isnt even telephony framework, ril is handled by its own apps..

Update @corphish
after some log digging, AT commamds are handled by at_distributor.. but it only setups socket... and executes "am broadcast com.sec.atd.request_reconnect"..
Yup its handled by samsung's own app
 
Last edited:

corphish

Recognized Developer / Inactive Recognized Contrib
Apr 16, 2014
1,014
2,451
153
Durgapur
On closer inscpection the datarouter is for another functionality. You know in stock ROM we can use select which SIM to use mobile data from.

Afaik, BCMRil is for Broadcom ones Spreadtrum doesnt seem to need a seperate RIL class

So maybe we need to take libreference-ril.so and libril_sprd.so from another sprd which doesnt depend on samsung's stuff. Samsung made a lot of modification on libril on this one.. Heck there isnt even telephony framework, ril is handled by its own apps..

Update @corphish
after some log digging, AT commamds are handled by at_distributor.. but it only setups socket... and executes "am broadcast com.sec.atd.request_reconnect"..
Yup its handled by samsung's own app
Alright!
RIL is connected though. Never had that problem of it failing to connect.
So what's the next thing we should do? Try adding apps from stock?