[HELP] Low internal memory...what? - G1 Q&A, Help & Troubleshooting

Alright, so I'm gonna start off by saying this could be something really obvious, maybe too obvious to turn up any results in a search because I've looked, but here's my problemo:
Got a G1 (obviously), running CM5.0.8t4. I've got Apps2SD enabled, 1gb out of a 4gb micro sd card, haven't used up even half of that. But today I suddenly got a "low internal memory" warning and I was thinking huh?? I had only 8mb free out of 88 mb (or around there) So I looked around and someone who posted a similar problem was told to clear the system cache, so I figured "Oh, that makes sense". I downloaded CacheCleaner from the Market ('cuz I'm lazy) and I figured it would free up some crazy massive amount...but no, it cleared up 1 teeny mb...
It's not my apps, and it's not the cache: so my question is...where the HELL did all my internal memory go??
Thanks.

it is the apps "data" being saved on your phone, and not on the sd card. "data" such as, your high scores in games, or settings of an app, log-in info for an app... etc... u have to go into each app that you have installed on your phone (by clicking on them from the applications setting menu) and then hit "clear data" or some **** like that for each app.... that should clear some space up. and make SURE the apps are being installed on the SD card, and NOT on the phone.

Lieu10ant said:
it is the apps "data" being saved on your phone, and not on the sd card. "data" such as, your high scores in games, or settings of an app, log-in info for an app... etc... u have to go into each app that you have installed on your phone (by clicking on them from the applications setting menu) and then hit "clear data" or some **** like that for each app.... that should clear some space up. and make SURE the apps are being installed on the SD card, and NOT on the phone.
Click to expand...
Click to collapse
It is true hitting clear data will clear up SOME memory, however I don't believe that is the typical way people gain memory back. If you choose to do this REMEMBER THIS. If you clear data for the Messaging App, you will lose your texts. Same with the Contacts app, you will lose your contacts and call log. For the Launcher, you will lose everything on your home screen.

CAN ANY ONE TELL ME WHAT THIS MEANS OR WHAT IT IS>>>>>!!!!!!!!!.....
on boot
setprop ARGH ARGH
setprop net.eth0.dns1
setprop net.gprs.local-ip
setprop ro.radio.use-ppp no
setprop ro.build.product generic
setprop ro.product.device generic
# fake some battery state
setprop status.battery.state Slow
setprop status.battery.level 5
setprop status.battery.level_raw 50
setprop status.battery.level_scale 9
# disable some daemons the emulator doesn't want
stop dund
stop akmd
setprop ro.setupwizard.mode EMULATOR
# enable Google-specific location features,
# like NetworkLocationProvider and LocationCollector
setprop ro.com.google.locationfeatures 1
# For the emulator, which bypasses Setup Wizard, you can specify
# account info for the device via these two properties. Google
# Login Service will insert these accounts into the database when
# it is created (ie, after a data wipe).
#
# setprop ro.config.hosted_account [email protected]assword
# setprop ro.config.google_account [email protected]assword
#
# You MUST have a Google account on the device, and you MAY
# additionally have a hosted account. No other configuration is
# supported, and arbitrary breakage may result if you specify
# something else.
service goldfish-setup /system/etc/init.goldfish.sh
oneshot
service qemud /system/bin/qemud
socket qemud stream 666
oneshot
# -Q is a special logcat option that forces the
# program to check wether it runs on the emulator
# if it does, it redirects its output to the device
# named by the androidboot.console kernel option
# if not, is simply exit immediately
service goldfish-logcat /system/bin/logcat -Q
oneshot

HEY...don't jack my help thread! >__< (but I'll give you the benefit of the doubt and assume it was a mistake)
And as for the guys that replied, thank you very much, I haven't gotten around to trying the method of deleting that app data yet (got another issue, atm), but I'm POSITIVE that that's the memory-hogging culprit

I will second what Lieu10ant said.....clear data/cache of apps (I usually sort by size - browser and market are huge culprits) and also double-check the apps are saved to SD and not to the phone.
Also clearing cache will not delete bookmarks, log-in, SMS, etc, only clearing data will.

You can check Firerat's scripts for CM, this gives a bit of breathing space on G1 low memory, link for that is http://forum.xda-developers.com/showthread.php?t=679572

in terminal type:
Code:
su
busybox df -h
If /cache is full (>90% used)
Code:
cd /cache
rm *.apk
rm -r dalvik-cache
It fills up every time you get things from the market. This command will clear it out.

Related

Powertop

Tried searching but didn't see anything already posted....
Cyanogen posted on twitter:
powertop for android binary: http://bit.ly/VfOUN .. it needs a kernel with timer debugging enabled (this is in the CM kernels)
Its a tar file that you download. I tried deploying the files but I get an error:
Error opening terminal: unknown
Here is how I deployed the files......
Code:
# pwd
pwd
/system/etc/terminfo
# ls -l l
ls -l l
-rw-r--r-- 1 0 0 1672 Jul 3 00:47 linux
# ls -l u
ls -l u
lrwxrwxrwx 1 0 0 10 Jul 3 00:49 unknown -> ../l/linux
# ls -l /system/bin/powertop
ls -l /system/bin/powertop
-rwxrwxrwx 1 0 0 286648 Jul 3 00:42 /system/bin/powertop
#
I get the same problem.
My guess is cyan is going to include it with 3.6.1 so we can just wait for that to be released.
ive tried various things too. cyanogen, must use some voodoo to get it to work. chmod 777 the 3 files changing PATH, TERM and terminfo, no avail
From cyan on twitter:
if you can't get powertop to work, try "export TERMINFO=/system/etc/terminfo" first
Tried it, still no luck though.
Screen shot of the problem
GOT IT!
Code:
# su
su
# export TERMINFO=/etc/terminfo
export TERMINFO=/etc/terminfo
# export TERM=linux
export TERM=linux
# powertop
Attached some screenshots...
It suggested "increase the VM dirty writeback time to 15 seconds"...
I think that was part of the sysctl.conf tweak thread. I haven't redone those tweaks since I wiped and put cyan's new ROM on my phone. Interesting.
I wish my dos prompt would work with ANSI control codes so I could run it through ADB...
BTW, the tweaks it suggests are for X86, not Android. Most can be ignored, especially the ones about kernel options.
I included it with 3.6.1 too.
So what exactly does this do?
Breen said:
So what exactly does this do?
Click to expand...
Click to collapse
How did you find this website if you've never used a search engine before?
I didn't find anything specific to android.
Just like a "check what consumes most power"-app.
lmfwtw said:
Does accepting powertop suggestions reduce the speed of the phone?
It is currently suggesting
Increase the VM dirty writeback time from 5.000 to 15 seconds with
echo 1500 > /proc/sys/vm/...
Another one it suggest is
Enable the CONFIG_NO_HZ
Enable CONFIG_USB_SUSPEND
Enable CONFIG_HPET_TIMER
in kernel conf option
Click to expand...
Click to collapse
ubernicholi said:
only VM dirty writeback works
the others are for x86 architecture, which the g1 is not. ignore the recommendations of this app.
Click to expand...
Click to collapse
A few questions:
I've been running my phone with Open Overclocker at min 528 Mhz / max 528 Mhz. Would it save battery life to put the minimum lower? (I've found that the lowest you can go is "001 / 528" (leading zeros are necessary).)
How do you implement the VM dirty writeback? lmfwtw says "echo 1500 > /proc/sys/vm/...". But what is the "..."?
What is gp_timer? It always seems to be the #1 cause of wakeups by FAR. Next is futest_wait, and sometimes m2m_i2c. Can they be shutdown/decreased?
Is there anything else we can write to the kernel to save power? I found this, http://ubuntuforums.org/showthread.php?t=729644 but I have no idea if any of that is applicable / will brick my phone.
I didn't find anything specific to android.
Just like a "check what consumes most power"-app.
Click to expand...
Click to collapse
Yeah thats what I found too.
Dont pay any attention to that dude, he likes to play pretend moderator at times and ***** at people for useless posts when in fact his posts are just as useless and adding to the garbage that clutter up threads.
I found this: "Powertop is a Linux command line tool that monitors your laptop (or desktop) and offers suggestions on how to make your hardware consume less power."
I have some other questions as well, but I'll wait. Does anyone know the ones in my last post?
I've been running my phone with Open Overclocker at min 528 Mhz / max 528 Mhz. Would it save battery life to put the minimum lower? (I've found that the lowest you can go is "001 / 528" (leading zeros are necessary).)
Click to expand...
Click to collapse
Found in another thread...
Do NOT use 128/528. It hurts battery life and the processor. The jump between 528 and the idle frequency is big enough to require extra circuits to be switched on. That does two things... slows down the gain of the processor speed and hurts battery life more than simply running permanently on 528.
Click to expand...
Click to collapse
I assume going 001 / 528 would be even worse. Hope that helped.
Senorkabob said:
Found in another thread...
I assume going 001 / 528 would be even worse. Hope that helped.
Click to expand...
Click to collapse
Thanks. Actually, last night after I put it on 001/528, I started having freezes almost immediately. For example, each time the screen rotated when I took the keyboard out, it froze. And when enabling an Alarm, the toast message caused a freeze. And they were 100% full freezes, ie had to take the battery out. After about 5 full freezes, I decided to go back to 528/528 and everything went back to normal. I guess I'll stay on 528/528 hah

[HOWTO] Getting Hero To Run Fast

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)

Lock an App into Memory

I'm a heavy AIM user, among other things on Android. For me, AIM always closes when I minimize it, so I tried alternative apps, like the application Hi AIM, which I personally like a lot too. The good thing about Hi AIM is that it has a constant icon in the notification bar showing that it is active therefore I know whether or not I'm signed in or not/if the app has been dropped from memory. I ran several tests IMing myself from my computer with the app open, it works fine even if i minimize it and navigate around my phone. However, if I open up the browser and start loading a website, the icon disappears, and all subsequent messages sent are dropped. This is a large problem for me and therefore the only solution I can think of is locking the application into memory. According to Advanced Task Manager [which I do not leave on, I only use it to check memory], with my phone on standby I usually have around 19-28MB of free memory. I have the 10MB ram hack, as well as CompCache and 32MB swap. I am running the latest Super D with Dark Star theme. The browser obviously has a large memory load and is causing the AIM app to be dropped in favor of running the browser quickly, is there anyway I can lock the AIM app into memory? I understand there will be a minor general slowdown of the phone overall as a part of the memory is now purely dedicated to that single app, but AIM is something I use a lot.
Yes.
I'ts pretty much this thread: http://forum.xda-developers.com/showthread.php?t=652147
Their solution is to "download the AutoKiller app" and press "keep alive"
hope this helps
You just made my day. Thank you very much haha
Advanced Task Manager also works for what you require.
Been using it for awhile now and am satisfied enough to not use another app for such purposes.
I don't know what/how to change this, but this is the code you need to make the sense home app stay in memory. Perhaps its similar to the way you make any other app stay in memory?
Code:
adb pull /init.rc
replace "setprop ro.HOME_APP_MEM ..." with:
setprop ro.HOME_APP_MEM 1536
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

A2SD view apps loaded in partition

First post, hope I haven't picked the wrong place. I did search the forum before asking this.
Is there a way to see the A2SD partition, or to see the apps installed on it? I set mine rather low, at 512MB (that's what it asked for at default) and I figured that should be more than enough since I only have ~100MB or so on stock ROM.
So yeah, none of the market apps I have seen can show me the space being used or how much room is left free on the partition.
Any idears?
Quick System Info in the Market, will show you the total amount of mb being used and what is left for a2sd.
Connect to your phone via USB cable and enter the following in a command prompt (this of course assumes you have installed the android sdk):
adb remount
adb shell
ls /system/sd/app/
I got this from this post: "forum.xda-developers.com/showthread.php?t=603052"
just put the http tag in front of the above and cut and paste it into the browser address bar.
Thanks, to both of you. The Quick System Info App does the trick!

[FIX] Bulletproof Background Apps!

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.

Categories

Resources