You need to add the MemFree and Cached to get the total free memory usable by apps. This is the MAX memory you will have with no apps running (if u run the sync etc line above). The sync line above is usefull to compare the REAL memory change when you use various widgets or programs.
Extra info..
sync - flushes any disk caches
echo 3 > /proc/sys/vm/drop_caches - Free pagecache, dentries and inodes:
cat /proc/meminfo - Get memory and cache usage
free - get memory usage
Last edited by kam187; October 23rd, 2009 at 11:15 PM.
Total memory = (29268 + 13728)/1024 = 41.98828125 mb
My clean process list:
Code:
PID PPID USER STAT VSZ %MEM CPU %CPU COMMAND
# my top command
1594 1525 0 R 2064 2.1 0 14.2 top
# ESSENTIAL PROCESS - core System process
1085 1018 1000 S 158m169.1 0 0.0 system_server
# ESSENTIAL PROCESS - android core process
1129 1018 10000 S 122m130.1 0 0.0 android.process.acore
# ESSENTIAL PROCESS - handles auto sync, and google connections
1153 1018 10012 S 105m112.8 0 0.0 com.google.process.gapps
# ESSENTIAL PROCESS - keyboard and locale
1198 1018 10000 S 103m110.3 0 0.0 com.android.inputmethod.latin
# ESSENTIAL PROCESS - handles phone functions
1127 1018 1001 S 101m108.4 0 0.0 com.android.phone
# ESSENTIAL PROCESS - handles android media (technically you could kill this
but you'll cripple the phone media functions!)
1245 1018 10013 S 93184 96.9 0 0.0 android.process.media
# USEFULL PROCESS - Handles alarm clock and events. You could kill it to
save 1mb max, but its not really worth it.
1285 1018 10059 S 92128 95.8 0 0.0 com.android.alarmclock
# ESSENTIAL PROCESS - system process, handles forking requests
1018 1 0 S 71300 74.2 0 0.0 zygote /bin/app_process -Xzygote /
# ESSENTIAL PROCESS - Handles media player, camera etc. Also the headset
keys for music get intercepted by this process
1019 1 1013 S 22696 23.6 0 0.0 /system/bin/mediaserver
# ESSENTIAL PROCESS - API between OS and modem
1017 1 1001 S 9568 9.9 0 0.0 /system/bin/rild
# USEFULL PROCESS - Allows adb. You could kill it, but you wouldnt be
able to shell in anymore!
1023 1 0 S 3332 3.4 0 0.0 /sbin/adbd
# ESSENTIAL PROCESS - allows one to one comms between apps,
1020 1 1002 S 1168 1.2 0 0.0 /system/bin/dbus-daemon --system -
# ESSENTIAL PROCESS - handles disks
1011 1 0 S 868 0.9 0 0.0 /system/bin/vold
# ESSENTIAL PROCESS - handles running services
1010 1 1000 S 808 0.8 0 0.0 /system/bin/servicemanager
# ESSENTIAL PROCESS - handles apk installation and removal. You need it
if you use market!
1021 1 0 S 800 0.8 0 0.0 /system/bin/installd
# USEFULL PROCESS - handles auto rotate - uses very little memory anyway
1013 1 0 S 256 0.2 0 0.0 /system/bin/akmd2
Last edited by kam187; October 23rd, 2009 at 11:58 PM.
On a side note, do you notice if your phone stays awake more on this custom rom as opposed to official or maybe it's just something I installed recently
During a 2hr period, my phone is running for about 6-7mins of the time. Trying to see what might have caused the running period.
Pegasus, yeah I noticed that also, try removing taskiller, it likes keeping the phone awake. I removed lot of things from original GalaxHero to know exactly wuat was the cause.
During a 2hr period, my phone is running for about 6-7mins of the time. Trying to see what might have caused the running period.
Mine is worse.
With II5 firmware, my Galaxy is running for about 12 mins in a 1hr period!
I thought it was normal.
I have WiFi and 3g data enabled. No third-parties applications installed.
Device(s): i7500@galax0-1.6.3.4
OC@710mhz
HTC Desire - never ending modding
Thanks: 104
Thanked 919 Times in 777 Posts
Quote:
Originally Posted by intouch
Mine is worse.
With II5 firmware, my Galaxy is running for about 12 mins in a 1hr period!
I thought it was normal.
I have WiFi and 3g data enabled. No third-parties applications installed.
The script posted by kam187. I know some of these items are self-explanatory, but before I remove them any chance you could explain some of the odd ones in case I actually want to keep them? eg. would I ever use debuggerd? DebugTool.apk? What's Jbed.apk? Is LogCollector useful? No need for FTP client or VPB connections? What's bootsetttings? Why remove camerafirmware? CSC? CurrentDataState? You get the idea
I'm just wondering what a lot of this does and why you would choose to remove it (obv. forgetting the memory bonus).
Thanks!
Quote:
#!/system/bin/bash
# disable drexe (this gets baseband info for NPS. Who needs it!)
mv /system/bin/drexe /system/bin/drexe.off
# copy script to system (there's no +x on the sdcard)
cp /sdcard/clearappsstock.sh /system
chmod 744 /system/clearappsstock.sh
# run it, and ignore the file not found stuff
/system/clearappsstock.sh
Then reboot, adb shell back in, su and type ps and look for the debuggerd process. If its not there everything went ok
Hippy:
debuggerd - Its only used if you develop apps with the SDK. You won't need it. If you do develop apps you'll probably need to restore to factory and make sure you're stuff works on a stock phone anyway.
DebugTool.apk - its some debug menu u can bring up. You'll never use it!
Jbed.apk - Java. I dont need or use it. You can keep it if you want
LogCollector - Used to collect crash logs etc. You dont really care about crashlogs
bootsetttings - switches boot settings i think. Once the firmware has booted first time it wont be used again
camerafirmware - used to update the camera firmware. Pretty dangerous (see the other thread). After first boot you'll never use this again.
I ran your script and changed compcache settings to 64000 so compcache can use all free RAM. It works quite well sofar. Browser now rarely clean open tabs and phone is not crawling after some time. Try it...
Currently working on a light version of the rom (the new Galaxo), with this kind of purification, a lightest kernel and a few init.rc tunning. I hope this futur rom will be fastest. kam187, if you have another improvment...
Please don't remove development facilities from your roms.
I actually love GalaxoHero, but it would be a hassle having to search and re-install the debugging features after a rom installation / upgrade. Debugging in the device is much better than using the emulator (at least for me). It's better leaving the option to enable it in (if that's not what the "Settings / Applications / Development / USB Debugging" option does).
One thing is removing items that don't work at all and that you can't disable (NPS sync thingies), and another one is removing things that actually work.
The device itself runs adbd and debuggerd, these are different processes for different purposed. adbd handles adb shell etc, so is usefull to keep running. Otherwise you'll be really stuck if something broke!
debuggerd is used by the SDK debugger. It shows debug information for your test process. Unless you're developing apps you dont need it. And if you do one day, just adb in and rename it from debuggerd.off back to debuggerd
If you're developing apps you should be running a stock system anyway!
so debuggerd is useless for most users, and those that need it should know not to run that line
Surely it's better to distribute the lightest ROM and leave it up to users to install stuff?
Also, there's going to be far fewer users that needing development tools than not, so it makes sense to remove them and let users that need them add them later.
Thanks for the quick reply, your help is really appreciated!
While you are around, maybe you could help re the control characters that appear when I use a cmd terminal as shown here
C:\Documents and Settings\Stan>cd ../../temp/windows
←[01;32m[root@galaxy←[01;31m:←[01;34m/]←[00m ls
ls
←[1;34mcache←[0m ←[1;32minit←[0m ←[1;34msbin←[0
m
←[1;34mdata←[0m ←[1;32minit.goldfish.rc←[0m ←[1;34msdcard←
[0m
←[1;34mdbdata←[0m ←[1;32minit.rc←[0m ←[1;34msqlite_
stmt_journals←[0m
←[0;0mdefault.prop←[0m ←[0;0mlogo.rle←[0m ←[1;34msys←[0m
←[1;34mdev←[0m ←[1;34mproc←[0m ←[1;34msystem←
[0m
←[1;36metc←[0m ←[1;34mroot←[0m ←[1;34muserdat
a←[0m
←[01;32m[root@galaxy←[01;31m:←[01;34m/]←[00m
←[01;32m[root@galaxy←[01;31m:←[01;34m/]←[00m su
su
# ls
ls
←[1;34mcache←[0m ←[1;32minit←[0m ←[1;34msbin←[0
m
←[1;34mdata←[0m ←[1;32minit.goldfish.rc←[0m ←[1;34msdcard←
[0m
←[1;34mdbdata←[0m ←[1;32minit.rc←[0m ←[1;34msqlite_
stmt_journals←[0m
←[0;0mdefault.prop←[0m ←[0;0mlogo.rle←[0m ←[1;34msys←[0m
←[1;34mdev←[0m ←[1;34mproc←[0m ←[1;34msystem←
[0m
←[1;36metc←[0m ←[1;34mroot←[0m ←[1;34muserdat
a←[0m
#
Sorry for the formatting above but I'm not sure how else to copy from the cmd window (I 'marked' the text then copied it).
I've highlighted in bold the 2 'ls' commands and the 'su' command but as the output is surrounded by control chars it is difficult to read it!
Thanks for any help you can give with this. If you have any queries it will be tomorrow before I can get back to you as I am off out for the evening now!
and also SSH_OFF.bat and put this inside it
adb shell "kill `ps | grep dropbear | awk '{print $1}'`"
You can change 'password' to anything you like. The SSH_OFF just finds the dropbear pid and kills it.
After running SSH_ON just putty to 127.0.0.1 and port 9999, make sure to select ssh as the protocol. And hey presto a nice colour shell, and stuff like vim also works!
As soon as you're in type bash to switch to bash shell, and get history to work.
So save a profile in putty, and every time you want to connect, double click SSH_ON, and the windows will stay open showing u ssh connections. Use putty to connect.
When you're done run SSH_OFF, and the SSH_ON windows should dissapear as dropbear was killed.
Last edited by kam187; October 27th, 2009 at 05:19 PM.
Hmm did i get this right.. I think the misterious extra 10mb that appeared in the 'H' firmwares is from extra memory stolen from the GPU. Thats why all the 3D stuff broke :-/
Hmm did i get this right.. I think the misterious extra 10mb that appeared in the 'H' firmwares is from extra memory stolen from the GPU. Thats why all the 3D stuff broke :-/
I read some stuff worked on G firmwares and it all broke on H firmwares. Maybe i got it wrong. Anyway looks like drakaz is building the mods in and a tiny kernel! Should be niceeee
Do I need to leave apps like GMail running in order to get push notifications of new E-mails, or is the GApps process enough?
How does this work with other apps that notify, like Messaging (well, I actually use chompSMS) and Twitter apps (I use Swift)? Do they have to be running in order for notifications to work?
I ask because my battery life is considerably worse with Galaxo than it was with the stock II5 firmware. I'm thinking that killing some of these processes will help battery life as well as making the phone faster.
Gmail, messaging, google maps, calender and a few other procresses run at boot because google think you'll use them all the time. Ok messaging, yeah, but the rest i dont thing i do!
The OS actually handles the events, and launches the associated app when you click on the notification. So if an SMS came in, when you click it, it'll open it in your registered SMS app.
The app itself doesnt need to be running since it doesnt handle the events, only displays the data associated to it, like an SMS.
The only exception is gapps which is needed for autosync.
Alarmclock is another interesting one. It eats 2mb of ram doing pretty much not alot!
It needs to be run at boot to schedule your set alarms with the OS. Then it can be killed. When the scheduled alarm is triggered in the OS, it opens alarmclock app to handle it - and make the alarm noise etc.
So this can also be killed after boot if you like.
Calender works the same, it must be run once to schedule your calender events.
With both alarmclock and calender, if you open then to change an event, it will reschedule with the OS, and so you can kill it again if you like.
You can download 'autostarts' from the market to check whats autostarting and turn stuff off. Its not free i think.
Just remember leave alarmclock and calender autostart on and kill them after boot. alarmclock is actually a system task so is hidden in taskiller
On II8 with NPS processes removed, and only the google search widget and normal clock, after killing all tasks in taskiller after boot I have 47mb free.
With the flip clock with weather widget I have 40mb free
Once all your apps are setup, and you're pretty close to your final system, you can delete the dalvik cache and force it to regenerate all the dex files.
[You need root. Boot the phone, adb shell in then.. ]
cd /data/dalvik-cache
rm *
reboot
The phone will reboot, and take a little longer to boot. You'll probably gain about 1mb of RAM.
dalvik cache? - All apps get translated into bytecode that gets fed to the Dalvik virtual machine. Its a bit like a Java VM with .jar files. When new apps appear, or cache files are missing for them, the dalvik VM converts all apps into their .dex equivalent. It checks all dependancies and creates the best set of .dex files it can.
If you installed/removed loads of stuff, or like most of us, installed loads of apps, the cache may not be optimal. Remember sometimes it will include libraries inside the .dex files. Dalvik is supposed to redo the caches for any files that might be affected by install/uninstall or library update, but it doesnt seem to do a good job!
The dalvik cache is 'all' programs converted into .dex files. So any programs your phone see's in its app paths, OR tries to run, will get the treatment and cached in that directory
So there's no need to worry about anything else, just delete the cache as above.
and also SSH_OFF.bat and put this inside it
adb shell "kill `ps | grep dropbear | awk '{print $1}'`"
You can change 'password' to anything you like. The SSH_OFF just finds the dropbear pid and kills it.
After running SSH_ON just putty to 127.0.0.1 and port 9999, make sure to select ssh as the protocol. And hey presto a nice colour shell, and stuff like vim also works!
As soon as you're in type bash to switch to bash shell, and get history to work.
So save a profile in putty, and every time you want to connect, double click SSH_ON, and the windows will stay open showing u ssh connections. Use putty to connect.
When you're done run SSH_OFF, and the SSH_ON windows should dissapear as dropbear was killed.
Just had a chance to try the above. Thanks very much for that! Using putty is so much better than the wiindows cmd terminal.
Hi, I can't find my app_s directory. When I cd into data then do an ls I get nothing back and if I cd into /data/app_s I get an error stating can't cd to app_s My phone is working properly and I have the Galaxo Hero rom installed. Any ideas please? Thanks.
Thank you for signing up to receive updates for the 4
An email has been dispatched to confirm your signup. Please click the link in the email.
Buy the Samsung i7500
Sign up for instant notification when the Samsung i7500 goes on sale!
When Samsung joined the Open Handset Alliance, excitement and anticipation engulfed the mobile world. With industry leading mobile phones such as the Samsung Instinct and Samsung Omnia already on the market, expectations soared. The speculation can f... Read More