[DEVS ONLY] CyanogenMod 11 for Samsung BCM21553 Development Discussion

Search This thread

psyke83

Inactive Recognized Developer
Mar 29, 2011
1,267
3,959
In attachments you'll find flashable MTD recovery for TassVE.

Nice. Once we get confirmation from @bieltv.3 (or another cooperve owner) that the MTD build is also working correctly, I'd like to officially switch over to the MTD driver.

To make things easier for users, it would also be desirable to transition CM7 and CM9 over to MTD as well, so that it's easier to flash between those versions using a CWM recovery. It shouldn't be too hard to accomplish this.
 

marioherobr

Member
Mar 8, 2014
30
4
Cali
Nice. Once we get confirmation from @bieltv.3 (or another cooperve owner) that the MTD build is also working correctly, I'd like to officially switch over to the MTD driver.

To make things easier for users, it would also be desirable to transition CM7 and CM9 over to MTD as well, so that it's easier to flash between those versions using a CWM recovery. It shouldn't be too hard to accomplish this.

I have tested it on cooperve and it is working correctly, everything that was working in the lastest nightly is working in MTD build.
 
  • Like
Reactions: degdag new dev
Aug 13, 2013
28
3
Hi @psyke83 i test this MTD version and it's work very fin on my totoro without any problem just like the other nightly build
This is the logcat from my phone
Delet the .zip from the file to work for you
Sorry for my bad English
 

Attachments

  • 2014-07-21-16-37-09.txt.zip
    560.2 KB · Views: 38
Last edited:

psyke83

Inactive Recognized Developer
Mar 29, 2011
1,267
3,959
IMPORTANT!!! mandatory recovery update required for cm11 builds later than 23/07/2014 IMPORTANT!!!

As of 23/07/2014, all CM11 builds for the bcm21553 series will be switched over to the MTD flash drivers. In order for these packages to work correctly, you must first flash an MTD-compatible recovery (CWM v6.0.5.2 or later only).

Don't flash the updated recovery until a) you've backed up your data, b) the CM11 23/07/2014 build (or later) is available, and c) you're ready to switch to the MTD build.


How to update to MTD build:
  • Download an MTD-compatible recovery (linked below) and a full CM11 OTA build dated 23/07/2014 (or later).
  • Perform a full backup using the old recovery (mandatory!)
  • Flash the updated recovery, and reboot into the new recovery.
  • In the new MTD recovery, perform a data-wipe, and manually format /system (this step is critical in order for your partitions to be properly converted to the mtd/yaffs2 format - don't ignore it!)
  • Flash the CM11 package.
  • Once you've data-wiped and flashed the initial MTD build, future CM11 updates can be installed normally (delta or full packages, as you desire).

Notes:
  • Older ROMs will no longer be compatible with the MTD recovery and yaffs2-formatted partitions. If you wish to use a stock/modded Gingerbread ROM, CM7 or CM9, you should wait until MTD versions of these ROMs become available.
  • If you want to go back to a non-MTD ROM, you must flash an entire stock ROM (CSC+MODEM+PDA) via Odin, or else your partitions will be stuck in MTD format.

Packages for totoro:

Packages for tassve:
 
Last edited:

bieltv3

Senior Member
Jun 12, 2012
1,299
9,879
Barcelona
IMPORTANT!!! mandatory recovery update required for cm11 builds later than 23/07/2014 IMPORTANT!!!

As of 23/07/2014, all CM11 builds for the bcm21553 series will be switched over to the MTD flash drivers. In order for these packages to work correctly, you must first flash an MTD-compatible recovery (CWM v6.0.5.3 or later only).

How to update to MTD build:
  • Perform a full backup using the old recovery (mandatory!)
  • Download an MTD-compatible recovery (linked below) and a full CM11 OTA build dated 23/07/2014 (or later).
  • Flash the updated recovery, and reboot into the new recovery.
  • In the new MTD recovery, perform a data-wipe, and manually format /system (this step is critical in order for your partitions to be properly converted to the mtd/yaffs2 format - don't ignore it!)
  • Flash the CM11 package.
  • Once you've data-wiped and flashed the initial MTD build, future CM11 updates can be installed normally (delta or full packages, as you desire).

    Notes:
  • Older ROMs will no longer be compatible with the MTD recovery and yaffs2-formatted partitions. If you wish to use a stock/modded Gingerbread ROM, CM7 or CM9, you should wait until MTD versions of these ROMs become available.
  • If you want to go back to an older non-MTD ROM, you must first flash an entire stock ROM (CSC+MODEM+PDA) via Odin, or else your partitions will be stuck in MTD format.

    totoro:

  • Sorry psyke, I have tested MTD here and everything working as expected, good job there. About that CWM, I will post one too on cooperve version.

    Also we will try to adapt those great MTD changes to our BroadcomCM repositories and update CyanogenMod 9 and 7 with the support of this. Note though that "new CM7" is still work in porgress, but CM9 can be updated easily. Again, thanks for your efforts on development.

    Me and Alberto are a bit busy with our private lives and we lack of time for development these days :/
 
Last edited:

simo14

Senior Member
Mar 5, 2014
427
135
@psyke83 , @Alberto96
I've tested the 20140723 MTD build on tassVE , the ROM is really smooth and quite stable
There is a logcat
[ATTACHMENT]http://www.mediafire.com/view/?4cfglwujv4y6x2v[/ATTACHMENT]
And this is partition info
6ysejeve.jpg
 
Last edited:
  • Like
Reactions: maxche

psyke83

Inactive Recognized Developer
Mar 29, 2011
1,267
3,959
Requesting testers for this totoro build: http://jenkins.androidarmv6.org/job/cm-experimental/1068/

This build contains some features that need more thorough testing before they will appear in OTA builds.

Changes:
  • Switch from bcm4330 to bcmdhd wireless driver (should fix wireless instability)
  • Various LDPI fixes thanks to @koala990
  • Enable ARMv6K extensions (may slightly improve performance)

I'd appreciate if you could focus on testing:
  • General system reliability - is this build giving issues not present in OTA builds?
  • Wireless stability - is wireless working correctly, including suspend/resume?
  • Battery usage - is the new wireless driver causing more battery drain?
  • Are the LDPI changes OK?
 

dastan4eva

Senior Member
Jul 28, 2014
667
150
Don't know if i am supposed to post here , anyway these are my observations of the new experimental build

[*]General system reliability - is this build giving issues not present in OTA builds?
Haven't come across any new issues as of yet .
Maybe its just me but the random wake issue - after being in sleep for some time , doesn't wake back on at times have to pull battery, is still present . (happens rarely though )

[*]Wireless stability - is wireless working correctly, including suspend/resume?
Yes works perfectly for me , haven't had any disconnects either

[*]Battery usage - is the new wireless driver causing more battery drain?
Haven't been on the build for enough time to say statistically but as of yet i feel neither any improvement nor any notable increase in battery consumpti

[*]Are the LDPI changes OK?
Yes they're good and much welcome .

Last but not the least thank you for your time and patience
 

imbangkenneth4

Senior Member
May 6, 2014
53
4
Marikina City
Requesting testers for this totoro build: http://jenkins.androidarmv6.org/job/cm-experimental/1068/

This build contains some features that need more thorough testing before they will appear in OTA builds.

Changes:
  • Switch from bcm4330 to bcmdhd wireless driver (should fix wireless instability)
  • Various LDPI fixes thanks to @koala990
  • Enable ARMv6K extensions (may slightly improve performance)

I'd appreciate if you could focus on testing:
  • General system reliability - is this build giving issues not present in OTA builds?
  • Wireless stability - is wireless working correctly, including suspend/resume?
  • Battery usage - is the new wireless driver causing more battery drain?
  • Are the LDPI changes OK?

[*]General system reliability - is this build giving issues not present in OTA builds?
I just have the problem on wake up when someone is calling. It rings, but delay on waking up. I tried swtching to classic in incoming screen style its still th same but become less. And the headset problem. When i play music. It will lag and switch to speaker even if i'm on headset mode. Most particularly if someone texted me.
[*]Wireless stability - is wireless working correctly, including suspend/resume?
Working fine on me. No issues.
[*]Battery usage - is the new wireless driver causing more battery drain?
No, not at all. :)
[*]Are the LDPI changes OK?
Yes its good! :) Except when you add themes.

My feedback. CM11 for totoro is smoother this time around
 
Last edited:
  • Like
Reactions: amitahuja

psyke83

Inactive Recognized Developer
Mar 29, 2011
1,267
3,959
WinKarbik said:
Hi, psyke83! I have other samsung bcm21553 device and we try compilate cm11 on our device. At the moment we need to switch on mtd/yaffs filesystem, but i don't know how? Can you help me? Kernel source - https://github.com/DZB-Team/android_kernel_samsung_amazing

I can't guarantee that the MTD drivers will work on your device.

The best way to test is to compile a recovery image with:
  • the MTD patches and config enabled in the kernel
  • no fsr/rfs/sec_param modules present in the ramdisk (if you let those modules load on a mtd kernel, it could brick your device)
  • making sure to use the non-mtd fstab configs - you do not want ClockworkMod to attempt to mount the partitions yet.

When you reboot into the test recovery, extract some useful debug from the kernel via adb and let me see:

Code:
adb shell dmesg
Code:
adb shell cat /proc/mtd
Code:
adb shell cat /proc/cmdline

Don't try to mount/format any partitions as mtd yet. You need to make sure that the driver is initialized properly, and isn't giving any potentially serious warnings that could indicate that the drivers are not compatible.

P.S. I've posted this in the totoro developer thread. It's better not to ask me questions like this via PM, as everyone benefits when the conversation is public.
 
Last edited:

WinKarbik

Senior Member
Dec 4, 2013
268
388
Zakamensk
I can't guarantee that the MTD drivers will work on your device.

The best way to test is to compile a recovery image with:
  • the MTD patches and config enabled in the kernel
  • no fsr/rfs/sec_param modules present in the ramdisk (if you let those modules load on a mtd kernel, it could brick your device)
  • making sure to use the non-mtd fstab configs - you do not want ClockworkMod to attempt to mount the partitions yet.

I gave you the right to edit, please do everything you need.https://github.com/WinKarbik/android_kernel_samsung_amazing
 
Last edited:
Hint To Solve Video Recording (Hopefully)

@psyke83
@bieltv.3
@Alberto96

I Think, i found a hint to solve the video recording problem in CM11. I Think The Problem is due to audio codec.

By Default, when we press the record button nothing happens, and the camera doesn't start to record.

Now, go to settings of video camera-> More Options-> Change Audio Codec from AAC to AMR-NB. Then Try To Press The Red Record Button, The Camera Starts To record ( Shows The Pause Icon And Time EDIT:- Also Saves a 1 sec recorded file on sdcard) And After a second, it force closes. And Hope You Can Do the Rest To Fix The Issue. Plz Mention Me In the First post if i have helped you.
 
Last edited:

Alberto96

Recognized Developer
Feb 24, 2010
8,291
17,328
25
Modugno (BA)
@psyke83
@bieltv.3
@Alberto96

I Think, i found a hint to solve the video recording problem in CM11. I Think The Problem is due to audio codec.

By Default, when we press the record button nothing happens, and the camera doesn't start to record.

Now, go to settings of video camera-> More Options-> Change Audio Codec from AAC to AMR-NB. Then Try To Press The Red Record Button, The Camera Starts To record ( Shows The Pause Icon And Time) And After a second, it force closes. And Hope You Can Do the Rest To Fix The Issue. Plz Mention Me In the First post if i have helped you.

It won't help. We're already working on OMX Codecs. We'll soon post results.
 

EsromTech

Recognized Developer
Jul 10, 2012
684
2,957
São Paulo
hitherto version 20140809 is flowing well, also install the GAPPS recommended by psyke83, it's all good so far ... just reporting that all that had nightly after this, are having the status 7 error, all were incremental (delta) what's up? right now I'm downloading the full package RC9, expect that to occur in this fine ...

just a question, there is a possibility cm11 for galaxy y TV?
 
  • Like
Reactions: Bhargav97

Alberto96

Recognized Developer
Feb 24, 2010
8,291
17,328
25
Modugno (BA)
hitherto version 20140809 is flowing well, also install the GAPPS recommended by psyke83, it's all good so far ... just reporting that all that had nightly after this, are having the status 7 error, all were incremental (delta) what's up? right now I'm downloading the full package RC9, expect that to occur in this fine ...

just a question, there is a possibility cm11 for galaxy y TV?

Is it flashing fine with full wipe?

Galaxy Y TV??? What is it?

UPDATE: ok, checked on google. You should be able to use Galaxy Y roms without any problem.
 
Last edited:

psyke83

Inactive Recognized Developer
Mar 29, 2011
1,267
3,959
Cakawuete said:
Hi psyke83,
I managed to reproduced the egl bug since a few nighlties and even on a fresh and clean install of the rom. But I don't know what is triggering it but i hope it will help you to discover it.

So here is the method (on cooperve) :
Using camera app, in panorama mode with rotation enabled, just turn the phone one time, camera will freeze and turn, and turn back the phone to the original orientation, the camera will freeze, the screen will flash quicly, the color will be inverted (blue->orange) and camera will force close. I'have checked with a logcat if this is the egl bug, i find it out, and i reproduce it lot of times to make sure it's not a random bug.
Here is the link of the logcat : https://drive.google.com/file/d/0B0wgwGhk7lpHSE53UTFYYmJURDA/edit?usp=sharing
Hope it will help you and keep up the good job :)

I was already aware of this, but thank you for the effort, it's appreciated. The error message in the camera app is a bug in the app itself, but it's benign, as the problem doesn't "spread" to other apps. It seems that the real problem is not caused by eglDestroyContext directly - eglTerminate (which itself also calls eglDestroyContext) is what causes our issues.

I'm not certain how to trigger the error in eglTerminate reliably... I just have to keep opening and closing apps randomly. This is the log when the real bug (in eglTerminate) is triggered:
Code:
D/BRCM_EGL( 2625): eglDestroyContext() FATAL error - the context is still active but we called destroy - FIX THIS
E/EGL_SERVER( 2625): pid mem_get_free_space before =  3e8
E/EGL_SERVER( 2625): pid mem_get_free_space =  3e8
W/libEGL  ( 2625): eglTerminate() called w/ 1 objects remaining

This is where the function prints that error: https://github.com/androidarmv6/and.../cm-11.0/opengl/libs/EGL/egl_display.cpp#L270

P.S. I'm posting this to the dev thread. I prefer not to discuss technical stuff in PM that's not really private - it's more productive to discuss in the open where others can see and contribute.
 
Last edited:

psyke83

Inactive Recognized Developer
Mar 29, 2011
1,267
3,959
I gave you the right to edit, please do everything you need.https://github.com/WinKarbik/android_kernel_samsung_amazing

The advice I gave you should be enough to run a build yourself. For the kernel, you need the MTD patches - they seem to have been committed to that repository, so there's nothing for me to do.

The other things I mentioned (remove fsr drivers, use fstab that doesn't try mounting mtd, build recovery), you need to do yourself.
 
@psyke83

Sir, I Am Posting A Logcat On Booting A Totoro Device with cm11 12/08/2014 build. The Logcat Only Shows The Error Occuring. Hope It Helps You to fix some problems.

In The Last portion of the logcat, there are errors relating to tcp and the mobile data switches off for a minute or two automatically after the boot. Hope you can fix it.
 

Attachments

  • logcat.txt
    16.3 KB · Views: 26

Top Liked Posts

  • There are no posts matching your filters.
  • 173
    WARNING: App2SD and Mounts2SD are not recommended for use with any OTA-enabled ROMs, as they break delta updates, and may cause problems during full upgrades. I suggest using my modified version of S2E, simple2ext_mod, instead.

    NOTE 1: I recommend that everyone uses @Bhargav97's Google Apps package (cm11 v2.2 version or later). Other versions of gapps may cause issues or break delta updates.

    NOTE 2: You must ensure that your phone is running the latest baseband available for your region, or else your device will not operate correctly when a SIM card is inserted. If you have a cooperve and tassve, you may need to flash the latest totoro baseband (which will work correctly on your device). Please see @marcussmith2626's stock ROM thread for links to the appropriate files.

    Information for users:
    • This topic is intended only as a meeting point for other developers of the shared BCM21553 devices to discuss and solve issues related to development. If you are not a developer, please restrict your posts to the general discussion thread so that developers can maintain good communication. Thanks for your understanding.

    First-time installation:
    • ClockworkMod v6.0.5.3 or later (MTD version) is mandatory to install CM11. If needed, download the latest recovery build here
    • Download the latest full OTA build for totoro from here
    • If necessary, flash the ClockworkMod v6 build, then reboot into recovery. If you can't flash the CWMv6 update package (.zip) in your existing recovery, use the Odin package (.tar.md5) instead.
    • Perform a data wipe - this is mandatory if upgrading from an older Android revision
    • Flash the OTA package and reboot.
    How to update (via OTA):
    • Please consult the cm-ota instructions on Jenkins.

    Current issues (06/10/2014)
    • OMX codecs (for accelerated audio/video - may never be solved)
    • SIM unlock doesn't work (you must remove your SIM lock in another device/ROM)
    • Video recorder

    Summary of major work done:
    • Forked broadcomCM devices into androidarmv6 repository (forked from ics branches).
    • Initial changes needed for cm-11.0 have been committed to cooperve, tassve, totoro and bcm21553-common device trees.
    • All of Broadcom's code has been adapted for the cm-11.0 branch.
    • After some reverse engineering of the vendor binaries, "adbd" and "init" built from source now work correctly. ADB will now set the proper USB mode, can give a root shell, and no longer has a hardcoded dependency on /system/bin/sh, which should help a great deal with debugging. We also no longer need to use the init prebuilt binary - the source-built version is now compatible.
    • Implemented common kernel source for totoro, cooperve and tassve.
    • Implemented hybrid boot/recovery/charge ramdisk.
    • Fixed WiFi, Bluetooth, Bluetooth tether & mac addresses.
    • Fixed graphical performance regression on CM11 branch.
    • Fixed basic audio (speaker, microphone, software encoders/decoders)
    • Fixed GPS.
    • Fixed Gallery, wallpaper chooser, live wallpapers, RenderScript, and possible EGL crashes in other apps
    • Added workaround for SystemUI corruption
    • Fixed graphical corruption/stability issues (caused by buggy GL_EXT_discard_framebuffer extension)
    • Fixed RIL, telephony and audio routing to speakers, headset, earpiece, microphone and microphone mute.
    • Audio routing improvements/fixes, small graphics performance optimizations
    • Fixed camera
    • Fixed wifi tethering
    • Updated to newer bcmdhd wifi driver to resolve wifi instability
    • Fixed USB tethering (with caveats)
    • Improved audio routing and fixed BT headsets (SCO)

    * = this code is work in progress, which means that it is not yet available in the OTA build.

    XDA:DevDB Information
    CyanogenMod 11 for Samsung BCM21553 series, ROM for the Samsung Galaxy Y GT-S5360

    Contributors
    psyke83

    Version Information
    Status: Testing

    Created 2014-10-27
    Last Updated 2014-10-27
    51
    I will update cooperve device tree as soon as I can. I guess @Alberto96 could adapt tassve (his device). Lets get some fun here ;)

    Enviado desde mi Xperia SP mediante Tapatalk
    49
    I've solved the graphics performance issue on CM11. Will upload the changes soon. We're getting close to a first usable build, but there are still quite a few things that need fixing.
    44
    Hey folks,

    After a lot of research, I discovered the issue causing graphical instability on CM11. It seems that a certain OpenGL extension (GL_EXT_discard_framebuffer) is buggy, and was causing parts of the interface (or at times, the entire screen) to flicker red at random intervals. To solve the issue, I've simply disabled the extension within the VideoCore driver. This not only fixed the corruption issues, but also seems to have improved graphics performance, and - most importantly - has tremendously improved overall stability. Before this change, applications would often crash at random intervals with stack traces pointing to libhgl, but now, those crashes no longer seem to occur. Why was this not causing problems on ICS? Well, the extension is still broken on ICS, but it's never actually utilized in Android's ICS code, so the problem never manifested.

    Although there are still major issues to be fixed (see post #1), I feel that the port is now mature enough for wider testing. I've added the three devices (cooperve, tassve and totoro) to the OTA and nightly build lists on Jenkins, and I'll soon provide instructions on how to install these builds.
    42
    Good news: I've figured out the ALSA routing. It was very annoying, because I realized only today that the "tinymix" binary (a replacement for amixer) doesn't work when there are two integer values in a mixer. By chance I tried using alsa_amixer, and it worked. So, we first need to fix tinyalsa before adapting the audio driver.

    Here's the mixers:
    https://gist.github.com/psyke83/a6ca133e023d966c273b

    Oddly, none of the speaker/earpiece/headset switches have any effect. What does work is the PCM Playback Route. It has two values - the first specifies to remove (0) or add (1), and the second value corresponds to the audio device (defined in the kernel driver). The audio endpoints are defined here: https://github.com/androidarmv6/and...udio_controller/public/audio_controller.h#L57

    By default, when the audio device is opened, audio outputs to the loudspeaker (4). So, to turn off the loudspeaker and change to the headset (1), I would do this:
    Code:
    adb shell tinymix 10 0 4
    adb shell tinymix 10 1 1

    But, checking the kernel log, it seems that the driver doesn't receive the second value (it's always set to 0).

    This works (mixer id is offset by 1 compared to tinymix):
    Code:
    adb shell alsa_amixer cset numid=11 0 4
    adb shell alsa_amixer cset numid=11 1 1

    The CM11 tinymix version has a bug in which it doesn't recognise two or more integers as arguments, but I manually applied this patch from upstream to fix it: https://github.com/tinyalsa/tinyalsa/commit/8b772cc507f4c3a3b2ce5ca8a2cebbc60d1fa684

    I hoped that this was enough to fix the issue, but it still never sets the second value properly. The kernel sound driver debug lets me see what's sent, and when using tinymix, the second is always zeroed...
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone