Thursday, March 3, 2011

Universal Zip (imoseyon mods)

UPDATE:
v5.2 is up

I finally had a chance tonight to create one zip to rule them all.  No more maintaining four different versions.  The new zip contains a script that runs when you flash it the first time to determine what needs to be enabled and makes the necessary changes regardless of which ROM you're on.

More details on the mods

What to expect - hopefully faster, more stable, and longer lasting DX/D2.
How to check if the mods are in effect: 1) Launch Terminal Emulator, 2) Type "sh /data/imoseyon/checkimosey.sh", without the quotes and hit enter.

(Keep in mind that this is a work in progress and your mileage WILL vary.)

Downloads
Change Logs
  • v5.2
    • tweaked minfree to be less aggressive for foreground app and background services
    • does a nightly check to see if it's enabled at boot and fixes it if the boot startup is clobbered by another app.
    • new script - run "sh /data/imoseyon/checkimosey.sh" anytime to see if all the tweaks are in effect.
  • v5.11: fixed a bug where if you didn't already have busybox installed my tweaks probably didn't stick at boot (for 3.4.2 users).
  • v5.1: updated to work on 3.4.2. (only 3.4.2 users need to flash)
  • v5.0: universal version for all ROMs.  Created two separate zips for governor types. (upgrade from 4.3 is only necessary if you want to go back to ondemand governor).
You can find the old change logs here.

Here are the differences between the two governors (taken from the Cyanogen docs):
The CPUfreq governor "interactive" is designed for low latency,
interactive workloads. This governor sets the CPU speed depending on
usage, similar to "ondemand" and "conservative" governors. However
there is no polling, or 'sample_rate' required to scale the CPU up.

Sampling CPU load every X ms can lead to under powering the CPU
for X ms, leading to dropped framerate, stuttering UI etc..

Scaling the CPU up is done when coming out of idle, and like "ondemand"
scaling up will always go to MAX, then step down based off of cpu load.
What's my verdict?  It's hard to say.  Interactive governor does feel a bit snappier but theoretically it should consume a bit more battery.  And I had a random reboot for the first time in months, after enabling interactive governor.... I'll post my opinion after using it for a week or so.

92 comments:

  1. I'm running Liberty 1.5 and have enabled overclocking on boot (by enabling the oc.sh script in the init.d file). When I check the freq in SetCPU, it accurately shows my tweaked oc values (1200, 800, 400, 300). And, the freq_table shows those values as well.

    When I check the time_in_state stats, however, it shows the stock freq (1000, 900, 600, 300). Should I be worried something isn't applied correctly?

    ReplyDelete
  2. Hmm.. that doesn't seem right. Have you tried running oc.sh manually? Keep in mind that the oc.sh script I include in the zip is pre-tuned for my phone so it may not work well on others.

    ReplyDelete
  3. Is it OK to run either of these zips with the JRummy16 Overclock app w/ on boot option enabled?

    ReplyDelete
  4. I get a consistent reboot about a minute after start when I enable the oc script - even with settings that were stable with droid overclock. Everything else works fine, so I just use the built in overclock in liberty.

    ReplyDelete
  5. Installed the interactive version a couple hours ago. It makes the phone feel much more "silky" and very smooth. Thank you!

    ReplyDelete
  6. Brady, yup you can use any overclocking app.

    noldevin, the included oc.sh script will not work for many people - it's calibrated for my phone. That's why it's commented out in the init script. :)

    ReplyDelete
  7. Imoseyon, Any idea how to enable init.d scripts on deodex stock rom? Got busybox installed setup all my init.d scripts but it seams that init.rc never calls them. Permissions are all correct on the scripts. I am use to Solaris so I do know how it *should* work :)
    Thanks

    ReplyDelete
  8. mshonk, you have to hijack the boot process. There are many ways you can do that. If you want true init.d support you can run busybox run-parts during the hijacking process. My zips use /system/etc/install-recovery.sh to achieve this.

    ReplyDelete
  9. JRummy's OC app uses install-recovery.sh and will overwrite your changes to it.

    ReplyDelete
  10. 5.1 is up! (for you 3.4.2 users)

    johnclevenger, interesting. I will play around with jrummy's app - hopefully it appends to the file and not overwrites it. thanks for the info.

    ReplyDelete
  11. just installed the interactive version. im running liberty 1.5. thanks

    ReplyDelete
  12. What is the 3.4.2 update? Is that the .sbf file? I thought the latest available (at least for the DX) is 3.4.0.

    Thanks!

    ReplyDelete
  13. Brady, I think you need the TBH app to download the 3.4.2 ROM.

    ReplyDelete
  14. In a previous post you said that the zip would "Flush system caches once a day (3AM PT)."

    Question:
    Does my phone have to be on to have this happen? What happens if my phone is off at that time? I shut my phone off at the end of every day, then turn it back on when I wake up.

    thanks for the great work you have done for us! :)

    ReplyDelete
  15. imoseyon, i am kinda lost on the 3.4.2 i dont know what that is? i am running liberty 1.5 and my about phone is showing android version 2.2.1 kernal version 2.6.32.9-g55626e1. can you part some insight on this for me before i go off and and flash this from 4.3? thanks man.

    ReplyDelete
  16. fart, if you're rebooting every day, the automated flushing is redundant anyway so you're good.

    matt, 3.4.2 is a new ROM from Team Black Hat. It is supposedly based on some leaked ROM from motorola. You'll have to purchase their app to download it though.

    ReplyDelete
  17. thanks man i appreciate your help. I am going to give the ondemand a shot and see what happens.

    ReplyDelete
  18. Hello! Love the hacks my phone works so much smoother. But I feel like some of the background app notification service gets killed (I think) like words with ftiends. I can never seem to get it notify when it's my turn. Could it be that android is killing it and its not restarting? Thanks in running the leaked update if that matters.

    ReplyDelete
  19. Jonathan, so you definitely feel that prior to flashing the zip the services didn't get killed at all? Do you know how to use root explorer? I can tell you some new minfree settings to try...

    ReplyDelete
  20. Actually, I honestly can't say it's really android killing the apps off. Cause the only applying really affected is words with friends. But I do know that I got notifications before.

    Yes indeed I'm familiar with root explorer. I'd love to trying to see if changing the minfree will help! :-)

    ReplyDelete
  21. Cool, go to system and mount it rw. Modify /etc/unit.d/99imoseyon, and change the first two numbers of the minfree settings to 2000, 3000. Reboot.

    ReplyDelete
  22. gonna work for the droid 2 still??

    ReplyDelete
  23. wiliam, yup i've gotten reports that it works fine on the D2.

    ReplyDelete
  24. Does this play nicely with JRummy's OC app?

    ReplyDelete
  25. Im using it with jrummys DROID overclock and everything seems fine.

    ReplyDelete
  26. So the only potential issue with jrummys app is that it might clobber my startup script if you're not on a rom that supports init.d (liberty,Rubix,and apex). Although his newer app version doesn't do that... I will probably come up with something in my future versions to work around that though.

    ReplyDelete
  27. imoseyon,

    some of the best tweaks and mods ive used so far for liberty. after looking over the rubix vs liberty differences and how this should bump liberty up to the same "feel" (speed, liquid movement, etc.); i still feel like the phone is juddery compared to rubix 1.9.7.

    i tried the experimental version when it was out, but couldn't tell a difference there either. i dont seem to be having service issues, or lack of receiving/seeing them anyways; do you have anything you would suggest, maybe editing the minfree settings, to get the feel rubix has always seemed to have? ive also noticed, and not sure if its liberty (pretty sure it is) or not, but the phone seems very sensitive to voltage settings on the different frequencies; i.e. 66v@1.2ghz is prime now but the phone runs very hot, whereas i could use 64 or even 62v before on rubix with no issues. anything two above/down from 66 on liberty and the phone gets very juddery.

    running liberty 1.5, jrummys oc'd @ 1.2ghz.

    ReplyDelete
  28. Jonathan, that's pretty odd. Aside from my tweaks, all the Droid X/2 "ROM"s are pretty much the same. Since the bootloader is locked, we don't really get true custom ROMs built on custom kernels, so they all use the exact same kernel. Meaning the only thing left to customize are the OS/kernel settings (which are covered more or less by my mods), and the apps/themes. I can pretty much take any ROM out there and make them all behave the same by applying my mods.

    What you might want to try is revert the minfree settings to less radical settings like: 2048,3072,6144,15360,17920,20480

    ReplyDelete
  29. Hey imoseyon, this is the jonathan having issues with background services getting killed off. Just wanted to let you know that after applying the tweak I've been getting words with friends notifications again. Thanks for all the help!

    ReplyDelete
  30. jonathan, thanks for the info. I think i'm going to revert the minfree settings in my next version.

    ReplyDelete
  31. Awesome! Everything is still snappy with the tweak you gave me too. At least I feel everything is still snappy.

    ReplyDelete
  32. I noticed the addition of the resolv.conf file in v5.2 with the google public dns servers, but I didnt see any mention of this in the changelog. I was wondering what change if any it's intended for?

    ReplyDelete
  33. Oh that only affects busybox/wget, so for now it really doesn't do anything...

    ReplyDelete
  34. Sounds good, thanks for the great work you've done here!

    ReplyDelete
  35. how do i run the script in 5.2 "checkmosey"?

    ReplyDelete
  36. imoseyon,

    not sure which one, but one if the changes between 5.11 and 5.2 did it. the lag and choppyness is completely gone. thanks again your work us definitely appreciated.

    jonathan#2

    ReplyDelete
  37. Edward, open terminal emulator and type:

    sh /data/imoseyon/checkimosey.sh

    ReplyDelete
  38. imoseyon, how do i tell if this zip is successfully on my phone?

    ReplyDelete
  39. Cody, follow instructions two posts above. The output will tell you.

    ReplyDelete
  40. Is v.5.2 also only for 3.4.2 users?

    ReplyDelete
  41. Dan, my zips at or above 5.0 will work for all roms.

    ReplyDelete
  42. Thanks man! I could swear I tried that but it worked this time.

    ReplyDelete
  43. The check wouldn't work so i went to the file and looked abcs it said everything was disabled... Ran the manual activation script and it didn't work.. What should I do?

    ReplyDelete
  44. which of these 2 zips improves battery life more?

    ReplyDelete
  45. Alvin, did you flash v5.2? Which ROM are you on?

    Cody, I'd try the ondemand version.

    ReplyDelete
  46. Yes. Flashed 5.2. On liberty 1.5

    ReplyDelete
  47. Alvin,
    Can you post the exact command you used and the exact output of the command? thx

    ReplyDelete
  48. I copy and pasted the exact command for checkimosey and it returned that sysctl was disabled and one or more mods were disabled. so i tried "sh /data/imoseyon/imoseyenable.sh" and it returned nothing. (system was r/w) tried the check command again and got the same thing.

    ReplyDelete
  49. I forgot to add that when I enter "pgrep -f crond" it does return a number (3166)

    ReplyDelete
  50. Alvin, what does this return: sysctl -a | grep vfs

    ReplyDelete
  51. is there any quantifiable difference in performance and battery like between ondemand/cons/interactive governors? or are we talking less than 2% variance?

    ReplyDelete
  52. Edward, coming up with quantitative numbers will probably be hard. Linpack showed no difference for me between the two modes. I'd say try both and go with what feels right for you. :)

    ReplyDelete
  53. I ended up switching to darkslide and installing the zip. after running the checkimosey command it returned everything is good. If it would be helpful for the development of your patch i would be happy to nandroid back to liberty as i backed up before i switched to darkslide. thanks for all your work!

    ReplyDelete
  54. Hey imoseyon, I've been poking through a couple forums reading a lot about rubix 2.0.1 for the Droid X. Drod, the dev, has been quite frank recently when people mention your imoseyon zip: basically, he responds by saying that he's spent far more time researching the tweaks than you, and goes on to say that your zip changes tweaks that he's put a lot of time into researching. He typically concludes by saying that people are better off leaving the rom as-is and not applying your zip. I'm sure you've seen these responses so I won't bother digging around to find links.

    I'd like to hear your response: I was using your tweaks on version 1.9.7 but when upgrading to 2.0.1 recently I read that and became somewhat confused and perturbed. I realize you'll probably try to be diplomatic with your response, but please don't water it down to much: I'm trying to make an informed decision. Thanks.

    ReplyDelete
  55. Hi Kip,
    I actually haven't seen any of the posts by Drod, and I haven't had a chance to see what tweaks are in 2.0.1. Based on the release notes of 2.x he borrowed a couple of tweaks from my zip (ie. disabling logger, dirty cache setting). But then again, I did borrow some of his settings from his 1.9.x ROM, and it's all good.

    I'm not a ROM dev and I have no reason to compete with anyone. The whole point of my blog is to share my knowledge and share what i've been learning about Android and apply my own experience as a linux engineer.

    As far as the tweaks are concerned, your mileage will vary but this post will shed some light: http://www.droidxforums.com/forum/droid-x-roms/19145-tutorial-roms-sysctl-conf-other-tweaks-57.html#post238598

    Any other questions let me know!

    ReplyDelete
  56. Any chance of there bring a conservative governor flashable zip? Or is on demand close enough?

    ReplyDelete
  57. I'm running Liberty 1.5 and after installing your v5.2 zip and running the command:
    sh /data/imoseyon/checkimosey.sh I get:
    Minfree tweaks are not enabled | /data/imoseyon/checkimosey.sh: arith: syntax error: " g + 1 "

    ReplyDelete
  58. Dawit, I think so. I have to confess that my mods are more performance oriented than battery saving, mostly because that's what I want out of my phone. When i have some time i'll look at conservative.

    Kayden, yikes i don't think you have bash installed properly.. I wouldn't worry about it for now. I think I will rework the script to work without bash in the next version. For now, run "pgrep -f crond" and if you get a number most likely you're ok.

    ReplyDelete
  59. Imoseyon,

    I have a off topic question for you. What Rom or Roms do you prefer to use, granted i am not a engineer but i do have a associates in applied science and etc. I am running liberty 1.5 but thinking of branching out what do you think?

    ReplyDelete
  60. Sup Imoseyon, I recently found out that your zip is not able to be used on RubiX Focused and remain stable (which is a shame considering your zip is phenomenal) but I was wondering if it happened to be the same for Apex or any others? I'm flashing apex tonight.

    ReplyDelete
  61. Does this kill the gmail process at 3am? This morning I had a few emails in gmail from the middle of the night and when I opened gmail, more started pooring in. I installed the on demand version...

    ReplyDelete
  62. matt, my answer is actually quite simple. I prefer the most vanila ROM possible so I can tweak easily. For that reason, I prefer Fission.

    Cody, I don't think it causes it to be unstable; however, drod has made a lot of tweaks himself on the last version so I would respect the devs wishes and not throw my mods on top of it.

    Joshua, nope not at all.

    ReplyDelete
  63. This comment has been removed by the author.

    ReplyDelete
  64. Imoseyon, i decided to go with darkslide. i ran your script in termianl and came back "minfree tweaks are not enabled|/data/imoseyon/checkimosey.sh arith: syntax error: "g + 1"

    i am not up on linux commands and dont really understand anything except the min free tweaks are not enabled...

    any ideas how to resolve?

    ReplyDelete
  65. matt,i think you're havint the same problem as Kayden above. See my response up there but as long as you can pgrep -f crond you should be fine.

    ReplyDelete
  66. Hi Imoseyon,

    Question: I'm running liberty 1.5, and using droid x overclock, lv @ 1.3 GHz. right now my profiles on droid x overclock have my governer as interactive when the screen's on and ondemand when screen's off/ battery is low. How will flashing your universal zip affect this?

    right now, i've "manually" inputed your recommended sysctl configuration in the droid x overclock app. really, the only reason I'd want to flash your zip is to get the auto-flush of cache.

    thanks for your help and thanks for doing the good work you're doing!!

    ReplyDelete
  67. imran, i'm pretty sure that jrummy's app will override my governor settings so you're good.

    ReplyDelete
  68. The On Demand Zip has seem to made my D2 on Liberty 1.5 stable. I haven't been using it long but it does seem like my battery life has decreased...I'm not looking for increased battery life from stock Liberty, just the same. Im not really seeing any real world performance improvements for what I do.

    Is there a way to get the zip without the performance enhancements and just have the stability enhancements?

    ReplyDelete
  69. Joshua, what you might want to try is go into /etc/init.d/99imoseyon file and then remove all lines after line 9. Reboot.

    ReplyDelete
  70. Thanks, I will let you know if it it works,

    ReplyDelete
  71. This comment has been removed by the author.

    ReplyDelete
  72. thanks for your quick response, Imoseyon!

    Another queston for you: is there a way to setup my phone to do the auto-flush without having to flash your zip?

    ReplyDelete
  73. I know this is one zip for all ROMs, but just wanted to confirm...

    Will this work with Apex 1.4.1? I just changed over to that from Liberty 1.5. It's a bit more sluggish, but has some of the Blur features that make my life easier.

    Thanks!

    ReplyDelete
  74. So far battery life has gone up since deleting the overclocking scripts and I haven't had a freeze or reboot yet. This is GREAT! Liberty 2.0 might be out Friday, I wonder if some of your work will be incorporated into it..

    ReplyDelete
  75. matt, hit me up at imoseyon@gmail.com.

    imran, yes but you'd have to enable crond manually. Look for one of my blog posts on that.

    brady, yup, give it a shot.

    joshua, yeah 2.0 will have a few of my tweaks but not all.

    ReplyDelete
  76. matt & Kayden, btw try running it with bash instead of sh:

    bash /data/imoseyon/checkimosey.sh

    ReplyDelete
  77. Is the 5.2 working in rooted leaked Gingerbread for droidx?

    ReplyDelete
  78. Jay-R, try the latest: v6.1.3 (in my latest post)

    ReplyDelete
  79. I'm running the stock rom on my X. Will your zip help it?

    ReplyDelete
  80. Rich, if it's rooted yes absolutely.

    ReplyDelete
  81. @imoseyon

    I'm running GB leak on my DX w/ rom Rubix Ginger blurrybread. It runs well but w/ heavy use I see the minfree drop below 60 and if that persists I start getting fc's of the apps Im using. The sysctl.conf settings are similar to your zip except for cache pressure is 50 and of course it does not have the other parts of the zip with the daily purge etc at least as far as I know but Im sure he has other aspects that I do not know about. It was suggested by the OP on alldroid that I not tweak but that only leaves me option of manually cleaning cache or closing apps via a task manager which I do not like to do. Any suggestions? I am not a coder but can follow directions and can use the terminal emulator.I ran your last universal zip on stock gingerbread and had no issues.
    Thanks
    jnehama

    ReplyDelete
  82. Hi Jnehama,

    my universal zip should be perfectly safe to flash on rubix. Give it a shot and let me know how it goes!

    ReplyDelete
  83. I applied the universal zip to my DX running Gingerbread 2.3.3 with the Rubix Blurrybread Rom.There were no installation problems. Checking in Root Explorer you can see /data/cron/root and the imoseyon file. The intrinsic sysctl.conf file in /etc is still there as well. I ran:
    sh /data/imoseyon/check imosey.sh and I got minfree tweaks are not enabled! and data/imoseyon/check imosey.sh:arith: syntax error: "g+1".

    So I ran a sysctl -a| grep vm and the intrinsic rubix sysctl.conf is enabled with the cacne pressure of 50.

    Is there a way to enable it manually? It seems like all the files are there but the file in /etc/sysctl.conf is the enabled one. I did reattempt to flash it with the same results.

    Thanks for the input. I know that this afternoon my free memory is going to get low and fc's loom. I hate having to either reboot or actively kill off programs. Thanks Jackie

    ReplyDelete
  84. Is this safe to flash on Liberty 2.0.1 ?

    ReplyDelete
  85. I am running ZapX 4.2 on Droid X. I have installed 6.2 and it wont verify. I get "cant find". I am in terminal and type...bash/data/imoseyon/checkimosey.sh and have tried replacing bash with sh. any ideas?

    ReplyDelete
  86. Ken, hmmm I think it's probably something to do with the version or location of busybox that came with ZapX....

    ReplyDelete
  87. whats the difference between interactive and ondemand?

    ReplyDelete
  88. Im on 595 gb rooted ran the bash/ data......and got not found what should I do.

    ReplyDelete
  89. Buddy, does it works with a original rom Motorola?
    I installed v5.2 and tried "sh /data/imoseyon/checkimosey.sh" and received "Can't open /data/imoseyon/checkimosey.sh". Do I need a command before that, like su ou anything else?
    Thanks

    ReplyDelete
  90. Anyone happen to have a mirror to this?

    ReplyDelete