UPDATE: Try BulletProofing Apps with my latest V6 SuperCharger Script! Use the following link OR use the link in my signature
I didn't want to risk making the SuperCharge & Bulletproof thread too confusing so I figured it best to make a "sister" thread.
This is a work in progress.
But if this information is helpful, please click the thanks button
HUGE thanks to Feeyo and Bear in NM for helping me figure out a workable solution on locking a background app in memory on boot up.
Feeyo gave me the gist of it but it wouldn't work on boot.
After posting in this thread at Droid Forums, things got rolling - with alot of help from Bear in NM.
Create a Unix script file with no extension (I named it 97oom) with Notepad++ and put it in your i/system/etc/init.d/ folder and put this inside:
Code:
#!/system/bin/sh
sleep 60
PPID=$(pidof [B]com.estrongs.android.safer[/B])
echo "-17" > /proc/$PPID/oom_adj
Permissions: chmod 755 /system/etc/init.d/97oom (same as 10overclock)
You can also do it on the phone itself:
1. Make a copy of 10overclock
2. Renamed it to 97oom (I have a 98governor and a 99complete so...)
3. Deleted the text and put the text you see above
4. Set permissions
Then reboot to test!
You can check to see if it worked with either Auto Memory Manager (AMM) or AutoKiller Memory Optimizer (AKMO).
The bold text in the above code is the process name of the app that you want to protect!
Note: You can get the process name from most process monitors or with AKMO or AMM.
That command "as is" will give ES Security Manager the highest priority of -17.
AKMO shows it as being ignored by the OOM killer
At first it wasn't working on boot because ES Security was not yet loaded in memory.
The "sleep 60 "command fixes that by waiting 60 seconds to execute the command
You can also do this in GScript Lite with this:
Code:
PPID=$(pidof com.estrongs.android.safer)
echo "-17" > /proc/$PPID/oom_adj
This comes in handy for apps that don't load on bootup - just run a GScript for those apps
I suggest you get Busybox Installer and have it install the latest BusyBox (v1.19).
This ensures GScript doesn't spit out ugly stderr: messages.
GScript Tip: 1. Make a file (with any text editor) with the commands
................. 2. Rename it with an .sh extension (example 97oom.sh)
................. 3. Put it in sdcard/gscript folder
................. 4. Run GScript, Menu key, Add script, and click Load file, select a script and Save (leave SU checked)
Even better, you can make shortcut for any GScript.
Long press desktop > Shortcuts > GScript Lite > Select... BOOYA!
As I said, this is a work in progress.
Taming the OOM Killer explains that an app will be ignored by the OOM killer if it has the -17 priority.
The problem is that Android will still shuffle it's priority downwards like it does with any inactive app.
If that happens, then the app reverts to it's usual priority.
This is why ESS will lose it's -17 after a couple of hours. It just sleeps ALL the time.
My thinking that if a more active background app, such as an SMS app or a music app is given the -17, it won't lose it's priority at all.
Feedback with results is more than welcome!
No need to set a variable, just use back-ticks:
Code:
echo -17 > /proc/`pidof [B]com.estrongs.android.safer[/B]`/oom_adj
Although that may be a little too complicated for some people to type in. Best to keep it simple I suppose...
That's pretty cool.
I figure most people would copy/paste the whole thing and replace the process name.
So maybe the back ticks wouldn't be a big deal.
That is why I try and avoid putting any code I use on forums. Someone who actually knows what they are doing will always come along and whack me ;^)
Seriously, good work Zep.
Craig
I don't mind.
That's all a part of learning so it's always good that there's somebody around that's "smarter" at something than me.
For example... this script I'm trying to get working for supercharging stock phones...
On custom roms, CM and FroyMod at least, I'd modify /system/etc/rootfs/init.mapphone_umts.rc
I flashed stock telus 2.2 and the path seems to be just /init.mapphone_umts.rc
I don't see rootfs anywhere
But there is a rootfs is mounted
To mount as rw, "mount -o remount,rw /system" doesn't work
In gscript, I'm getting "sed not found" errors too.
grrr...
how well do you think this would work with handcent? it's a little laggy to load up on my phone, but i want to try it out more. will keeping handcent in memory eat up ram that i need otherwise? and do you think it will be active enough to keep it's -17 after a few hours? thanks
edit: i was trying it out, it disappeard from processes withing a few minutes. oh well, maybe it doesnt need to be running anyway
Did you check with AMM to see if handcent had the high priority or if it really got killed?
ya, i checked. it was set to -17, then next time it refreshed it was gone. then i opened handcent, went back, and the process had a different pid, not oom level. oh well
damn
Maybe some apps are too prone to get killed off and the only way to keep them alive is with multitasking friendly minfree values
zeppelinrox said:
damn
Maybe some apps are too prone to get killed off and the only way to keep them alive is with multitasking friendly minfree values
Click to expand...
Click to collapse
Yes, I've seen the same happening with the stock SMS app. I did not receive SMS anymore so I decided to look at it a bit closer (using adb logcat). I started the SMS app, noted down the PID and set the oom_adj value to -17 using adb shell. A few seconds later it was killed. Setting the minfree values back to system default allows me to receive SMS again. Also whatsapp, gtalk and push mail now work reliable. With high minfree values I could see in the logs that, when a message arrived the app is started and immediately killed afterwards. So, I was never notivied that a SMS or whatsapp message had arrived. With default minfree values it seems to work more reliable.
But it all depends on how you use your phone, I guess. I'm using it as my communication central and don't want to miss any message. If you use it more as your mobile gaming or surfing device you might still be better off with high minfree values.
I agree.
That's why I made 6 different profiles.
The multitasking and balanced 2 settings, for example, will leave you with more free ram but are actually more background app friendly than stock google/android values.
zeppelinrox said:
I agree.
That's why I made 6 different profiles.
The multitasking and balanced 2 settings, for example, will leave you with more free ram but are actually more background app friendly than stock google/android values.
Click to expand...
Click to collapse
I see. I did not realize that. It seems I've been reading your post too superficially.
I'll give those settings a try. I've just lost another SMS (this time with the default setting)
If I can't get this under control I might go back to CM6. I understand this is not as memory hungry as CM7 is.
Well, handcent is a giant pain in the ass.
I'm running stock telus froyo and the thing doesn't even stay loaded and I'm not even doing anything.
I run it.
Try and bulletproof it with a gscript (and sometimes handcent is even killed off if I take too long opening gscript lol)
The script won't even change the priority of hancent.
It stays at an 9 or 10 in the content provider grouping.
But the thing is a pig anyway.
20+ mb of ram used up and the app itself is close to 5 mb.
Maybe froyo has a reason to not like it? LOL
very very important and informative post!
thank you!
one question: any idea why "Auto Memory Manager" isn't avialable to
milestone according to market?
I can't install it from market site and wasn't able to find it in market application?
zeppelinrox said:
Create a Unix script file with no extension (I named it 97oom) with Notepad++ and put it in your i/system/etc/init.d/ folder and put this inside:
Code:
#!/system/bin/sh
sleep 60
PPID=$(pidof [B]com.estrongs.android.safer[/B])
echo "-17" > /proc/$PPID/oom_adj
Permissions: chmod 755 /system/etc/init.d/97oom (same as 10overclock)
You can also do it on the phone itself:
1. Make a copy of 10overclock
2. Renamed it to 97oom (I have a 98governor and a 99complete so...)
3. Deleted the text and put the text you see above
4. Set permissions
Click to expand...
Click to collapse
I did it, and after reboot stock sms app (com.android.mms) is killed, I cheched in AKMO, and that fix didn`t help, so I set default minfree values in AKMO (although the previous settings weren`t so strict)
Ok, first off, I am a UK Milestone, running Cyanogenmod 7 RC4. I am trying to raise the oom_adj of COM.ANDROID.MMS and I just used the method zeppelinrox posted instead of the proposed alternative (though I did try that too) and the startup command seems to do nothing. So I decided to try the GScript way and I get this:
Code:
stderr:
stderr:
stderr:
stderr:
stderr:
stderr: cannot create /proc//oom_adj: directory nonexistent
stderr:
stderr:
stderr:
I have never used GScript before and maybe I am doing something wrong here, but I am running it the script as superuser, I have exactly what zeppelinrox has (except a change for the messaging app process name) and I am at a total loss here. Other methods worked fine on my RC3 and keep Messaging as a "Foreground Group" app, but in RC4 it is an "Empty" and that means it will likely get killed a lot. I am using stock minfree values, just using AMM to check oom. I don't want to be missing texts, so any help would be greatly appreciated. Let me know if you need anything else.
You get that "directory nonexistent" error because the app was already killed so there is no PID anymore.
I suggest you get Busybox Installer and have it install the latest BusyBox (v1.19).
This ensures GScript doesn't spit out ugly stderr: messages.
I finally installed CM7 for the first time and RC4 at least does have the option to lock messaging app in memory.
It's sitting in the foreground with a 0 priority
I thought that maybe it was killed already also, but I opened Messaging -> checked System Panel to ensure it was running -> ran the GScript (which failed as noted before) -> and checked System Panel once more and it was still running. Maybe I am crazy here..
I am using the "Lock messaging in memory" but "Messaging" process is still killed by the stock manager, is it still alive in some separate process? It certainly is not 0 priority in Foreground, still sitting in "Empty" at something generally over 4 priority.
I will probably just switch back to the previous build as all was well there, though I would like to be able to keep up with the newest features.
Thank you for the Busybox link, I will try that.
That's strange.
Maybe that setting needs a reboot?
I remember seeing messaging in content provider earlier and then I was actually surprised to see it in the foreground.
I actually checked to see if I still had the 97oom file in the init.d folder but it's not there.
But it should be immediate because if I uncheck Lock messaging in memory, it gets instantly killed.
I run it, check lock messaging again, and AMM shows it in the foreground group again.
Stderrs... now I dunno what's going on with that
GScript was working perfectly in stock Telus rom without stderrs after installing busybox (to get certain commands to work).
But in CM7, after updating busybox, stderrs all over the place.
Now I have to figure this out.. those stderrs are annoying as hell
zeppelinrox said:
You get that "directory nonexistent" error because the app was already killed so there is no PID anymore.
I suggest you get Busybox Installer and have it install the latest BusyBox (v1.19).
This ensures GScript doesn't spit out ugly stderr: messages.
I finally installed CM7 for the first time and RC4 at least does have the option to lock messaging app in memory.
It's sitting in the foreground with a 0 priority
Click to expand...
Click to collapse
What am I missing here? I'm looking at my CM7 Milestone right now with the "lock messaging app in memory" selected. And the messaging app is sitting in "background". Then I set the oom_adj value to -17 and a few minutes later messaging is gone. I'm starting to become desperate.
Related
A lot of people have a tough time with Hero/Sense ROMs. I thought I'd make a guide on what I do to help others out. This is not definitive but it's my personal way of doing things. Comments, tips and suggestions are welcome here. I will update this with some more info as I go along.
I have a MT3G but this is the same for G1.
**Firerat has really comprehensive guides for A2SD and other tweaks. Please check his thread for more info. Also, his post about setcpu profiles is a must read.
First, get a ROM. I'm currently playing with KingKlick's Legend Port and Vegaman's kernel update.zip. This guide applies to any Hero ROM though.
Table of Contents / Overview
First things first
Get your task killers in order (TasKiller, AutoKiller, etc.)
MyBackup Pro or similar if you use them
Autostarts-- one of my favorites. Would love to hear about a free alternative
Droidwall-- free, blocks Internet to apps you choose
Reboot, wipe Dalvik-cache, reboot
Additional steps, Misc, Errata
FIRST:
Partition your SD card. I set a 256MB swap partition and have copious memory left over even under heavy load. EXT2 is better than 3/4.
Flash the ROM, flash the kernel update after. Boot the ROM, go through set up. I always skip signing in at this point as the setup is heavy on the CPU and wait for things to settle before the memory intensive sign in process begins.
SECOND:
Okay, now I see the home screen. Install TasKiller (free/paid) with ADB, MyBackup Pro and kill all the processes except Sense. I highly recommend Autostarts (paid). It handles not only autostart processes but also event listeners and will significantly speed up the ROM. Here are the services I disable:
"After Startup"
Download Manager
My Uploads
Network Location
PC Synchronization
HTC Message Uploader
Peep
HTC Media Uploader
Flickr/FaceBook/MySpace/etc
com.htc.socialnetwork.provider
HTC Widget Download Manager
MyBackup Pro (Uploads your location to their servers at every boot!!)
"Connectivity Changed"
My Uploads
Network Location Service
HTC Message Uploader
HTC Media Uploader
com.htc.socialnetwork.provider
"Application Installed"
PC Synchronization
Pico TTS (why would text-to-speech need to run...)
If you use Slacker.. disable it completely from all "Application Changed/Installed/Removed" categories. No need in them knowing your usage..
"Screen Off"
TasKiller
Notice how (and you can watch with logcat) when an application is modified or installed, it starts up Pico TTS (text-to-speech), synchronization, etc. This is not necessary and a memory hog. You might also be thinking "but I needz muh Facebook" but you don't need it to autostart. These services will load on demand as you use them. Without them, things go a lot quicker.
THIRD: (If you use MyBackup Pro)
Now, I sign into my account with Market, accept the terms and conditions. Once things have settled and I'm able to use the Market I exit the app immediately. I use MyBackup Pro to restore my apps. Version 3 now links apps to Market so they can be updated. Pretty slick despite the fact it logs your location to their servers without your permission. Luckily Autostarts stopped that. Now there's a small catch-- MyBackup messes up the Market database. Easy fix with ADB:
Code:
# cd /data/data/com.android.vending/databases
# ls -l
[I]I summarized the output here for formatting's sake..[/I]
----rwxr-x assets.db
-rw-rw---- billing.db
-rw-rw---- webview.db
-rw-rw---- webviewCache.db
See how assets.db is owned by root and the wrong permissions? This will FC Market 10/10 times. So:
Code:
# cp assets.db BACKUPassets.db
# cp -p billing.db assets.db
# cat BACKUPassets.db | tee assets.db
# rm BACKUPassets.db
Now it will work. The theory is that we can't chown the DB due to an "unknown user" but the other files there have the correct permissions. We use cat and tee to overwrite the clone with the correct contents. It's a hack that works perfectly.
FOURTH:
I then reboot and go to the Market. Install Droidwall (free) and set it to blacklist any app that doesn't need Internet Access. I also install AdFree (free). One site that it doesn't block is flurry.com. This site is used by a lot of applications such as MoreLocale. It uploads personally identifying information about you including your location, phone number, account info, etc. without your permission. I append it to my hosts file afterward. Note that each update with AdFree will erase that entry but I use Autostarts to disable it at boot and never update.
Code:
# mount -o remount,rw /dev/block/mtdblock3 /system
# echo "127.0.0.1 flurry.com" | tee -a /system/etc/hosts
# mount -o remount,ro /dev/block/mtdblock3 /system
FIFTH:
With all the apps now installed that I want to start out with, I go back to Autostarts and disable those I don't want (pretty much all of them). I reboot into recovery mode and wipe Dalvik cache. Reboot, wait for it to cache again and all is well.
Additional Steps
You can easily lock home into memory. *thanks speedysilwady and firerat. Here's how to set this permanently:
Code:
adb pull /init.rc
[I]replace "setprop ro.HOME_APP_MEM ..." with:
[B]setprop ro.HOME_APP_MEM 1536[/B]
[/I]adb push init.rc /sdcard/init.rc
adb shell
# mount -o remount,ro rootfs /
# cat /sdcard/init.rc | tee /init.rc
# mount -o remount,rw rootfs /
# rm /sdcard/init.rc
I will update this as I go. Any comments and tricks like reducing call delays are welcome. Again, this is just how I do things. Hope it helps.
Reserved for the updates....
Reserved for more updates. Just in case.
Don't bother getting kings version just get Vegaman's 0.3 version.
It works a treat and fast as well...
EDIT= and on Vegaman's use EXT2 not EXT4 like you have to do in kings roms. EXT2 is faster then EXT4
Awesome thread! you could also use AutoKiller and Cachemate to keep things smooth as well! =]
Updated OP. I'm looking for the prioritizer script that supposedly gets incoming calls within 1-2 rings... will update when I get it figured out. I have between 40-55MB free memory according to TasKiller when no apps are running.
deuse said:
Don't bother getting kings version just get Vegaman's 0.3 version.
It works a treat and fast as well...
EDIT= and on Vegaman's use EXT2 not EXT4 like you have to do in kings roms. EXT2 is faster then EXT4
Click to expand...
Click to collapse
I agree...and great job thread creater!!!
Interesting! I will try this, how much will the speed increase be?
With what I do, I barely get any slow downs unless I run a lot of apps but I have TasKiller's mini taskbar on one of my home screens and always clear things out before I do something like web browsing, Maps, or games to keep RAM clean.
I'd love an alternative to Autostarts that's free but it is truly great. Blocking listeners causes a huge boost in speed. You will see in logcat when you install an app that all these services start running in the background like Voice Dialer, TTS, etc. That's the reason installing apps seems to peg the phone for a few minutes. Not so when you block those background services.
enatefox said:
Updated OP. I'm looking for the prioritizer script that supposedly gets incoming calls within 1-2 rings... will update when I get it figured out. I have between 40-55MB free memory according to TasKiller when no apps are running.
Click to expand...
Click to collapse
Code:
su
setprop ro.HOME_APP_MEM 1536
this will keep home in memory. I learned that one from Firerat , should make calls come in faster
from what i understand a large swap like that might offer some positive temporary results, but after time clogs up
adelco93 said:
from what i understand a large swap like that might offer some positive temporary results, but after time clogs up
Click to expand...
Click to collapse
It's bad to have a large swap and high swappiness.
I haven't had any issues. The swap partition hasn't clogged up or even gone under 100MB left for me yet. Your mileage may vary but it's what I set it to. What size/swappiness would you recommend then? 96MB is not enough, 128MB seemed like too close to the edge of what I need.
I need to make the OP not look like crap...
It is better for the life of your sdcard to have a large swap....because if you allocate say only 64mb to swap...those blocks on your sdcard are constantly being written/read and the rest isn't....better to have a swap of say 256mb so that you are evening out the stress on the blocks more.
I think Wes G or Chris S said this....but that's my paraphrase of it.
Also no difference in speed between a 32mb swap and a 256mb swap. Just depends on your sdcard's class.
enatefox said:
I haven't had any issues. The swap partition hasn't clogged up or even gone under 100MB left for me yet. Your mileage may vary but it's what I set it to. What size/swappiness would you recommend then? 96MB is not enough, 128MB seemed like too close to the edge of what I need.
I need to make the OP not look like crap...
Click to expand...
Click to collapse
60 at most 80 or 100 is to much
G1ForFun said:
Also no difference in speed between a 32mb swap and a 256mb swap. Just depends on your sdcard's class.
Click to expand...
Click to collapse
If we were talking about computers then swap would be same size as ram, it's better to have no swap at all then to have one
Read some of this:
https://help.ubuntu.com/community/SwapFaq
G1ForFun said:
It is better for the life of your sdcard to have a large swap....because if you allocate say only 64mb to swap...those blocks on your sdcard are constantly being written/read and the rest isn't....better to have a swap of say 256mb so that you are evening out the stress on the blocks more.
I think Wes G or Chris S said this....but that's my paraphrase of it.
Also no difference in speed between a 32mb swap and a 256mb swap. Just depends on your sdcard's class.
Click to expand...
Click to collapse
Try Fireat
But for purposes of speed, a large swap partition will get full eventually, and when it does, have fun trying to use your phone. It gets slower because swap has to "dig" through more files to get what you want, the more files it has to dig through, the slower it is. However, you won't notice this if you reboot often (and I guess 5% of Android users reboot daily)
is there a way to enable compache on any of these hero roms?
speedysilwady said:
is there a way to enable compache on any of these hero roms?
Click to expand...
Click to collapse
The user.conf (if it is activated on the rom)
JAguirre1231 said:
The user.conf (if it is activated on the rom)
Click to expand...
Click to collapse
The thing is im not sure if its activated in any of the newer sense roms, i never heard it mentioned, so i figured id ask. ill go check the user.conf...
speedysilwady said:
The thing is im not sure if its activated in any of the newer sense roms, i never heard it mentioned, so i figured id ask. ill go check the user.conf...
Click to expand...
Click to collapse
None of newer ones use it for a reason, you would use back-swapping instead(Cc+swap)
I have been using the latests builds to see if they mitigate a common problem in our devices (mine is a Polaris). The insufficient memory makes it lag until forever when switching amongst applications, not only the heavy ones, but also the supposed light applications like Messaging, Phone, Contacts, etc.
The system has to work under really hard conditions: 20 - 28 MB when starting up. Every application I run is a fire proof. Applications like Navigation makes our devices literally crawl and bite the dust. Not far away, I was driving and tried to play some music at the same time. It was impossible. The waiting was unbearable and it finally hung like a pro.
My question is: is there any chance to free up memory or use it more efficiently in order to avoid these undesirable situations?
Did polaris get back some memory with Froyo kernel like vogue did? From the video buffer or something... what res do you run at?
I'm running at 240x320 - 120 dpi
I made a screenshot of a "free" command in a terminal (see attachment image).
My kernel is this one (converted with Atools):
http://androidhtc.git.sourceforge.n...=2.6.32/VOGUIMG-320-FROYO-10-4-10.NBH;hb=HEAD
Thanks for your interest!
Im not sure.. but is there a way to use the sd as ram?
I think its not fast enough, but i havent seen any "benchmarks" yet how fast the ram on the polaris works.
Maby its slower but fast enough to work as swap etc?
Enabling compcache will help you.
Still, our little devices cannot multitask very well with Android, but I can navigate and play music at the same time, with compcache.
You will need drivers that match your kernel, in /system/lib/modules. I have packaged some in the first post of this thread that should work for each of the two popular kernel versions.
n2rjt said:
Enabling compcache will help you.
Still, our little devices cannot multitask very well with Android, but I can navigate and play music at the same time, with compcache.
You will need drivers that match your kernel, in /system/lib/modules. I have packaged some in the first post of this thread that should work for each of the two popular kernel versions.
Click to expand...
Click to collapse
Alright, I'm downloading the modules for 2.6.32. After applying the update, what should I do to enable compcache? Some time ago, this setting was in Spare Parts.
SuperJMN said:
Alright, I'm downloading the modules for 2.6.32. After applying the update, what should I do to enable compcache? Some time ago, this setting was in Spare Parts.
Click to expand...
Click to collapse
Open terminal
type: Su
and then
compcache.sh enable
-Arturo- said:
Open terminal
type: Su
and then
compcache.sh enable
Click to expand...
Click to collapse
any way to confirm that it worked?
margosmark said:
any way to confirm that it worked?
Click to expand...
Click to collapse
type FREE in terminal and look under swap if it shows zero then it's not active.
-Arturo- said:
type FREE in terminal and look under swap if it shows zero then it's not active.
Click to expand...
Click to collapse
yea, try doing free from a terminal you should have an amount of memory for the swap row
For testing...
Thank you SuperJMN for this thread : I hope this help us for better use of our phone.
Like you, when I try to use my GPS navigation (Navigon or Igo8) I'm bored that's too slow !! Impossible to change anything if I want...
I try now with Compcache enable, I can see 130024 (total and 104156 used) instead of 104024 : swap = 26000
Cheers.
manu33xtro said:
Thank you SuperJMN for this thread : I hope this help us for better use of our phone.
Like you, when I try to use my GPS navigation (Navigon or Igo8) I'm bored that's too slow !! Impossible to change anything if I want...
I try now with Compcache enable, I can see 130024 (total and 104156 used) instead of 104024 : swap = 26000
Cheers.
Click to expand...
Click to collapse
any better luck with comcache on??
Report
I installed this update for my .32 kernel (dated September, the 30th):
http://forum.xda-developers.com/attachment.php?attachmentid=409422&d=1285714954
My build is the latest: http://sourceforge.net/projects/androidhtc/files/system-froyo-01-10-10_16.tgz/download
When I open a terminal and type
su
compcache.sh enable
it states that compcache will be enable in 120 seconds.
After that time, a free command doesn't reveal any change.
I've also tried typing
su
compcache.sh start
When doing this, it processes the command and after 30 seconds or so, some lines are displayed:
Code:
insmod: can't insert '/system/lib/modules/lzo_compress.ko': File exist
insmod: can't insert '/system/lib/modules/lzo_decompress.ko': File exist
insmod: can't insert '/system/lib/modules/ramzswap_compress.ko': File exist
swapon: /dev/block/ramzswap0: Function not implemented
vm.swappiness = 30
After that, a free command doesn't reveal any change, too.
SuperJMN said:
I installed this update for my .32 kernel (dated September, the 30th):
http://forum.xda-developers.com/attachment.php?attachmentid=409422&d=1285714954
My build is the latest: http://sourceforge.net/projects/androidhtc/files/system-froyo-01-10-10_16.tgz/download
When I open a terminal and type
su
compcache.sh enable
it states that compcache will be enable in 120 seconds.
After that time, a free command doesn't reveal any change.
I've also tried typing
su
compcache.sh start
When doing this, it processes the command and after 30 seconds or so, some lines are displayed:
Code:
insmod: can't insert '/system/lib/modules/lzo_compress.ko': File exist
insmod: can't insert '/system/lib/modules/lzo_decompress.ko': File exist
insmod: can't insert '/system/lib/modules/ramzswap_compress.ko': File exist
swapon: /dev/block/ramzswap0: Function not implemented
vm.swappiness = 30
After that, a free command doesn't reveal any change, too.
Click to expand...
Click to collapse
Try this one
http://dl.dropbox.com/u/7688082/androidupdate.tar
Also is terminal added to the white list in super user app.?
Try with this update...
l1q1d said:
Try with this update...
Click to expand...
Click to collapse
It worked! Thanks!
By the way, the touchscreen behaves erratically with 4-oct NBH. Test with calibration app and tap the screen. You will notice abrupt lines.
Edit: if you want to see which behavior I'm referring to, watch this video: http://www.youtube.com/watch?v=DPLu41BUB1Y
It happened sometime in the past, but with this one it happens the same (although the abruptness is not as much as in this video).
Edit 2: Strangely enough, it is fixed on reboot, but after some time running the touchscreen starts to behave crappy again. It happens with the newest .NBHs made in October.
With the recent release of Spz0s rom and Adrynalyne getting this beat over clocked these settings are becoming obsolete. Use at your own discretion.
I recently restored my phone to stock, with basic settings, meaning I did not use any of the settings listed here. I scored a 1013 on a bench with stock everything. Now that I have VTL Launcher as stock again and have everything set back up for me, I'm scoring 1000s and 990s regularly. Again without any of these settings enabled. Which is leading me to believe that a stable system is the fastest thing when it comes to performance and benchmark scores. The settings listed below did help me out, with an unstable system. Now that I am running on a stable system, none of the settings below helped my performance or bench scores, they only hurt them. So these settings below will help anyone with an unstable system to not feel the lag of said unstability. If you try these settings and they don't do anything, or hurt your performance or score, turn them back to stock and revel at how much you rock for having a super stable system! I have also noticed that the app AUTO KILLER MEMORY OPTIMIZER virtually replaces sysctl. If you run AUTO KILLER I would suggest setting sysctl back to stock! I would recommend AUTO KILLER MEMORY OPTIMIZER from the Market to EVERYONE with a Zio. Nice app, set it to Aggressive!
FIRST OFF, THESE SETTINGS ARE ONLY CHANGEABLE IF YOU ARE ROOTED!! If you are not I cannot help you!!
I am making this thread to address performance issues with the Zio. If you have done a benchmark score with just basic settings, it's already apparent to you the Zio is not the best phone. I have found some tweaks to make the phone run faster and score better on benches.
USE THESE SETTINGS AT YOUR OWN RISK. IF YOU SCREW SOMETHING UP, DON'T CRY TO ME.
Stagefright: Stagefright is part of the stock media player that comes disabled on the Zio. Turning on stagefright will increase your benchmark score by a lot, and has also been reported to make Video Playback much better, getting rid of jumpy lagging videos.
You need to make sure you have r/w(read/write) access in your file manager. Root Explorer has r/o(read/only) and r/w. You cannot change any files without r/w access in your file manager.
To Enable Stagefright you open your file explorer(i.e. root explorer, astro, etc.) and navigate to the system folder. Open build.prop in your text editor. Scroll down to where you find stagefright. There are four settings for it grouped together near the bottom of the script. Next to each setting it says =false. You need to edit the false to say true. Once that is done, go up just slightly from that spot, there is also another spot to enable stagefright. Change that to true as well. Also notice that just above this last stagefright script, there is something about the vm.heap and dalvik cache. This is where you change your VM Heap size.
(NOTE: ENABLING THE HTTP SETTING IN STAGEFRIGHT ALLOWS FOR A RICHER HTTP BROWSING EXPERIENCE BUT WILL ALSO PUT A GREEN BAR ON YOUTUBE VIDEOS. KEEPING IT SET TO FALSE WILL AVOID THIS GREEN BAR AND SHOULD NOT AFFECT OVERALL PERFORMANCE!)
VM Heap-Not exactly sure what the technical aspect of it is, but increasing the vm.heap gives the dalvik cache more room to work with, thus making your memory faster. THIS NUMBER SHOULD NOT BE SET BELOW ANDROID DEFAULT WHICH IS 24. And should also not be set above 44. If you want to change this number, add or subtract 4 within the above values, 24-44. This can go down to 16 but you'll see the results and why I said to leave it up pretty fast.
SYSCTL- To edit these settings, open your file explorer, hit the ETC folder. Scroll to bottom and find sysctl.conf, long press and open in text editor. So far I can only say there are three settings here you need to adjust.
To edit SYSCTL settings you must first download and install the app sysctl config from the Market. After you set it up initially it can be uninstalled and leave behind the settings folder for further settings changes by manually editing or you can keep it and just use it to make the changes.
First is MIN FREE KB. This number will not be the same for everyone, although I can tell you setting this number above 4096 seems to slow the system way down. Although you may try any of the following numbers..
1536, 2048, 4096, 5120, 5632, or 6144.
These are the only numbers I would suggest using as they are parameters that came out of the phone itself.
sys/module/lowmemorykiller/parameters. <----DO NOT CHANGE the numbers in this location, they are system defined parameters and are NOT to be changed!
The second setting is vfs.cachepressure. I have this set to 10. Default is 50. Basically what I've read about this, it opens more room by setting it lower, leaving more memory free from constantly checking and clearing the cache. Read more here http://forum.xda-developers.com/showthread.php?t=523707&page=12
The Third setting is oom. It's the last value in sysctl.conf and needs to be set to 1 or 0. Instead of your phone starting to kill apps when it's out of memory, it does something else that I didn't quite understand, which is supposed to boost memory performance. Some people are seeing great results with this setting. Some people say it doesn't do anything. Seems to be specific to the user, and I have yet to find anything in common between two users who say this helps. Although bench scores are higher with it set to 1.
For these settings to take effect you must reboot your phone. Changes to these settings are only applied by a reboot, so any time you change anything, REBOOT!
If you do not know how to change settings manually, there are two apps in the market to help. VM Heap Tool will change your VM Heap for you, no need to manually edit if you don't want to. sysctl config is an app that will allow you to easily change the sysctl settings.
There is an App that will change your stagefright settings for you called Blade Buddy. I did not have a good expeience with this program and would suggest that you edit stagefright manually since it's pretty easy with a superuser file manager.
I can say with certainty that turning on stagefright and adjusting and playing with the rest of the settings that your phone will turn in to a beast compared to how it came out of the box.
As far as battery performance goes, I've noticed a 10-15 percent increase(estimated) over the life of a charge(depending on amount of usage and type). I have noticed more battery use. But not so much that these settings wouldn't be worth using. I gave numerous variations of these settings tries over 2 very long months of restarts and three different benchmark programs. Any additional information or discoveries are welcome.
If this helped, please hit Thanks!!
Muchos Gracias to everyone in #openzio as always. Spz0 n Mattix are always a big part of anything I do. They are always nice enough to save me from myself. And much thanks to anyone that helps out with the Zio at all. Lets own this phone!
Nice write-up bro.
Well, good guide. Hopefully Kyocera calls me back in regards to the kernel source code so we can really overclock this thing.
Sent from my Zio using XDA Premium App
Their lawyer in San Diego got a hold of me on Facebook. Asked me to call her back. Three calls and no dice. Waiting on her response now. Hopefully soon. She said they are "working the bugs out". Which is a load of BS since we have phones in our hands, the source is done. They just have to give it to us and I told her bluntly just that.
Tell them to call me lol, I want the source. Give us the source!
Sent from my Zio using XDA Premium App
So what happened to getting it? Teacher not know the right trick? Have you heard about using git to get the source? I dunno what git is but it may help? Ever heard of it?
Sent from my Zio using XDA Premium App
http://en.wikipedia.org/wiki/Git_(software).
Google is your friend???
Also, I don't have a sysctl.conf file. At least not where you said it is or one that root explorer can find...
Yeah if I actually understood any of that I wouldn't be asking.
Ok here is the best benchmark average I have gotten so far. These are the settings I used to achieve it.
Avg Benchmark - 795
High - 900 (omitted from average)
Low - 710 (omitted from average)
Avg with high and low only changed by 6 points.
Sysctl Support - Enabled ( I am using the Sysctl app form the market.)
Min free Kbytes - 4096
Dirty Ratio - 80
Dirty BG Ratio - 40
Oom Allocating Tasks - Enabled
VM Heap Tool - VM Heap set to 36m
Stagefright settings are all set to "True"
What we need to know now is what setting are going to speed up the UI. Like cutting load times on FB and other apps, what is making the phone just lightning fast? Doesn't seem to matter too much as long as you don't go above 4096. Finally started to see some system lag with 8192. We need to figure out what makes the phone the most responsive, fastest, beast of a phone.
Messing with the radio numbers only seems to slow me down. And still can't really find anything on what vm.swapiness does either.
sinisin said:
What we need to know now is what setting are going to speed up the UI. Like cutting load times on FB and other apps, what is making the phone just lightning fast? Doesn't seem to matter too much as long as you don't go above 4096. Finally started to see some system lag with 8192. We need to figure out what makes the phone the most responsive, fastest, beast of a phone.
Messing with the radio numbers only seems to slow me down. And still can't really find anything on what vm.swapiness does either.
Click to expand...
Click to collapse
Well, I have also downloaded Link2SD from the market and put every app (except system apps) on the SD card and That has given me a little over 100MB free on phone storage and I am using Memory booster lite to free up memory on the phone. All of these things have made a huge difference in the speed and performance of the phone including page load times. (facebook opens and loads almost instantly).
Be careful. Don't move things like Widgets that need to refresh or themes for your launcher or the launcher itself. Seems fine at first until you run for a while and Widgets stop and launcher always reloads.
Sent from my Zio using XDA Premium App
Are you on Wi-Fi while opening apps or 3G and if 3G how many bars?
Sent from my Zio using XDA Premium App
Using Root Explorer /ect/sysctl.conf I'm not seeing this file...
sinisin said:
Serious changes coming soon. New numbers up for min free KB below already.
Stagefright: Stagefright is part of the stock media player that comes disabled on the Zio. Turning on stagefright will increase your benchmark score by a lot, and has also been reported to make Video Playback much better, getting rid of jumpy lagging videos.
To Enable Stagefright you open your file explorer(i.e. root explorer, astro, etc.) and navigate to the system folder. Open build.prop in your text editor. Scroll down to where you find stagefright. There are four settings for it grouped together near the bottom of the script. Next to each setting it says =false. You need to edit the false to say true. Once that is done, go up just slightly from that spot, there is also another spot to enable stagefright. Change that to true as well. Also notice that just above this last stagefright script, there is something about the vm.heap and dalvik cache. This is where you change your VM Heap size. (NOTE: ENABLING THE HTTP SETTING IN STAGEFRIGHT ALLOWS FOR A RICHER HTTP BROWSING EXPERIENCE BUT WILL ALSO PUT A GREEN BAR ON YOUTUBE VIDEOS. KEEPING IT SET TO FALSE WILL AVOID THIS GREEN BAR AND SHOULD NOT AFFECT OVERALL PERFORMANCE!)
VM Heap-Not exactly sure what the technical aspect of it is, but increasing the vm.heap gives the dalvik cache more room to work with, thus making your memory faster. THIS NUMBER SHOULD NOT BE SET BELOW ANDROID DEFAULT WHICH IS 24. And should also not be set above 44. If you want to change this number, add or subtract 4 within the above values, 24-44.
Phone Edit- Found numbers for min free KB. sys/module/lowmemorykiller/parameters. 1536, 2048, 4096, 5120, 5632, 6144. Assuming these are new guidelines. Will edit fully tomorrow. Don't change these settings. They are system parameters and should NOT be changed.
SYSCTL- To edit these settings, open your file explorer, hit the ETC folder. Scroll to bottom and find sysctl.conf, long press and open in text editor. So far I can only say there are three settings here you need to adjust. First is MIN FREE KB. This number will not be the same for everyone, although I can tell you setting this number above 8192 will slow the phone down, most people report anything over 4096 slowing the phone down. The default is 2048, I would suggest going up to 4096 or 8192.
The second setting is vfs.cachepressure. I have this set to 10. Default is 50. Basically what I've read about this, it opens more room by setting it lower, leaving more memory free from constantly checking and clearing the cache. Read more here http://forum.xda-developers.com/showthread.php?t=523707&page=12
The Third setting is oom. It's the last value in sysctl.conf and needs to be set to 1 for everyone. Instead of your phone starting to kill apps when it's out of memory, it does something else that I didn't quite understand, and this should add speed to everything you do, like surfing or Facebook. Everything should load faster and smoother with this setting enabled. Remember stock value is Zero and may only be set to 1 or 0.
If this helped, please hit Thanks!!
Click to expand...
Click to collapse
Try /system/etc micro. Same thing.
Sent from my Zio using XDA Premium App
Current settings.
4096
95
60
50
Oom
VM heap 30
Stqgefright all but http
Running fast and stable. Launcher pro Orientation from portrait to landscape is faster. Home loads instantly even though I am not using a launcher from /system/app
I will be doing some more tweaks to speed this up but maintain some battery life.
Sent from my Zio using XDA Premium App
I have Stagefright fully enabled. Running 2048 Free KB. Stock radio and background. Turned oom to 0. Zoomin right along.
Sin. How did you edit sysctl.conf I can't find it in ETC
Sent from my Zio using XDA Premium App
Thanks! /system/etc still nothing. I have rtecdc_apsta.bin and void.fstab no luck still.
sinisin said:
Try /system/etc micro. Same thing.
Sent from my Zio using XDA Premium App
Click to expand...
Click to collapse
Looks like we need to include sysctl.conf in the next theme update.
Sent from my Zio using XDA Premium App
Hey guys,
Seems there's a lot of ways you can improve the speed of Android in general. Some seem to be snakeoil... others, work quite well and there's proof to back it up.
I'm only interested in discussing the latter .
A lot of people have helped me gather a better understanding of Android (hyc, stinebd to name a few) in addition to a lot of Google searching. I am going to compile a list of what I have done, I would like to hear what you guys have done! Most app killer apps / app control will already be addressed, so those tools need not apply... I'm looking for real, permanent fixes here without adding more apps!
I am also trying to have topics that are easy working up to advanced. Obviously the more advanced topics are going to be harder to do. You've been warned.
So here's the disclaimer.
****DISCLAIMER****
Speed is as always relative. That basically means I don't want arguments about which build is faster. I want to argue about how to make every build faster .
Also, these tips should apply to any build, any device... they are pretty generic tips, but are obviously specific to Android, with some idiosyncrasies that apply to our port that wouldn't apply to native Android devices. Some is common sense, others are real ways to tear into the system. Hope you enjoy it!
Topic 1
Difficulty Easy - Apps/Widgets
I've noticed the number of widgets i have on my screens, or the number of apps that I have installed/are running in the background to greatly effect performance, in an obviously negative way.
Once I removed all the widgets (I only have the basic analog clock widget & the Google search widget on one desktop...) this seemed to improve general speed. One minor thing to check is if apps are set to auto/background sync. Only enable the ones you really want syncing, others just check manually.
On this same topic, replacing the launcher (the stock launcher in Android, Launcher2 is quite slow) can help immensely. I like ADW, but I've used LauncherPro in the past and it is good. Zeam also seems like a good launcher. I haven't used Go Launcher EX, I've heard good and bad things about it. Use what works best for you, try 'em all!
The last thing on this topic I would like to mention is animations. Settings -> Display -> Animation -> No animations can make the phone feel quite a bit snappier, obviously at the expense of the look/feel of the OS.
Topic 2
Difficulty Easy - Controlling app 'net Access
This leads me into the next topic, DroidWall. I've noticed that blocking apps from accessing the internet has been a very good thing - it's not so much a performance booster (although it probably does provide a little bump) it's mostly about battery life. Just be warned, if you block an app that is set to background sync, it will probably have very negative effects. Only disable an app's access to the internet with DroidWall after you've checked that app's background sync feature is disabled. I have a few apps allowed in DroidWall, and the rest are blocked. You can "whitelist" everything and check apps you want to block, or "blacklist" everything and check the apps you want to allow. It's a little annoying to remember to enable/disable DroidWall (I use the DroidWall widget to enable/disable it globally) but if you do, it is much better - you have complete control over how apps access the 'net on your device. It is available on the Market.
Topic 3
Difficulty Moderate - SD cache/readahead tweaking
The only reason I'm calling this one 'moderate' is the number of choices you have for settings for this... It's basically telling the SD card how much to hold on to or... read "ahead" if you will . This was turned way up in FRX07, (from 256kb to 2048kb or 2mb...) and I think this might be the source of a lot of the complaints of 'mini-resets' if you will where the boot animation is suddenly seen after a long system hang...
So some cards will work better with a larger setting - I've heard some with spankin new C6 cards that said 3072kb or 3mb was a good setting. Others have found a sweet spot at 256kb or 1024kb (1mb).
There are two ways of doing this - you can hack the init in the rootfs and adjust the setting manually, or be lazy like me and use SD Booster (from the Market). Adjusts the same settings, and they are applied immediately!
I would like to find a "sweet spot" - a good default if you will. Can folks test out 512kb and 1024kb, see if you have any more mini-resets within Android or any other slowness, etc... Obviously this isn't a cure-all for the slowness or the mini-resets, what we're looking to do is mitigate the effects. So let's focus on that, thanks!
Topic 4
Difficulty Moderate - Overclocking
Overclocking is obviously one relatively easy way to improve the speed of Android. In your startup.txt, add a line
Code:
acpuclock.oc_freq_khz=710400
for example to overclock to 710.4mhz. How did I find this value? I actually put in 714000, but if you look at dmesg near the beginning you'll see "ACPU running at ..." - that's what clock is the actual maximum. It goes in 19.2khz increments.
Feel free to experiment with how high your phone can go, just be warned that the higher you go the potential for failure goes up as well . Phone shouldn't blow up, but it might not work correctly or at all. Rebooting and scaling it back will fix it.
Here's the full *example* startup.txt:
Code:
set ramsize 0x10000000
set ramaddr 0x10000000
set mtype 2292
set KERNEL zImage
set initrd initrd.gz
set cmdline "lcd.density=240 msmvkeyb_toggle=off gsensor_axis=2,1,3 pm.sleep_mode=1 physkeyboard=rhod400 acpuclock.oc_freq_khz=710400"
boot
You can put the command anywhere in the cmdline section, just make sure it's between the quotes and at least one space between each command.
Topic 5
Difficulty Advanced - How Android Manages Memory/apps
Ok, I'm going to take two approaches to this. The first, is the full explanation on how Android manages memory.
Please feel free to read the post I originally read that inspired me to start looking at this stuff - How to configure Android's *internal* taskkiller. It was very helpful for me to grasp how Android manages applications. This is the reason why application killers are not a good thing...
If you want to do it manually, Starfox suggests:
Code:
echo "1536,3072,8192,10240,12288,20480" > /sys/module/lowmemorykiller/parameters/minfree
To try to do these commands, adb is very useful. Once you get adb shell working, then you just need to "su" (provides 'super user' privileges (root)) and put in the echo command above ^^.
I had another user (thanks icevapor) suggest this script -
[Script] V6 SuperCharger! HTK & BulletProof Launchers! The ONLY Android MEMORY FIXER!
I tried it myself, and it works very well. This thread is a little overwhelming, but the jist of it is this:
Install Script Manager (on the Market)
Run the V6 SuperCharger script. I use "Aggressive 1 Settings" (#2) and then I use the OOM Grouping Fixes & "Hard to Kill" launcher (#17)
Point Script Manager to run /data/99SuperCharger.sh to run as root & on boot. This will ensure the tweaks are reapplied after a reboot.
Topic 6
Difficulty Advanced - Managing Apps that auto-start on boot
This is one of the most annoying things in Android. When you have no apps installed, it seems very fast. Then you install apps, and you never seem to get that original speed back... Now you can!
This is kind of difficult to do, I am still getting the hang of it... but here goes. All credit goes to hyc, his original post.
The basic idea here is you run a logcat (adb logcat is easiest here, or you can use GetLogs to pull logcat...) Look in this log for "for broadcast" and find apps that start on boot. For example,
Code:
Line 41: I/ActivityManager( 1394): Start proc nextapp.systempanel for broadcast nextapp.systempanel/.monitorservice.BootReceiver: pid=1752 uid=10060 gids={3003, 1015}
Notice there are two sides of the "for broadcast". The name of the package (nextapp.systempanel) and the name of the service, "nextapp.systempanel/.monitorservice.BootReceive". I made the mistake of disabling the app (the left side). Do not do this, you want to disable the right side!
So in the shell,
Code:
pm disable nextapp.systempanel/.monitorservice.BootReceive
This will be persistent across boots, it will go with your data.img.
Obviously this was just one example of an app to disable. So long as you disable the right side (after the 'for broadcast') you shouldn't disable anything that will cause a serious problem. The apps should still work, but for example if you disable Google Voice you won't get messages until you open the app. So think about that... You disable Titanium Backup schedules.BootReceiver, the schedules for Titanium Backup (if you have any) won't run. Stuff like that. Disable calendar, you won't get calendar events... Disable clock no alarms. Get it? Good. I have been rebooting several times, and I keep checking what is set to start on boot. I'm not quite happy with it yet, but there's some things I'm leery of disabling. Just be wary, if you do disable something and don't like it - just pm enable <whatever you disabled>.
Now experiment away! The one caveat is if you do break something with pm disable (and it's serious) you might get a failure to boot. It really depends on how bad you mess up. If you make a copy of your data.img before you start making these changes, you can revert to that data.img and start back there.
Alright guys. Going to use this thread as a way to brainstorm about ways to improve the speed. Read up what I've posted, let me know if I did anything wrong... Also let me know what you guys do to improve speed!
Don't care about what build you're running, this thread isn't about what build is fastest - this is a how do I make every build faster thread.
I also realize I posted this in the Rhodium section - I want to see if there's any TOPAa-specific tweaks that others should be made aware of!
Update to this - I changed around how topic 4 is done. Feel free to re-read that section.
Thanks arrrghhh, but for startup stuff, there are some apps doing the job, like Startup Manager or Startup Cleaner pro (found in Market), honestly haven't tried them yet but from rating, some of them has got 4.1/5.. What do you think mate?
metho88 said:
Thanks arrrghhh, but for startup stuff, there are some apps doing the job, like Startup Manager or Startup Cleaner pro (found in Market), honestly haven't tried them yet but from rating, some of them has got 4.1/5.. What do you think mate?
Click to expand...
Click to collapse
For the pm disable stuff? If you find an app that does it, more power to you. I want to control Android directly, hence the reason I went with a script that utilizes that concept. The pm disable stuff is obnoxious I know - so if you do find an app that'll do it for you, have at it. I didn't want to add any more apps into the mix if it wasn't necessary .
Rhod400 in startup.txt
Does physkeyboard=rhod400 cahnge the keyboard layout when texting?Does it make it bigger or what is that cmdline for?
1edge1 said:
Does physkeyboard=rhod400 cahnge the keyboard layout when texting?Does it make it bigger or what is that cmdline for?
Click to expand...
Click to collapse
Sorry, that part is completely irrelevant to TOPA. It is for a RHOD400, sets up the physical keyboard. You were only supposed to look at the acpu clock command, as it fits in the startup.txt... lol.
Use the startup for your device, I'm just showing you how the line should appear in the startup.txt...
arrrghhh said:
Sorry, that part is completely irrelevant to TOPA. It is for a RHOD400, sets up the physical keyboard. You were only supposed to look at the acpu clock command, as it fits in the startup.txt... lol.
Use the startup for your device, I'm just showing you how the line should appear in the startup.txt...
Click to expand...
Click to collapse
yeah i do use the startup for topaz. Was just wondering. haha. thanx for clearing it up
Guys, I need a help. Tried everything, but still facing big lag especially when I click on dialer, contacts or messages (waiting couple of secs until they show up). This is more obvious when I click right after I 'woke up' my phone from deep sleep.
I'm using stock 20b with Iodak v8 kernel (tried v9 as well, but due to bluetooth and fm radio issue on stock, reverted to v8). Also, I did everything what I could found to improve performace: disabled and then deleted MLT, did a full wipe of everything (clean install), installed only apps that I need, turned off 3g, data and gps (only WiFi is on), installed Greenify and so on..
My current setup of kernel is following:
Governor: interactive (tried ondemand, but was even worst)
Max: 1600000
Min/Max Screen Off: 760000
Scheduler: SIO
CPUQuiet Power: userspace (noticed that only 3 cores are online instead of 4)
I appreciate any help, but please, don't tell me to search, 'cause I did. As for the other custom roms, I tried CM, but I prefer more stock, mostly because of Gallery, Polaris and FM Radio Apps.
Guys, is there any way to fix this lag issue? I don't care much for the battery, since this lag drives me crazy.
Thanks in advance.
Vladimir
vladja10 said:
Guys, I need a help. Tried everything, but still facing big lag especially when I click on dialer, contacts or messages (waiting couple of secs until they show up). This is more obvious when I click right after I 'woke up' my phone from deep sleep.
I'm using stock 20b with Iodak v8 kernel (tried v9 as well, but due to bluetooth and fm radio issue on stock, reverted to v8). Also, I did everything what I could found to improve performace: disabled and then deleted MLT, did a full wipe of everything (clean install), installed only apps that I need, turned off 3g, data and gps (only WiFi is on), installed Greenify and so on..
My current setup of kernel is following:
Governor: interactive (tried ondemand, but was even worst)
Max: 1600000
Min/Max Screen Off: 760000
Scheduler: SIO
CPUQuiet Power: userspace (noticed that only 3 cores are online instead of 4)
I appreciate any help, but please, don't tell me to search, 'cause I did. As for the other custom roms, I tried CM, but I prefer more stock, mostly because of Gallery, Polaris and FM Radio Apps.
Guys, is there any way to fix this lag issue? I don't care much for the battery, since this lag drives me crazy.
Thanks in advance.
Vladimir
Click to expand...
Click to collapse
This is "normal" for system apps. Download custom apps from google store like ExDialer,GOSms.. That will resolve your lag.. When you install those apps from store, use titanium backup to freeze stock apps(dialer,contacts,messages).
@vladja10 http://forum.xda-developers.com/showpost.php?p=49272503&postcount=1986
Thanks guys, but neither of these two options helped. There's some improvements, but still pretty much laggy.
Think I found out what causing lag: synchronization. Every time when phone is synchronizing, everything is so laggy, otherwise is ok. Following accounts have sync turned on: Skype, Facebook, WhatsApp, Twitter and Google.
Does anyone of you have experienced similar problem? Is there solution for this?
vladja10 said:
Think I found out what causing lag: synchronization. Every time when phone is synchronizing, everything is so laggy, otherwise is ok. Following accounts have sync turned on: Skype, Facebook, WhatsApp, Twitter and Google.
Does anyone of you have experienced similar problem? Is there solution for this?
Click to expand...
Click to collapse
I have all those apps running in my phone, but I did not face those lags.
But ya I did felt those lags when I'm still using stock JB OS. Stock JB from LG is sucks man, you should instal another ROM.
Currently I'm using CM11 (Kitkat 4.4.2 based), its lag free and have more free RAM. (around 350 - 400MB). :good:
The difference is like heaven and hell compared with the stock ROM (I only have 150 - 200MB Free RAM).
bomerzz said:
I have all those apps running in my phone, but I did not face those lags.
But ya I did felt those lags when I'm still using stock JB OS. Stock JB from LG is sucks man, you should instal another ROM.
Currently I'm using CM11 (Kitkat 4.4.2 based), its lag free and have more free RAM. (around 350 - 400MB). :good:
The difference is like heaven and hell compared with the stock ROM (I only have 150 - 200MB Free RAM).
Click to expand...
Click to collapse
The ROM can make a difference, but it has nothing to do with "Free RAM". I wish people would stop perpetuating this myth.
Free RAM is wasted memory on an Android device. Unless you are getting below about 50MB there is not a problem as the device is designed to use as much as it can and then swap it out automatically.
I agree about CM11 though. I'm running the latest nightly and the only problem I have is the delay in waking when you press the power button
SimonTS said:
The ROM can make a difference, but it has nothing to do with "Free RAM". I wish people would stop perpetuating this myth.
Free RAM is wasted memory on an Android device. Unless you are getting below about 50MB there is not a problem as the device is designed to use as much as it can and then swap it out automatically.
I agree about CM11 though. I'm running the latest nightly and the only problem I have is the delay in waking when you press the power button
Click to expand...
Click to collapse
Well.. Sorry for my false statement and thank you for correcting it
4X HD is my very first android device. But that's what I really thought after I flashed the CM11.. Its like whoa, more free space on RAM, and it feels like I'm using a new phone
bomerzz said:
Well.. Sorry for my false statement and thank you for correcting it
4X HD is my very first android device. But that's what I really thought after I flashed the CM11.. Its like whoa, more free space on RAM, and it feels like I'm using a new phone
Click to expand...
Click to collapse
You might want a read of this;-
RAM: What it is, how it's used, and why you shouldn't care
Well, I’m afraid that I’ll be forced to get back to CM (used it once, but missed some apps such are: FM Radio, stock gallery app (couldn’t find good replacement that synced photos with google acc) and Polaris Office – these apps I use on a daily basis). Anyway, before install CM, I’ll give one more try to Stock.
I did what @ottomanhero told me, and that actually helped. But, since I used Trickstermod to tweak governors, after every single reboot, stock values would be back, so I had to use init.d script, and there comes a problem.
Here is what I did (followed instructions from Iodak's OP):
- Using ES File Explorer created folder /system/etc/init.d and set permissions to rwxr-xr-x
- Created new file in init.d folder and name it 1script (used Note++ instead of Windows editors to avoid leaving an extra space at the end of each line or an invisible invalid character)
- Then added following commands:
Code:
#!/system/bin/sh
echo "70" > /sys/devices/system/cpu/cpufreq/interactive/go_maxspeed_load
echo "70" > /sys/devices/system/cpu/cpufreq/interactive/midrange_go_maxspeed_load
echo "60000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
echo "20000" > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
echo 200 300 400 450 500 600 > /sys/devices/system/cpu/cpu0/cpufreq/gpu_overclock
- and finally set permissions to 1script rwxr-xr-x and owner to root group to shell
So, that should be it, but didn’t work for me. Then, I installed SManager to check what’s wrong with the script, and it stated that with first 4 lines error is: no such file or directory (which is strange because exactly that's the path), and for the last line is stated: permission denied.
Did I miss something? Apologize if this question is too noob for you guys, but I’m running out of ideas.
Thanks all for your help.
Regards,
Vladimir
SimonTS said:
You might want a read of this;-
RAM: What it is, how it's used, and why you shouldn't care
Click to expand...
Click to collapse
Oh, really?
Free RAM is NOT wasted RAM.
It directly effects smoothness of the phone.Why do you think android would have Out Of Memory values if it was created to just fill up the RAM with only apps? It still needs some RAM free for caching.
---------- Post added at 03:50 PM ---------- Previous post was at 03:46 PM ----------
vladja10 said:
Well, I’m afraid that I’ll be forced to get back to CM (used it once, but missed some apps such are: FM Radio, stock gallery app (couldn’t find good replacement that synced photos with google acc) and Polaris Office – these apps I use on a daily basis). Anyway, before install CM, I’ll give one more try to Stock.
I did what @ottomanhero told me, and that actually helped. But, since I used Trickstermod to tweak governors, after every single reboot, stock values would be back, so I had to use init.d script, and there comes a problem.
- and finally set permissions to 1script rwxr-xr-x and owner to root group to shell
So, that should be it, but didn’t work for me. Then, I installed SManager to check what’s wrong with the script, and it stated that with first 4 lines error is: no such file or directory (which is strange because exactly that's the path), and for the last line is stated: permission denied.
Did I miss something? Apologize if this question is too noob for you guys, but I’m running out of ideas.
Thanks all for your help.
Regards,
Vladimir
Click to expand...
Click to collapse
Code:
#!/system/bin/sh
echo "70" > /sys/devices/system/cpu/cpufreq/interactive/go_maxspeed_load
echo "70" > /sys/devices/system/cpu/cpufreq/interactive/midrange_go_maxspeed_load
echo "60000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
echo "20000" > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
echo "200 300 400 450 500 600" > /sys/devices/system/cpu/cpu0/cpufreq/gpu_overclock
I think the script didn't execute at boot due to last line, you forgot the quotes.And while using Smanager you gotta tick "root" or else it won't run.Try this one
ottomanhero said:
I think the script didn't execute at boot due to last line, you forgot the quotes.And while using Smanager you gotta tick "root" or else it won't run.Try this one
Click to expand...
Click to collapse
Well, you were right about the quotes (now, the new values are set), but as the other 4 lines, they still have the same error: No such file or directory, and all values are stock.
Do you have any idea what's going on? Why did it work for one, and didn't for the other lines?
http://forum.xda-developers.com/showthread.php?p=48042187#post48042187
ottomanhero said:
Oh, really?
Free RAM is NOT wasted RAM.
It directly effects smoothness of the phone.Why do you think android would have Out Of Memory values if it was created to just fill up the RAM with only apps? It still needs some RAM free for caching.
Click to expand...
Click to collapse
As I stated in my first post;-
Unless you are getting below about 50MB there is not a problem
Click to expand...
Click to collapse
Of course you need some free memory, but not hundreds of MBs of it. I notice that you pointed the same XDA quote that is used and linked to by lots of different sites when this is being discussed. To use someone else's quote - better written than I could do so myself;-
In the most simplistic terms, here is how it works, and why "free RAM is wasted RAM," but also, why you don't want all RAM in use at any given time.
If an application is not in memory when you try to open it, that application haa to be loaded into memory, thus triggering a "load time." Having the application in memory (prefetched) prevents this load time and has the application load near insantly. This is why a modern OS will preload our most commonly used applications into memory. The more memory that you have, the more applications that can be preloaded, the smoother your device will run. Clearing this memory gives you no immeidate benefit, and will actually slow your device. Idle applications in memory consume almost no resources (CPU cycles, battery power, etc.). If an application is consuming resources, that means that it is doing something. Closing it will only force the application to re-load. Using a task killer for this purpose will cause a "boxing match" where the task killer closes the application, the app reopens itself, and back and forth. THIS will consume resources.
However, you want to have some memory free. Your devices will not have enough memory to preload EVERY application, so it has to guess based on your actions. It needs to have enough memory available to quickly load an app that you may want.
Let's say that you want to load an application that requires 256MB of RAM, but you only have 128MB available. This means that the OS is going to try to clear 128MB of RAM to accomodate your app, and as your app loads, will try to clear another 128MB to return to its previous state. This clear/load/clear causes a longer load time and more slowdown than just loading an app not already in memory.
So, the ideal situation is to have most common apps in memory (pre-fetched), but enough memory available to handle 1-2 common apps that are not already pre-loaded. Touchwiz (Samsung) devices allow you to clear memory from the task manager. My S2 had about 870MB of user-available RAM, and if I trashed all apps, it would go as low as 300MB in use. This may look cool, but it is a complete waste of resources, and the OS is simply going to re-load those apps over the next 2-3 minutes anyway. And if you use a task killer to keep your device idling at 300MB of available RAM? This is simply going to slow down the device, harm the battery, and give you the same memory performance and availability that you would get with an HTC G1.
Click to expand...
Click to collapse
As the OP was stating that "I only have 150 - 200MB Free RAM" with the Stock ROM, that is definitely NOT what is causing a lag issue. If you have that much free memory (before Android goes caching stuff and not declaring it of course) then you are absolutely fine on any Android device there is.
vladja10 said:
Well, you were right about the quotes (now, the new values are set), but as the other 4 lines, they still have the same error: No such file or directory, and all values are stock.
Do you have any idea what's going on? Why did it work for one, and didn't for the other lines?
Click to expand...
Click to collapse
Maybe your partitions aren't mounted.I took these lines from pimp my rom init.d script.Create another script but it has to come before the governor tweaks script.
#!/system/bin/sh
busybox mount -o remount,noatime,noauto_da_alloc,nodiratime,barrier =0,nobh /system
busybox mount -o remount,noatime,noauto_da_alloc,nosuid,nodev,nodir atime,barrier=0,nobh /data
busybox mount -o remount,noatime,noauto_da_alloc,nosuid,nodev,nodir atime,barrier=0,nobh /cache
Click to expand...
Click to collapse
For example, name this script "93Mount" and name the governor script "94Governor" so the mounting script will be executed before governor script.
ottomanhero said:
Maybe your partitions aren't mounted.I took these lines from pimp my rom init.d script.Create another script but it has to come before the governor tweaks script.
For example, name this script "93Mount" and name the governor script "94Governor" so the mounting script will be executed before governor script.
Click to expand...
Click to collapse
Well, I did like you said and here's what I got:
Code:
exec /system/bin/sh '/etc/init.d/93Mount'
h '/etc/init.d/93Mount' <
failed: No such file or directory
failed: No such file or directorybh on /data
mount: mounting atime,barrier=0,nobh on /cache failed: Invalid argument
Any idea?
For the People who want Stock Gallery on CM and hate Aosp Gallery like Iam, check facebook offical cyanogenmod. They send a link to their new gallery next. Its in beta stase, so its not avaible yet. But if its stable itll be in play store. Its like the stock gallery app. Very beauty
Sent from my LG-P880 using xda app-developers app
vladja10 said:
Well, I did like you said and here's what I got:
Code:
exec /system/bin/sh '/etc/init.d/93Mount'
h '/etc/init.d/93Mount' <
failed: No such file or directory
failed: No such file or directorybh on /data
mount: mounting atime,barrier=0,nobh on /cache failed: Invalid argument
Any idea?
Click to expand...
Click to collapse
Well try this app https://play.google.com/store/apps/details?id=com.stericson.remount&hl=tr
EDIT : check this link out. http://forum.xda-developers.com/showthread.php?t=1381188
I'm not sure it's the right track or not, it does happen to me quite ago.
The problem is the SD (my case, luckily it's external). The system try to read files from card but it got error thus try again => laggy
I removed the card and it's alive. Try to check your internal sd. hope that help
App didn't help, I got the same error. Never mind, I give up Will use Trickstermod after every single reboot until finally find solution. Thanks @ottomanhero for all your help.
@GalaxyVolvoZ that app looks realy nice. Finally a good replacement for Stock Gallery.
@klbterminator I don't have any problems with SD, at least didn't so far
Thanks guys.
Regards,
Vladimir