[Desire Android Development] aldweb:
Hello,

In the case of some of you willing to install applications or files in the system partition, you will hardly be able to do it given the small free space left after installing this so great ROM provided by spezi77. So, I will explain what I did to overcome this issue.

Disclaimer:

everything you do with the following suggestions, you do it at your own risk and I am not responsible for any resulting damages!

So, do one or two nandroid backup(s) before proceeding, have a way to go back to your previous stable system.

So, how to slim down this ROM's footprint in the small 262 Mb system partition?

You will need a root explorer application (like ES Explorer) to remove or modify some files in the ROM.

All steps assume that you have correctly installed and started spezi77's ROM (ROM installed, a2sd running y/n/y or y/y/y, gapps installed).

#1: remove audio files

/system/media/audio/alarms/

Just keep one or two alarm files (.ogg), those you will really use.

I removed all files but Cesium.ogg and Platinum.ogg, thus removing 614 Kb of alarm files and keeping 136 Kb.

/system/media/audio/notifications/

Same advice, just keep one or two alarm files (.ogg).

I kept Argon.ogg, Castor.ogg and Cobalt.ogg, thus removing 706 Kb of notification files and keeping 47 Kb of files.

/system/media/audio/ringtones/

Same advice, just keep one or two alarm files (.ogg).

I kept Argon.ogg, Castor.ogg and Cobalt.ogg, thus removing 2918 Kb of ringtones files and keeping 81 Kb of files.

/system/media/audio/ui/

I did not remove any file here, as they seem to be called directly from the Android system itself.

--> Just removing unused audio files already saved me 4238 Kb (4,14 Mb) of space.

#2: reduce bootanimation.zip (in /system/media/) file size

Basically, I unzipped the bootanimation.zip file, and then just kept 4 images (which I renamed from 10001.jpg to 10004. jpg) out of all images in the /part0/ and /part1/ directories included in this zip file, and changed the 1st line in the desc.txt file to "480 480 4".

/!\ Be careful to zip using the "Store" compression level when zipping back the files, and check that permissions are set to -rw-r--r--

--> There, I saved 950 Kb of space (file bootanimation.zip dropped from 1042 Kb to 92 Kb).

#3: remove plenty of fonts (in /system/fonts/)

Most of font files are not needed if you are using one of the most used languages (English, Spanish, French...) or one language only which requires specific files (Chinese, Hebrew, Bengali, Tamil, Thai...).

I kept the following list of fonts which I think is to be kept:

AndroidClock.ttf, AndroidClock_Highlight.ttf, AndroidClock_Solid.ttf, AndroidEmoji.ttf, Clockopia.ttf, DroidSansMono.ttf, DroidSerif-Bold.ttf, DroidSerif-BoldItalic.ttf, DroidSerif-Italic.ttf, DroidSerif-Regular.ttf, NotoColorEmoji.ttf, Roboto-Bold.ttf, Roboto-BoldItalic.ttf, RobotoCondensed-Bold.ttf, RobotoCondensed-BoldItalic.ttf, RobotoCondensed-Italic.ttf, RobotoCondensed-Regular.ttf, Roboto-Italic.ttf, Roboto-Light.ttf, Roboto-LightItalic.ttf, Roboto-Regular.ttf, Roboto-Thin.ttf and Roboto-ThinItalic.ttf.

Would you want to keep your language fonts, let's say Thai, and although I did not test it myself, I assume that you would also avoid to remove NotoSansThai-Bold.ttf, NotoSansThai-Regular.ttf, NotoSansThaiUI-Bold.ttf and NotoSansThaiUI-Regular.ttf files.

--> The saving is of 2882 Kb (2,81 Mb).

I did the job (which spezi77 did not do ;)) to update the /system/etc/system_fonts.xml and /system/etc/fallback_fonts.xml files by removing all unused references to removed (by myself) or non-existing fonts (removed previously by spezi77). Check that permissions are set to -rw-r--r-- for these two files.

--> Little saving of 5 Kb here, from 11 Kb to 6 Kb.

#4: remove ART

3 files to remove:

/system/framework/core-libart.jar

/system/lib/libart.so

/system/lib/libart-compiler.so

--> Saving is of 4312 Kb (4,21 Mb).

Total saving: 12387 Kb (12,1 Mb).

I now have enough free space to install my launcher and a few other applications in the system partition.