Galaxo tweaks - get more memory :)

Last Updated:

  1. kam187

    kam187 Well-Known Member

    # Remount read/write
    adb remount

    # open shell
    adb shell

    # go to apps directory
    cd /data/app_s

    # delete QuickDroid (if you want to)
    rm QuickDroid.apk

    # delete NPS sync (it doesn't work so why run it!)
    rm wssyncmlnps.apk

    # disable drexe (this gets baseband info for NPS. Who needs it!)
    mv /system/bin/drexe /system/bin/

    # disable npsmobex (this handles auth with nps)
    mv /system/bin/npsmobex /system/bin/

    Now kill any running apps, and flush the cache to get a good baseline of free memory:

    sync ; echo 3 > /proc/sys/vm/drop_caches ; cat /proc/meminfo ; free

    I get this Total memory after boot with all tasks killed:

    Code (Text):
    2. MemTotal:        95948 kB
    3. MemFree:         23308 kB
    4. Buffers:            44 kB
    5. Cached:          15392 kB
    a total of (23308 + 15392)/1024 = 37.79296875

    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

  2. kam187

    kam187 Well-Known Member

    If you don't use the SDK to take screenshots or debug then you can also kill debuggerd:

    mv /system/bin/debuggerd /system/bin/

    Remember you can undo all the mv's by moving the .off file back to the original name :)

    Code (Text):
    2. MemTotal:        95948 kB
    3. MemFree:         29268 kB
    4. Buffers:            44 kB
    5. Cached:          13728 kB
    Total memory = (29268 + 13728)/1024 = 41.98828125 mb

    My clean process list:

    Code (Text):
    3. # my top command
    4.  1594  1525 0        R     2064  2.1   0 14.2 top
    6. # ESSENTIAL PROCESS - core System process
    7.  1085  1018 1000     S     158m169.1   0  0.0 system_server
    9. # ESSENTIAL PROCESS - android core process
    10.  1129  1018 10000    S     122m130.1   0  0.0 android.process.acore
    12. # ESSENTIAL PROCESS - handles auto sync, and google connections
    13.  1153  1018 10012    S     105m112.8   0  0.0
    15. # ESSENTIAL PROCESS - keyboard and locale
    16.  1198  1018 10000    S     103m110.3   0  0.0
    18. # ESSENTIAL PROCESS - handles phone functions
    19.  1127  1018 1001     S     101m108.4   0  0.0
    21. # ESSENTIAL PROCESS - handles android media (technically you could kill this
    22.                       but you'll cripple the phone media functions!)
    23.  1245  1018 10013    S    93184 96.9   0  0.0
    25. # USEFULL PROCESS - Handles alarm clock and events.  You could kill it to
    26.                     save 1mb max, but its not really worth it.
    27.  1285  1018 10059    S    92128 95.8   0  0.0
    29. # ESSENTIAL PROCESS - system process, handles forking requests
    30.  1018     1 0        S    71300 74.2   0  0.0 zygote /bin/app_process -Xzygote /
    32. # ESSENTIAL PROCESS - Handles media player, camera etc.  Also the headset
    33.                       keys for music get intercepted by this process
    34.  1019     1 1013     S    22696 23.6   0  0.0 /system/bin/mediaserver
    36. # ESSENTIAL PROCESS - API between OS and modem
    37.  1017     1 1001     S     9568  9.9   0  0.0 /system/bin/rild
    39. # USEFULL PROCESS - Allows adb.  You could kill it, but you wouldnt be
    40.                     able to shell in anymore!
    41.  1023     1 0        S     3332  3.4   0  0.0 /sbin/adbd
    43. # ESSENTIAL PROCESS - allows one to one comms between apps,
    44.  1020     1 1002     S     1168  1.2   0  0.0 /system/bin/dbus-daemon --system -
    46. # ESSENTIAL PROCESS - handles disks
    47.  1011     1 0        S      868  0.9   0  0.0 /system/bin/vold
    49. # ESSENTIAL PROCESS - handles running services
    50.  1010     1 1000     S      808  0.8   0  0.0 /system/bin/servicemanager
    52. # ESSENTIAL PROCESS - handles apk installation and removal.  You need it
    53.                       if you use market!
    54.  1021     1 0        S      800  0.8   0  0.0 /system/bin/installd
    56. # USEFULL PROCESS - handles auto rotate - uses very little memory anyway
    57.  1013     1 0        S      256  0.2   0  0.0 /system/bin/akmd2
  3. Vap1d-

    Vap1d- Well-Known Member

    Thanks Kam, good stuff. Will have to do this on my other computer that has adb on it tomorrow.
  4. pegasus21

    pegasus21 Well-Known Member

    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.
  5. kam187

    kam187 Well-Known Member

    I havnt checked because i've been fiddling with the OS too much. Once i get this stable i'll have a look
  6. Andronix

    Andronix Well-Known Member

    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.

    Kam, thanks for that, very good info, as usual. :)
  7. kam187

    kam187 Well-Known Member

    ok so here's a quick script file to delete loads of unused stuff like diagnostics. Thanks Pegasus21 :)

    It deletes the HTC keyboard (not the default one that's used in galaxo or galaxoHero which is a skinned android one).

    It deletes Java and ext4 support. You can edit what it deletes if you want to keep them.

    It deletes galaxoapps, which lets face it is pretty useless after the first install :)

    It deletes NPS processes because we'll never update this ROM using NPS.

    It removes QuickDroid because it wastes CPU indexing. Install it from market again, or edit the file if u like it.

    It deletes the debuggerd process, if you use the SDK you might want to keep that. (adb will always work tho)

    To use, download the zip and put it into the same directory as adb. Then open a command prompt:

    # mount read/write
    adb remount

    # upload the script
    adb push /system/

    # Open a shell
    adb shell

    # make the script executable
    chmod +x /system/

    # run the script

    # reboot


    Then after you have rebooted, use taskkiller to kill any left over processes and you can check your ram with:

    sync ; echo 3 > /proc/sys/vm/drop_caches ; cat /proc/meminfo ; free

    Attached Files:

  8. kam187

    kam187 Well-Known Member

    Galaxo Hero:

    Code (Text):
    2. MemTotal:        95948 kB
    3. MemFree:         29268 kB
    4. Buffers:            44 kB
    5. Cached:          13728 kB
    Total memory = (29268 + 13728)/1024 = 41.98828125 mb


    Code (Text):
    2. MemTotal:        95948 kB
    3. MemFree:         20076 kB
    4. Buffers:            44 kB
    5. Cached:          27204 kB
    Total memory = (20076 + 27204)/1024 = 46.171875mb

    There's only about 5mb between them :-/
  9. pegasus21

    pegasus21 Well-Known Member

    Definitely not a task killer since I disabled it with pm just to see...
    Not handcent sms either...

    Quite odd but at least I managed to isolate the 4% drop in battery to a few items.
  10. Andronix

    Andronix Well-Known Member

    you may find usefull "autostarts".
  11. intouch

    intouch Member

    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.
  12. Andronix

    Andronix Well-Known Member

    Uh, I'd suggest factory reset and monitor things for a bit.
  13. Rastaman-FB

    Rastaman-FB Well-Known Member

    Are you using the case
  14. kam187

    kam187 Well-Known Member

    Experimenting with stock II5 now... stay tuned...

    MemTotal: 95976 kB
    MemFree: 30788 kB
    Buffers: 44 kB
    Cached: 22452 kB

    Total 51.992mb

    Seems pretty stable at just over 50mb free :)
  15. intouch

    intouch Member

  16. boomtopper

    boomtopper Active Member

    Hi Kam have you done a script aswell for cleaning up the stock II5?
  17. hippy

    hippy Well-Known Member

    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).


  18. shanyel

    shanyel Active Member

    can someone get here the Samsung Switchers.apk? mistakenly i deleted it
  19. kam187

    kam187 Well-Known Member

    Stock script i just did quickly. I just changed the directorys etc.

    You'll get some file not found stuff because i didnt remove all the lines for files that are only in the Galaxo Hero rom :)

    You'll probably need busybox. Install the custom recovery if u dont have it already and 'enable su'.

    Then boot into normal mode and copy busbox and the script to your sdcard. Then adb shell

    # superuser (superuser.apk will load on the phone, allow it)

    # remount system read/write
    mount -o remount,rw -t yaffs2 /dev/block/mtdblock1 /system

    # copy busy box
    cat /sdcard/busybox > /system/bin/busybox

    # change permisions
    chmod 4755 /system/bin/busybox

    # install busy box
    /system/bin/busybox --install -s /system/bin/

    # fix cp
    cd /system/bin
    busybox cp -s busybox cp

    # copy script to system (there's no +x on the sdcard)
    cp /sdcard/ /system
    chmod 744 /system/

    # run it, and ignore the file not found stuff

    Then reboot, adb shell back in, su and type ps and look for the debuggerd process. If its not there everything went ok :)


    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.

    CSC - CSC inits for first boot. Not used again

    CurrentDataState - I forget what this one is tbh!

    MEGAUPLOAD - The leading online storage and file delivery service
  20. Andronix

    Andronix Well-Known Member

    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...
  21. drakaz

    drakaz Member

    And another great job from kam187 !! :)

    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...
  22. skandalfo

    skandalfo Active Member

    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.
  23. kam187

    kam187 Well-Known Member

    USB debugging enables adb.

    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 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 :)
  24. hippy

    hippy Well-Known Member

    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.
  25. scollie

    scollie Active Member

    Kam in post #7 you included a script which deletes files from

    Then in post #19 you included a link to a MEGAUPLOAD file which deletes files from

    So I am now a bit confused, should I run one or both of these scripts?

    Also in #19 you have the following lines
    cp /sdcard/ /system
    chmod 744 /system/

    # run it, and ignore the file not found stuff

    which seem to copy the appsstock file but executes the apps one, is there a typo here?

Share This Page