From: http://noirbright.com /? P = 412
This rom is a noirbright exercise
First, explain the cache hack.
G1 has a small space. As we all know, when danger SPL is not flushed, the main partition size of G1 is as follows:
/System 67.5 MB
/Data 74.7 MB
/Cache: 67.5 MB
After danger SPL is refreshed, the space will increase.
/System 90 MB
/Data 89.7 MB
/Cache 30 mb
Danger SPL solves the problem that early G1 space is insufficient and Rom cannot be upgraded. However, with the gradual upgrade of the Android version, the space of G1 gradually becomes more tight, so some people started the idea of the remaining 30 mb in the cache partition.
We know that cache partitions are not very useful. We can even move all the major cache files to the SD card. In most cases, cache partitions are empty, therefore, this part of space can be used properly.
Cache hack is a solution to the space used in this case (only old machines such as G1 will be able to make this happen, huh, huh)
Implementation of cache hack
To implement cache hack, you still need some rom preparation basics.
First, cache hack must be supported by boot. IMG.
Boot. IMG is composed of kernel and ramdisk. We can use the script to boot. split IMG into two files: kernel and ramdisk. Decompress ramdisk to obtain the content in ramdisk. What we need to modify is the init in ramdisk. RC file, the specific modification method can refer to this post on xda: http://forum.xda-developers.com/showthread.php? T = 653348
After modifying the init. RC file, run the script to package the kernel and ramdisk into boot. IMG again. In this way, Boot. IMG is done.
Second, adjust the structure of the RoM package and separate the content you need to copy to the cache partition from the system partition. For details, refer to the rom I uploaded.
Again, refer to the post on xda to add the script required for startup.
Finally, modify the update script to establish a connection between systems. This can also be referred to my Rom practice.
Package, sign, and Flash.
After the mobile phone is started, the internal available space of the mobile phone reaches 87.4 MB.
Known issues
Currently, cache hack uses different app2sd methods than cm. Therefore, after cache hack is enabled on cm5, app2sd of cm5 can only be enabled for a long time and cannot be disabled, however, this does not affect our use. Later, let's see if this problem can be further corrected.
Applicability
Cache hack is suitable for a large Rom package, such as a sense Rom, such as a slide Rom. When you find that there is not enough space in the ROM porting process, You have to streamline the system, however, if there is no better reduction, you can start to consider using cache hack.
Sample Rom download
Download