• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root Galaxo tweaks - get more memory :)

kam187

Android Expert
Aug 3, 2009
1,320
46
UK
# 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/drexe.off

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

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:
MemTotal:        95948 kB
MemFree:         23308 kB
Buffers:            44 kB
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
 
If you don't use the SDK to take screenshots or debug then you can also kill debuggerd:

mv /system/bin/debuggerd /system/bin/debuggerd.off

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

Code:
MemTotal:        95948 kB
MemFree:         29268 kB
Buffers:            44 kB
Cached:          13728 kB

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
 
Upvote 0
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 clearapps.sh /system/clearapps.sh

# Open a shell
adb shell

# make the script executable
chmod +x /system/clearapps.sh

# run the script
/system/clearapps.sh

# reboot
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
 

Attachments

  • clearapps.zip
    660 bytes · Views: 386
Upvote 0
Galaxo Hero:

Code:
MemTotal:        95948 kB
MemFree:         29268 kB
Buffers:            44 kB
Cached:          13728 kB

Total memory = (29268 + 13728)/1024 = 41.98828125 mb

Galaxo:

Code:
MemTotal:        95948 kB
MemFree:         20076 kB
Buffers:            44 kB
Cached:          27204 kB

Total memory = (20076 + 27204)/1024 = 46.171875mb

There's only about 5mb between them :-/
 
Upvote 0
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!

#!/system/bin/bash

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

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

mv /system/bin/debuggerd /system/bin/debuggerd.off

rm -rf /data/app_s/DebugTool.apk

rm -rf /data/app_s/galaxoapps.apk

rm -rf /data/app_s/HDBlog.apk

rm -rf /data/app_s/Jbed.apk

rm -rf /data/app_s/Logcollector.apk

rm -rf /data/app_s/Quickdroid.apk

rm -rf /data/app_s/SwiFTP_1.11.apk

rm -rf /data/app_s/VPN_Connections_v09.apk

rm -rf /data/app_s/HTC_IME.apk

rm -rf /data/app_s/bootsetting.apk
rm -rf /data/app_s/bootsetting.odex

rm -rf /data/app_s/CameraFirmware.apk
rm -rf /data/app_s/CameraFirmware.odex

rm -rf /data/app_s/CSC.apk
rm -rf /data/app_s/CSC.odex

rm -rf /data/app_s/CurrentDataState.apk
rm -rf /data/app_s/CurrentDataState.odex

rm -rf /data/app_s/DataCopy.apk
rm -rf /data/app_s/DataCopy.odex

rm -rf /data/app_s/FactoryTest.apk
rm -rf /data/app_s/FactoryTest.odex

rm -rf /data/app_s/FileCopy.apk
rm -rf /data/app_s/FileCopy.odex

rm -rf /data/app_s/FileCount.apk
rm -rf /data/app_s/FileCount.odex

rm -rf /data/app_s/InputEventApp.apk
rm -rf /data/app_s/InputEventApp.odex

rm -rf /data/app_s/lcdtest.apk
rm -rf /data/app_s/lcdtest.odex

# rm -rf MusicService.apk

rm -rf /data/app_s/PhoneErrService.apk
rm -rf /data/app_s/PhoneErrService.odex

rm -rf /data/app_s/RilFactoryApp.apk
rm -rf /data/app_s/RilFactoryApp.odex

rm -rf /data/app_s/serviceModeApp.apk
rm -rf /data/app_s/serviceModeApp.odex

rm -rf /data/app_s/shutdown.apk
rm -rf /data/app_s/shutdown.odex

rm -rf /data/app_s/Switchers.apk
rm -rf /data/app_s/Switchers.odex

rm -rf /data/app_s/testgps.apk
rm -rf /data/app_s/testgps.odex

rm -rf /data/app_s/TSPFirmware.apk
rm -rf /data/app_s/TSPFirmware.odex

rm -rf /data/app_s/WlanTest.apk
rm -rf /data/app_s/WlanTest.odex

rm -rf /data/app_s/wssyncmlnps.apk
rm -rf /data/app_s/wssyncmlnps.odex

rm -rf /system/lib/libjbedvm.so

# rm -rf lib\libpdfreader.so - Used by htc's pdfreader

rm -rf /system/lib/ext4dev.ko

rm -rf /system/lib/jbd2.ko
 
Upvote 0
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)
su

# 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/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.

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
 
Upvote 0
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.
 
Upvote 0
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 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 :)
 
Upvote 0
Kam in post #7 you included a script clearapps.zip which deletes files from
/data/app_s.

Then in post #19 you included a link to a MEGAUPLOAD file clearappsstock.zip which deletes files from
/system/app

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/clearappsstock.sh /system
chmod 744 /system/clearapps.sh

# run it, and ignore the file not found stuff
/system/clearapps.sh

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

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones