yashsingh1/xdaforums huggingface dataset:
[Xposed Framework Modules] tonyp:
Thanks about the great feedback!

If any of you has another commit for a memory leak fix you can link me to it and I'll have a look about implementing it with Xposed. This applies for everything that's done in Java. I had a look but couldn't find any other fix than the one I fixed with this module (except some stuff in chromium, but I'm certainly not touching that).

That's not possible. Period.

The module replaces a whole function, once you disable/uninstall it your system will use the default one again.

Whatever you did, it's not this modules fault.
[Xposed Framework Modules] TeamAndroid14:
WOW

I was hoping someone would make a module for this damn memory leak,thank you and looking forward for next update :D:good:
[Xposed Framework Modules] TerryV:
Looking good at almost 24 hrs.

Memory seems do be managing more efficiently. No crashes or apparent bugs to report here. Keep up the great work and thank you.

I'm running stock 5.0.1 with elementalx kernel on Nexus 5.
[Xposed Framework Modules] twist3d0n3:
hahahahah

been doing a fine job on my xt1032
[Xposed Framework Modules] vanlong441:
no crashes whatsoever. very good so far. thanks dev.
[Xposed Framework Modules] miku1024:
Thank you tonyp it's works on galaxy note 1 running cm12 unofficial, no more choppy sound causes by low memory

Sent from my GT-N7000 feat hatsune miku
[Xposed Framework Modules] remostalin:
when i trying to install got failed (Omni lollipop) wave 2 :(
[Xposed Framework Modules] Genie's:
Our Koreans say this module is very efficient for managing LP Mem Leak.

Someone says in his Nexus 5, average of System memory 200 - 300.

And other says this module has good effect on his device even in CyanogenMod 12.

I think this module is the best way to avoid RAM leak in AOSP 5.0.X.
[Xposed Framework Modules] swa100:
This isn't the same leak that's f***ing up android 5.1, right?
[Xposed Framework Modules] TeamAndroid14:
Dont listen to him, its the same memory leak. memory leak is a memory leak, he needs to read the website in OP.
[Xposed Framework Modules] celikbasm:
[MENTION=3605868]tonyp[/MENTION] Thanks for the Info but, my problems started after I installed this fix and I didn't change anything... I see all other guys congratulating you for this fix but my experience is vice versa... I only shared my experience and don't blaming you. I aware of that is xposed still on alpha and may conflicted with stg. So all can be experimental and I'm looking for a way without factory reset. If I only restore system partition from recovery will it be possible to revert back?
[Xposed Framework Modules] tonyp:
No, it's not. The one on android 5.1 is marked as fixed in the AOSP issue tracker but unfortunately Google didn't publish the fix, as usual.

So we need to wait until they include it in a release and push the source to AOSP (because for whatever reason they did not include it in 5.1 r3).

What the heck are you talking about?

A memory leak happens when resources don't get freed properly and thus the memory stays allocated.

So yes, leaks certainly can and do happen at different places.

Well, all I'm saying is: it's not really possible that this module is the root cause of it.

The module doesn't change anything permanent and once disabled (and after a reboot of course) it doesn't touch anything in your ROM anymore and your system will use the original (memory leak flawed) method again instead of the one provided by the xposed module.

I would just reflash the ROM or restore a /system backup.
[Xposed Framework Modules] fedef12evo:
working good on xperia sp with unofficial cm12 from february, now i can use my phone :D, before i cant even unlock screen after hours
[Xposed Framework Modules] NotesOfReality:
Hey man!You're a genius and this is a genius idea but do you know how can we test if the memoy leak is already patched?
[Xposed Framework Modules] twist3d0n3:
there's always one... DO NOT QUOTE OP!
[Xposed Framework Modules] NotesOfReality:
Hey,ok excuse me I wasn't wanting to make you angry
[Xposed Framework Modules] Ja_som:
[MENTION=3605868]tonyp[/MENTION] I tried your module today, it was looking good for some time, but I also had 4 random reboots today :(
[Xposed Framework Modules] thenestor:
No noticeable side effects after installing, enabling, and rebooting. Seems to be working. I'm on a Moto X 2014 Retail (xt1095) running lollipop 5.0 and xposed framework 3.0a2 (bridge 62). Thank you!
[Xposed Framework Modules] DarkBlack22:
Guys 1 question. I'm running cm12 on my I9505 Galaxy S4. I'm getting major memory leak issues. I can't even listen to Spotify when using the phone. It'll just stops and restarts. Help :/

Sent from my GT-I9505 using WIGGLE WIGGLE WIGGLE
[Xposed Framework Modules] twist3d0n3:
Install memory locker and lock only music apps, it's totally stopped them being killed for me.
[Xposed Framework Modules] FuMMoD:
Going to try this because the leak killing my music apps is so annoying.
[Xposed Framework Modules] twist3d0n3:
i've been using it since i've been on LP and i've been able to use poweramp whilst using firefox/xda etc without music stopping so you should be golden with that ;)

i also added things like nova launcher/swiftkey which also helped with redraws/keyboard popup times.
[Xposed Framework Modules] solarus2011:
After testing on my Moto X (2014) for the last couple of days, the phone definitely seems to be suffering less. Had a couple of redraws when going back to home screen but compared to before its way better. Thanks for the work.

Sent from my Moto X (2014)
[Xposed Framework Modules] pdppdp:
Can confirm this too (Moto G 2014 XT1068).
[Xposed Framework Modules] flash3d:
Haven't tried it myself yet, but does this work on the S4 GPE Lollipop (5.0.1)?
[Xposed Framework Modules] FuMMoD:
You might be the first. If it can run xposed them you can run the module.
[Xposed Framework Modules] flash3d:
For the sake of science I installed it (made a nandroid) and it seems to install fine.

Have to wait a few days to experience the result.

I experienced sluggishness after a few days uptime with lollipop, hopefully it will be better now.
[Xposed Framework Modules] E30Nova:
How can we tell if we have the memory leak? What does a redraw look like? If we're on a custom ROM and the leak has been fixed, is it OK to install this?

Sorry for all the questions, I just don't know what the effects of a memory leak look like. Just trying to determine if I actually need this or not.
[Xposed Framework Modules] ArjunrambZ:
A memory leak typical means that all the memory is used gor a specific task and then when it's over it is not release, which means there is less memory for other apps. hence when v memory deplete after an extend there will be launcher redraws, or app crashes or more over system reboots
[Xposed Framework Modules] Kevin M:
Thanks for this fix [MENTION=3605868]tonyp[/MENTION]! I've submitted a pull request that could squash a possible bug (or bug waiting to happen). I've noticed that your repo is also without a license + credits. May be worth adding one. Not trying to seem pushy (hah..) but basing your module off the relevant AOSP commit could subject this fix to the Apache 2.
[Xposed Framework Modules] tonyp:
Hi [MENTION=4195957]Kevin M[/MENTION], thanks a lot, you're absolutely right!

I copied that check over from somewhere and never really looked at it closer.

Actually it's quite interesting that it works flawlessly both here and for my TrueSilentMode Xposed module where I'm using the same thing.

Both modules are well tested and no one ever complained, so the check seems to work every time - which is kind of surprising as Java, like you said, is comparing the objects rather than the actual string.intern().

Thus it appears Android/Java always references the new object to the old memory address. Interesting! Usually I wouldn't have assumed it to be that failsafe.

While we're at it, I slightly improved your version: https://github.com/tonyp/FixLollipopMemoryLeak/commit/4b3bbb886d8315fb1f9eaf60e86ae1fb410a47dd

As "android" will always be a valid object this prevents a possible NPE in equals(). Yes it's highly unlikely, but a) it's the better code style and b) murphy's law :laugh:

Regarding the licence: I'll just licence it with Apache 2, thanks for the hint.

It's questionable if this would really subject it to Apache 2 as I, while following AOSP's code, completely reimplemented it.

Copyrights can't protect a functional rewrite, at least not where I live (although it might still apply as I did copy some lines).

But then again, it doesn't matter. I just like nitpicking - as do you apparently :highfive:
[Xposed Framework Modules] Kevin M:
I'll have to remember to do some more testing with the String references. It's possible it's a Dalvik quirk that was carried into ART for compatibility reasons. When I encounter issues like this in Xposed modules I usually just assume it's Xposed-related. There's a lot of developer documentation that needs to be written for it perhaps most importantly including some

I was considering doing "android".equals but I decided against it because it was closer to your original comparisons and some people have very strong convictions on what order is more readable. I also figured that if an NPE were to occur there it would actually have the desired effect (returning from the call) albeit at a slight speed cost + Xposed log.

I also have a slightly cleaned-up repo that I pieced together to get it building correctly in the latest Android Studio along with some potential (negligible?) performance improvements. I'll submit another PR if you're open to it. No use bikeshedding on GitHub when I can just do it here and increase my post count. :angel:

As for the licensing I think (aka IANAL) that since you've seen the original code a re-implement would still be subject to the Apache 2. It would be different if you re-implemented without knowing the original source. I believe whether or not you've (whoever) actually seen the code (and what constitutes a derivative work) is a popular point of contention in messy software copyright law. I'm not even certain that the Apache 2 has a clause that would apply here. I may be recalling this from a GPL issue. Meh. I just stick credits in a big file somewhere and hope for the best.

Now that I mention it I think I just copied my reasoning from the first season of Halt and Catch Fire. Oh well.
[Xposed Framework Modules] tonyp:
Ah sure go ahead. I can always decide when to look at the pull requests. I'm quite busy these days as I'm working on another project where I'm kind of stuck implementation-wise - and still want to release my overhauled True Silent Mode plugin. So yes, some bikeshedding is exactly what my procrastination-desire needs.

Please make sure to post in this thread once you sent our pull request. While I might get an email as well this way you can further bump your post count - which is ridiculously low considering those nice Xposed projects and most amazing weather app you released.

Regarding the licence. I guess there's no final answer, we could argue for both sides.

I doubt anyone out there even cares, so I like the hoping for the best approach.

I'll leave with this:
[Xposed Framework Modules] Kevin M:
I haven't had (and still do not, honestly) have much time to participate in threads which are not my own. I just try to be as helpful as possible in the few places I'm actually needed. Eventually, in my haste to not do other things, I'll wander into other threads like this one. I really appreciate the kind words on my Android projects.

Pretty sure Fisher Price is just biding its time with iOS 7+ and Yosemite...
[Xposed Framework Modules] Krule:
I have tested this module and it works really great with cm12. My battery last longer with this. Thanks for your great work awesome:good::good::good:
[Xposed Framework Modules] Kevin M:
Just pushed over the two PRs I mentioned earlier [MENTION=3605868]tonyp[/MENTION]. Thanks!
[Xposed Framework Modules] Guto ViP:
Works with Sony Z3 5.0.2?
[Xposed Framework Modules] FuMMoD:
It works on whatever can run xposed framework.
[Xposed Framework Modules] grad061980:
This module works on my Moto X 2nd Gen XT1093 for USCC. I kept having iheart radio (or any streaming media over bluetooth) quit after a few minutes with the screen turned off. I installed this & rebooted & have not had any media streaming app quit so far. Thanks.
[Xposed Framework Modules] ICavalera:
Only on aosp based roms?

Because I'm using 5.0 stock LG G3
[Xposed Framework Modules] Griffiths_Anna:
I'm on z3 Sony lollipop rom and it seems to work like a charm..
[Xposed Framework Modules] tonyp:
I've just released version 1.1 to the Play Store, you can grab it here.

It includes the code improvements [MENTION=4195957]Kevin M[/MENTION] kindly sent to my Github repo. Thanks a lot!

Additionally I added a settings interface.

This might not be that useful for this app in particular as it does all its work without the need to configure anything.

Here you can enable a debug mode to see the module is properly working (restart required currently).

Yes, you can enable a launcher icon, too - although I doubt there's any valid reason to do so except to admire that quickly generated truly amazing application icon.

I merely added this to lay out some ground work for the upcoming update of my True Silent Mode for Lollipop module.

I will push it to the Xposed Repo later on, first I'd like to test out the Google Play update.

v1.0 is completely stable, this is a minor update.
[Xposed Framework Modules] Kevin M:
Awesome news! Thanks for the merges.
[Xposed Framework Modules] luckana:
Will this work with the unofficial 5.1 alpha version of xposed

Nevermind, i saw it's fixed in 5.1. Delete
[Xposed Framework Modules] Deva Kaushik:
I have installed the app but please explain me how to activate the module in the xposed installer.
[Xposed Framework Modules] shawnbrennan55:
Just check the box next to the app in the Xposed "Modules" list and reboot.
[Xposed Framework Modules] marchino123:
It works on 5.1?
[Xposed Framework Modules] Andii S.:
fix is allready in 5.1 you dont need the Modul

Send with a Boeffla powered Lollipoped GT-I9300
[Xposed Framework Modules] Basche:
It says in the first post, like the 2nd and 3rd senrence.. .............................................
[Xposed Framework Modules] Ja_som:
It's not, a lot of people report that leak is still present.

Try it (on your own risk, because Xposed for 5.1 is unofficial and "super alpha") and let us know.
[Xposed Framework Modules] bipinbedi:
Memory Leak[5.1]

Memory leak is still present in 5.1, google is yet to release patch for the same.
[Xposed Framework Modules] tonyp:
Please read the OP.

There isn't a single memory leak in Android, there are multiple - this module fixes the worst one in Android 5.0, which Google patched in 5.1.

I've implemented a failsafe in the module which detects Android 5.1 and will disable it's functionality, so it does literally nothing (except adding a log entry that it won't work) when you use it on 5.1.
[Xposed Framework Modules] DarkBlack22:
My note 2 running cm12 is not having ANY memory leaks problems..... With my s4 running cm12 memory leak is FREAKING ANNOYING. Just by watching YouTube or browsing the web my running apps will close and after activating this module nothing's fixed. Any explanations?

Sent from my GT-I9505 using WIGGLE WIGGLE WIGGLE
[Xposed Framework Modules] tonyp:
Please read the OP carefully to understand the purpose of this module.

First of all, it clearly mentions that this module won't do anything in recent CM12 ROMs as they already fixed the particular memory leak issue this module is targeting.

Next, don't confuse a memory leak with a shortage of physically available memory or bad memory management.

What you're describing can have a multiude of reasons (lots of apps running in memory, bad low memory killer configuration in the kernel or user space etc), but the ColorFade memory leak clearly isn't the cause.

A memory leak in the SystemUI exacerbates over time, so it gets worse the longer your device is in use and hasn't been restarted.

More and more memory gets allocated but not released thus the available memory for other apps to claim is lessened gradually over time.

Mini FAQ:

What is a Memory Leak? (reddit : eli5):

What this module doesn't do:

It won't magically make your device running faster

It won't do anything on recent CM12 ROMs as they already fixed it

It won't fix other memory leaks than the ColorFade one (which is the most sincere in Android 5.0, though)

It won't work on Samsung Stock ROMs as Xposed still isn't compatible

It won't do anything on Android 5.1 ROMs as Google already fixed it

(yes, I know they missed/introduced at least one other major leak, but as they did not make the patch public no one can easily fix this in a custom ROMs or via Xposed)

It won't combine random funny cat videos with awesome music for your proc(r)astination needs.

You might want to use the Procatinator for that.

What this module does do:

Fix the ColorFade Memory Leak reported to Google here and fixed in Android 5.1 here.

Thus it should ensure that more free memory is available for your system and apps in the long run
[Xposed Framework Modules] RSDamasceno:
[MENTION=3605868]tonyp[/MENTION] add this at first post.

----

Moto Maxx - XT1225

Xposed Stock Android 5.0.2
[Xposed Framework Modules] DarkBlack22:
Thank you for everything. Now i truly understand what memory leak is. And sry for filing a bad report here. It was me how set my kernel low memory killer to aggressive.
[Xposed Framework Modules] Solace50:
if there's no off animation does the leak still occur?
[Xposed Framework Modules] beautifulsun:
It works! CM12 5.0 here.
[Xposed Framework Modules] BikiniMinee:
will this mod work on 5.1?
[Xposed Framework Modules] MP2005:
read first post
[Xposed Framework Modules] Basche:
Or read the title haha
[Xposed Framework Modules] tonyp:
I've pushed a new update to the PlayStore (it might take a couple hours till it's online) and Xposed Repo.

Changelog v1.2:

Debug mode changes don't require a reboot

Reference the Xposed framework rather than compiling it

(reduces the app size from 65KB to 31KB)

Restrict installation and PlayStore listing to Android 5.0 devices

this will hopefully help those poor lazy peple who fail to read the description that it only works for 5.0.x

Merged Korean translations by SDKoongchi

if you want your translation merged you can send me a pull request at Github, although this module doesn't really need translations IMHO as it does all it's work in the background

You can check out all changes at Github as the module is fully open source.
[Xposed Framework Modules] KoolSIM:
Thanks [MENTION=3605868]tonyp[/MENTION]
[Xposed Framework Modules] mannequin:
can somebody comment on how helpful this mod actually is because after using official LP 5.0.2 on my LG G2 i'm just puzzled how bad the memory management is, especially after spending so much time on KK which had none such issues.

even with plenty of free ram available and very light multitasking every background task gets killed even the ones running status bar notifications and the most annoying thing, every media player too which is just a big NO and something that was last experienced on Gingerbread.

forget about opening chrome or any reddit reader. even with one tab open going back to Home stops the music and redraws the screen. and that's with like 3 apps open and about an hour of run time.

just bizarre.
[Xposed Framework Modules] PhoenixNLx:
Got a lg g2 too and I can confirm this! Seems like its not working for the lg g2 stock 30a lollipop 5.0.2
[Xposed Framework Modules] tonyp:
As I wrote in the FAQ #1, this module "won't magically make your device run faster".

If LG ****ed up the memory management that's nothing this module intends to fix. And I used to develop for the LG Optimus 2x so I know how ****ty LGs software is.

You might want to look at other tools out there, e.g. to tweak the minfree values and/or custom kernels which include a better lmk.

This module is targeted at one specific issue in Android 5.0.2, the ColorFade memory leak.

It seems like most vendors (Motorola etc.) didn't notice it and introduced it in their software, too, but if LG's devices suffer from it I can't say for sure, they do not publish their source (you might be able to verify this with smali, but I won't bother).

Since I'm using my module on the N5 with AOSP 5.0.2 the memory leak issue has reduced greatly for me, I don't have to reboot the device daily but can easily use it for a couple days without all my apps running out of memory after a couple hours of usage.

To sum up: The stuff [MENTION=3623388]mannequin[/MENTION] describes does not offer any indication if this module has an effect or not.

Thumb rule: If everything works like a charm after a reboot but things get worse and worse after a while (until the next reboot) your device probably suffers from memory leaks.

After a fresh reboot you'll have your device running without any memory leak issues, this module won't improve anything else.

But as using it won't do any harm you could at least make sure your device is not suffering from the ColorFade leak, apart from all the other issues you might have.
[Xposed Framework Modules] mannequin:
[MENTION=3605868]tonyp[/MENTION]

thank you for more details. it's just people refer to this thread as a fix for all the LP memory troubles while there's much more to it, at least on LG version, then the infamous stock memory leak(s).
[Xposed Framework Modules] xDanVitox:
Delete.

Wrong thread...
[Xposed Framework Modules] eyesfortech:
For Confirmation, does the device need to be rooted?

Hi,

I just wanted to confirm, will this work if the device is not rooted? I mean you need to be rooted to get Xposed framework right?

Or it will work on stock ROM by just downloading XPOSED then this module?

Thanks for the response
[Xposed Framework Modules] Guto ViP:
Needs root to use Xposed.
[Xposed Framework Modules] eyesfortech:
As suspected...thanks.
[Xposed Framework Modules] nithinte:
Great module. PS: I have exposed+ Gravity box installed. Is there anyway to remove Camera and Dialer shortcuts in Lock screen
[Xposed Framework Modules] asingha94:
Nice work.I have been following your work since optimus 2x though I have changed my device.You are a legend.
[Xposed Framework Modules] Tani2:
How to make it work? I've installed it on my moto g 2014 running 5.0.2 Sir.
[Xposed Framework Modules] tariq2kn:
Will there be a standalone app with only root access as xposed is not proper on samsung based android 5.

Samsung Galaxy S5 DUOS LTE (SM-G900FD).

ROM: G900FDU1BOD1, Android 5.0.
[Xposed Framework Modules] divyans:
cool
[Xposed Framework Modules] xXFlippyXx:
Nice,

Been having launcher redraws and crashing Walkman when browsing with chrome. Hope this helps

Thanks
[Xposed Framework Modules] DarK_MischieF:
Makes an enormous difference on my Z3 Compact. Less redraws, faster animations, much smoother performance on all fronts. Thanks so much!

Sony Xperia Z3 Compact (D5803)

Build 23.1.A.0.726 (5.0.2)
[Xposed Framework Modules] :
You're doing a great job with your apps, [MENTION=3605868]tonyp[/MENTION]. Thanka for your contributions.
[Xposed Framework Modules] albsat:
Is xposed necessary? I mean can we have this app working without exposed?
[Xposed Framework Modules] itslels:
Its for xposed, so what do you think?
[Xposed Framework Modules] albsat:
Hmm...let me repeat. Is it possible to have same mod but not though xposed?
[Xposed Framework Modules] tonyp:
There might be a way to somehow inject the memory leak fix via smali, but that's about it.

You'd have to decompile the services.jar from your ROM, then you should find a smali file at: "com/android/server/display/ColorFade.smali".

Here you have to apply the fix (by e.g. taking it from a fixed version), recompile the jar and push it back to your ROM.

Obviously root and an unlocked bootloader are required. But you're on your own, I'm not interested into exloring this idea further.

Apart from that I can't think of any way to fix this particular bug without Xposed.
[Xposed Framework Modules] shaldi:
Xposed not yet compatible with s6 edge