[MOD] LAG FREE g2X + dalvik fix

Search This thread

flak0

Senior Member
Jan 3, 2009
1,650
581
Pembroke Pines , FL
So far for the past two months or so we have been having the wonderful devs build some pretty awesome ICS Roms. I have been lucky enough with the rest of those on the g2x threads to benefit from Owains awesome ICS builds especially the latest linaro build. Now the one issue with ICS lately is the memory leaks and the lag that slows the phone down to a crawl. The lag on my phone especially got me looking through the internet and doing research on why it could be happening. I first found out that the implementation of Zram on ICS did not work correctly with our devices. This around the time I decided to disable the Zram on the ICS build from OWAin which at first when disabled it worked a little while but then it would start to slow down again. This is when I started messing with the build.prop and started messing around with the dalvik dexopt flags. I could probably go on and on but i will cut it short here. Now I am proud to present to you the lag free -dalvik fix. I obtained the following script with permission from batoo and his thread from the ATP forums. Link: http://xdaforums.com/showthread.php?t=1721799
. The dalvik dexopt flag change were found through research of android and the internet. Below is the procedure to get some serious butter melted from our G2x along with a smooth ride. There are two files you need: 1.modified build.prop or do manual fix 2.tune.sh script (script manager recommended)

NANDROID-BACK UP- YOU HAVE WARNED

Step 1: Download lagfree.zip below
Step 2: Extract to sdcard or internal storage
Step 3: assuming your using a rooted file browser. back up your current build.prop
Step 4: place the extracted build.prop in system folder and set permissions to RW-R-R
Step 5: reboot into reocvery and wipe dalvik cache
Step 6: reboot, dalvik cache will rebuild
Step 7: use Script manager or whatever app and run the tune.sh make sure you run with SU permissions. Reboot will disable script, run at every boot or set it with script manager
Step 6: Enjoy the buttery smooth g2x

-Manual Mode --
Open build.prop and add the following
change dalvik.vm.dexopt-flags=m=y TO
dalvik.vm.dexopt-flags=m=y,v=n,o=v,u=n
right below add
dalvik.vm.execution-mode=int:jit
then change windowsmgr.max_events_per_sec = 300
comment out with #
dalvik.vm.heapgrowthlimit
then save
then goto step 5 above.

Please provide feedback nd enjoy....

now im off to get drunk...


Sent from my Transformer Prime TF201 using xda premium
 

Attachments

  • lagfree.zip
    2.1 KB · Views: 3,503
Last edited:

huy_gm

Senior Member
May 27, 2012
398
80
Sai Gon
how can i test for how much it is better from before, i mean is there a specific way to see butter leaking, like scrolling in specific area or something

sr for my bad English.
 

flak0

Senior Member
Jan 3, 2009
1,650
581
Pembroke Pines , FL
Not related to the thread but I'm the OP and I'm getting tipsayyy lol
uploadfromtaptalk1340429481112.jpg
Bud light Platinum + Hangover 2

Sent from my LG-P999 using xda premium
 
  • Like
Reactions: TOG565

noahk423

Senior Member
Sep 4, 2011
566
199
ur welcome. maybe just maybe i might start developing again.... i got the i7 quad core overclocked at my old house.. hmmm

Sent from my Transformer Prime TF201 using xda premium

I'd say go for it man! You're legit, haha. And with that monster of a computer you have, that makes it all the better. Lol.

Sent from my LG-P999 using XDA
 

cricketAC

Senior Member
Aug 5, 2011
1,013
230
Just to be on the same page, in step 7 you mentioned to run tune.sh with script manager after every boot manually or will giving root permission to script manager do it automatically.?
 

Vugari

Senior Member
Dec 8, 2009
67
8
Awesome find. This script makes the wait for official ICS a little less hard on me. Very smooth.

Sent from my LG-P999 using XDA
 

Top Liked Posts

  • There are no posts matching your filters.
  • 35
    So far for the past two months or so we have been having the wonderful devs build some pretty awesome ICS Roms. I have been lucky enough with the rest of those on the g2x threads to benefit from Owains awesome ICS builds especially the latest linaro build. Now the one issue with ICS lately is the memory leaks and the lag that slows the phone down to a crawl. The lag on my phone especially got me looking through the internet and doing research on why it could be happening. I first found out that the implementation of Zram on ICS did not work correctly with our devices. This around the time I decided to disable the Zram on the ICS build from OWAin which at first when disabled it worked a little while but then it would start to slow down again. This is when I started messing with the build.prop and started messing around with the dalvik dexopt flags. I could probably go on and on but i will cut it short here. Now I am proud to present to you the lag free -dalvik fix. I obtained the following script with permission from batoo and his thread from the ATP forums. Link: http://xdaforums.com/showthread.php?t=1721799
    . The dalvik dexopt flag change were found through research of android and the internet. Below is the procedure to get some serious butter melted from our G2x along with a smooth ride. There are two files you need: 1.modified build.prop or do manual fix 2.tune.sh script (script manager recommended)

    NANDROID-BACK UP- YOU HAVE WARNED

    Step 1: Download lagfree.zip below
    Step 2: Extract to sdcard or internal storage
    Step 3: assuming your using a rooted file browser. back up your current build.prop
    Step 4: place the extracted build.prop in system folder and set permissions to RW-R-R
    Step 5: reboot into reocvery and wipe dalvik cache
    Step 6: reboot, dalvik cache will rebuild
    Step 7: use Script manager or whatever app and run the tune.sh make sure you run with SU permissions. Reboot will disable script, run at every boot or set it with script manager
    Step 6: Enjoy the buttery smooth g2x

    -Manual Mode --
    Open build.prop and add the following
    change dalvik.vm.dexopt-flags=m=y TO
    dalvik.vm.dexopt-flags=m=y,v=n,o=v,u=n
    right below add
    dalvik.vm.execution-mode=int:jit
    then change windowsmgr.max_events_per_sec = 300
    comment out with #
    dalvik.vm.heapgrowthlimit
    then save
    then goto step 5 above.

    Please provide feedback nd enjoy....

    now im off to get drunk...


    Sent from my Transformer Prime TF201 using xda premium
    3
    Anyone that's going to do this on HFS needs to do it manually or you will miss out on the other build prop mods... thanks again flac0! Helps out a lot!!

    Same on domination how ever it will be included in the next release

    Thanks flac0

    Sent from my HTC One X using xda premium
    2
    Sweet... hey let me ask you, where did you host that image? im not familiar with the google user content url... is that g+ or something?

    picasa, its the embed image option when you choose how to link a photo.
    2
    Flashable zip ready for automatic installation:

    pastime1971 said:
    tony and i have worked out a flashable zip of init.d script + build.prop mod
    there are two types of installations. choose one you like.

    * system installation *
    buttery-system.zip : edits /system/build.prop & installs /system/etc/init.d/99tune
    to revert it, simply re-flash ROM.
    you have to flash this every time you flash a ROM.

    * user installation *
    buttery-local.zip : edits /data/local.prop & installs /data/local/userinit.d/99tune
    buttery-local-remove.zip : reverts /data/local.prop & removes /data/local/userinit.d/99tune
    this changes /data/ and therefore, the effect is permanent unless you change it manually, which is the reason for buttery-local-remove.zip

    # do a nandroid backup always.
    # it probes if ROM is GB or ICS and apply mod accordingly. (only tested on ICS. please test it and feedback on GB.)
    # to check if it is working, do the following in terminal
    Code:
    getprop | grep dalvik
    getprop cm.buttery.active
    cat /proc/sys/vm/*

    !!! this script is based on vork kernel installer. the credit goes to vork team (benee and kiljacken)
    Please give pastime1971 a "Thanks" at the following post: original post by pastime1971
    2
    Will this work on the rooted v21y stock rom?

    Should work for any Rom it does not change anything in-depth