Android 5.0 Lollipop memory leak fix for LG G Watch

Search This thread

arter97

Recognized Developer
Oct 14, 2012
3,765
33,763
23
Seoul
As you may know, there's a well-known Android 5.0 Lollipop issue - Memory leak.

Lots of community built ROMs out there has already applied the "supposed" fix.
Why not our LG G Watch?

For such devices which has a very long uptime, memory leaks are critical.
This "fix" should benefit to a "stabler" LG G Watch :)

Just throw the attached "services.jar" on /system/framework and reboot.
It'll rebuild all of the ART caches, so the initial boot after applying may take up to 15 minutes.
<Tested on Android 5.0.2 Lollipop build>

V2 - Support for Android 5.0.2 Lollipop build

Memory leak patches taken from
https://github.com/temasek/android_frameworks_base/commits/cm-12.0/services/core/java/com/android/server/display

Thanks to @temasek !!
 

Attachments

  • services.jar
    4 MB · Views: 203
  • services_v2.jar
    4 MB · Views: 391
Last edited:

ciccio83q

Senior Member
Nov 26, 2009
98
33
Hello arter97. Thanks for your support. Could you please be so kind to tell us how to do it?
For your information, I am currently on Gohma 2.3 and to tell you the truth, with the wear mini launcher running on the background, the g watch sometimes feels unresponsive.
Thanks again for your patience
 

Moguledyouth

Senior Member
Oct 3, 2007
556
73
Can someone please post instructions for getting the zip file on to the watch so that it can flashed by TWRP. Or how to move the services.jar to the proper location on the watch with correct permissions. I have already searched the threads, however all I can find are how to sideload apps not move files.

*Update* Finally found what I needed, so here it is.

adb push services.zip /sdcard/services.zip
 
Last edited:

Apoplectic1

Senior Member
Aug 19, 2012
389
204
Orlando
Can someone please post instructions for getting the zip file on to the watch so that it can flashed by TWRP. Or how to move the services.jar to the proper location on the watch with correct permissions. I have already searched the threads, however all I can find are how to sideload apps not move files.

*Update* Finally found what I needed, so here it is.

adb push services.zip /sdcard/services.zip

That's the one, though I usually do adb push services.zip /sdcard/Download/services.zip, but it makes no difference whether it's in the sdcard, or a subdirectory.
 
  • Like
Reactions: nexuses

lparcshinoda

Senior Member
Apr 23, 2011
332
162
37
Terracina (LT)
www.arcweb.it
As you may know, there's a well-known Android 5.0 Lollipop issue - Memory leak.

Lots of community built ROMs out there has already applied the "supposed" fix.
Why not our LG G Watch?

For such devices which has a very long uptime, memory leaks are critical.
This "fix" should benefit to a "stabler" LG G Watch :)

Just throw the attached "services.jar" on /system/framework and reboot.
It'll rebuild all of the ART caches, so the initial boot after applying may take up to 15 minutes.
<Tested on Android 5.0.1 Lollipop LWX48P build>

Memory leak patches taken from
https://github.com/temasek/android_frameworks_base/commits/cm-12.0/services/core/java/com/android/server/display

Thanks to @temasek !!

@arter97 is this fix also available for Nexus 5? I've used this - isn't it enough?

Thanks
 

Fird

Senior Member
Feb 4, 2010
66
3
Thank you! I'm waiting for an updated Ghoma release as I didn't see any sense in returning to stock to do the ota update, while it works its very smooth for me, in the mean time we'll see if this solves my crash about every-other day issue.

FYI if you're having trouble pushing the file directly to /system/framework I'd recommend placing it somewhere that doesn't require root privs to write to, such as /sdcard/Download and then doing an adb shell, su, remount system, and copying it from there into /system/framework. Make sure you back up your current services.jar in case something goes wonky.

--edit-- ERROR: caused watch to fall into a completely unresponsive state, though the time was still updating. Had to connect to usb and force a reboot with adb to break it out of whatever happened. Don't have time to diagnose further right now, reverted to stock services.jar for the moment. I'm not saying this is a general issue with this mod yet, just that it didn't work on my watch.
 
Last edited:

Lasiu

Senior Member
Aug 15, 2014
190
53
Im getting "read only file system" or something like that. Also cant get it to work with su commands. I'd appreciate if someone will make flashable zip for 5.0.2 update :D (im currently on stock recovery, but it can be changed easily with g watch tools)
 

Lasiu

Senior Member
Aug 15, 2014
190
53
Actually i made flashable zip myself (not sure if correct, but it worked). But considering fact that first "services.jar" which was uploaded for older version should replace file by same name in system/framework, shouldnt newest version be called "services" also? Now i ended up having in my framework folder "services_v2.jar" AND "services.jar". Should i rename this one with "v2"? Or is it intended to leave both of them?
 

buru898

Senior Member
Mar 13, 2008
1,960
634
RI
Actually i made flashable zip myself (not sure if correct, but it worked). But considering fact that first "services.jar" which was uploaded for older version should replace file by same name in system/framework, shouldnt newest version be called "services" also? Now i ended up having in my framework folder "services_v2.jar" AND "services.jar". Should i rename this one with "v2"? Or is it intended to leave both of them?
It's only services.jar. Rename the new one.
 

Lasiu

Senior Member
Aug 15, 2014
190
53
It's only services.jar. Rename the new one.

Thats what i did, working great, thanks! Do any of you by any chance know how to stop ota notification from appearing? (i tried going back to 5.0.1 after installing 5.0.2 but this notification appeared again :eek:)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 12
    As you may know, there's a well-known Android 5.0 Lollipop issue - Memory leak.

    Lots of community built ROMs out there has already applied the "supposed" fix.
    Why not our LG G Watch?

    For such devices which has a very long uptime, memory leaks are critical.
    This "fix" should benefit to a "stabler" LG G Watch :)

    Just throw the attached "services.jar" on /system/framework and reboot.
    It'll rebuild all of the ART caches, so the initial boot after applying may take up to 15 minutes.
    <Tested on Android 5.0.2 Lollipop build>

    V2 - Support for Android 5.0.2 Lollipop build

    Memory leak patches taken from
    https://github.com/temasek/android_frameworks_base/commits/cm-12.0/services/core/java/com/android/server/display

    Thanks to @temasek !!
    3
    Can someone please post instructions for getting the zip file on to the watch so that it can flashed by TWRP. Or how to move the services.jar to the proper location on the watch with correct permissions. I have already searched the threads, however all I can find are how to sideload apps not move files.

    *Update* Finally found what I needed, so here it is.

    adb push services.zip /sdcard/services.zip
    3
    New V2 for 5.0.2 is now up.
    2
    Sorry for stupid question. But some detail steps on how to push that service.jar would be great. I have no clue what am i supposed to do. :silly:
    Easiest way is to flash twrp, boot into recovery, go to mount and mount system.

    Open command prompt on PC, and type.

    adb push "C:\location\of\services.jar" "/system/framework/"

    That's what I did anyway, and verified that it indeed was changed, although I don't think it rebuilt caches for me because it did boot up fast, but then again I did it from a factory reset watch.
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