[MOD] LAG FREE g2X + dalvik fix

Search This thread

huy_gm

Senior Member
May 27, 2012
398
80
Sai Gon
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

yeah, and i think we definitely can bring this mod to official upcoming ICS and get next to equal benefit. Also the same thing can be done for Linaro and other things till now. The point is we need hardware driver that only official rom can offers, so that the devs can port it to their current custom roms.

sr for my bad English.
 

B@je

Senior Member
Oct 26, 2010
187
81
Toronto
1 quick noob question. If I put the tune. sh script in my init. d folder the script will run at boot right?
Sent from my LG-P999 using Tapatalk 2
 

khanh1289

Senior Member
Aug 10, 2010
884
155
Will this work with miui v4?

Edit: running miui with this script now. Since miui is already smooth, I can't tell much difference but will report later.

Sent from my LG-P999 using Tapatalk 2
 
Last edited:

ayysir

Senior Member
Aug 30, 2011
4,552
5,980
Bronx, NY
Sorry for asking again, but are you sure??as i like this update, but the only issue is HUGE lag..Thanks anyway..:)

Well it should work it's not changing any system apps or anything in-depth. No need to worry if you just do a nandroid backup then try the fix. No harm to foul if it doesn't work
 

khanh1289

Senior Member
Aug 10, 2010
884
155
If it's not cm9 I recommend manually editing the buildprop then run the script. When you edit the buildprop with root explorer it will automatically do a backup of buildprop for you, so if things don't work out, just delete the buildprop you changed and rename the backup.

Sent from my LG-P999 using Tapatalk 2
 
  • Like
Reactions: c1c2doc

c1c2doc

Member
Dec 16, 2010
37
14
Noob-sker-doob

-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

Noob question straight ahead!

where it says "comment out with #", what does that mean?
 

rrroach

Senior Member
Jan 7, 2012
341
40
Noob question straight ahead!

where it says "comment out with #", what does that mean?

Put the # in front of the line that the guide tells you to "comment out". It's called commenting because anything that comes after the # on the same line will be skipped when the code is executed.

---------- Post added at 04:23 PM ---------- Previous post was at 04:21 PM ----------

@OP I came back to Owain's build after leaving ICS for 4 months or so. Not sure if it was because it was the first reboot I did, but after doing the first reboot since flashing the ROM and installing your script, I definitely noticed a drastic improvement in speed! +Thanks :)
 
  • Like
Reactions: c1c2doc

nodyarg

Senior Member
Jul 1, 2009
193
9
Toronto
i am on eaglesblood which is AOSP based, not cyanogen based. Is this fix relevant for me? Also, its not working for me, the tune.sh wont run. When i run it in script manager it outputs like 8 lines and each of then is followed with "permission denied". I am running SM as root.
 

Jakkumn

Member
Jul 10, 2011
39
14
Portland
nodyarg, be sure to tell script manager to run as root. First time I executed, same thing happened. Hit the little droid above crossbones and it will run root and execute fine. you can also hit the gears boot and it will auto run at boot.
 

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