[Guide] A complete MiniCM9-3.0.4 how-to

epithetic

Senior Member
May 7, 2012
168
151
0
Hi guys :)

This post is essentially going to be an aggregation of info regarding MiniCM9, bringing together in one place all the random bits and pieces I found to get things working at their best. I originally started writing this for myself (to keep track of things when updating/reinstalling) but as I've responded to questions here and there I thought it might be good to have one place to link to, rather than trying to find my previous posts.


MiniCM9 basic setup


SD card:

  1. Create an ext4 swap partition from CWM; (at least 128M, I recommend 256M+)

How to get a swap partition of any size OR configure swap separately from an sd-ext partition:

Follow this basic tutorial

  1. If you just want to adjust the size of your swap partition and/or sd-ext partition, it's not necessary to completely erase your SD card/remove all partitions and start from scratch
  2. You can work with the Resize/Move options and still get what you want.

System setup:

  1. Flash minicm9 and gapps as normal (in the installer, choose only apps you use; would not recommend Apollo)
  2. Boot up your system, grab your favourite root browser from Google Play, and remove remaining unwanted applications and services (e.g. for me, Google Talk, FM radio, etc.) by deleting them from system/app.
  3. Do not 'install a2sd' via console

System configuration:

  1. Set up your autobrightness settings like this
  2. Test your pulse notification light. If it stops flashing after a couple of seconds, go to system/lib/hw via your root file manager and delete/rename lights.shakira.so. Once you reboot, your notification light should work normally.
  3. Disable Google's location service unless you need it as it may drain battery (GPS is okay)
  4. Min CPU: 320MHz (important!); Max CPU: whatever you feel like (provided your phone can handle it)
  5. Governor: SMARTASSV2
  6. No Undervolt
  7. Disable zRam
  8. Do not enable 'Allow purging of assets'
  9. Do not enable Kernel samepage merging
  10. Surface dithering: Yes
  11. 16bit transparency: No
  12. Disable boot animation: No

NB: minicm9 settings will not pick up on your swap partition (claiming swap is disabled). Open terminal emulator and type in 'free' to see your available memory, it should correctly show the size of your swap partition.


Further performance tweaks:

  1. Do NOT use Supercharger.
  2. Move large apps that are not usually running to SD (e.g. Opera) via Settings»Apps»Move to SD. If this option is greyed out, follow this guide to move them anyway (NB: the command for the ICS platform is set-install-location rather than setInstallLocation). You do not need App2SD.

Optimise your SD card's read ahead cache (significantly increases read/write speeds on higher end SD cards). There are two ways to do this; by manually creating a script (recommended) or by installing a third party application.

  1. To do it via application, install SD-Booster and a SD card speed test of your choice. Adjust the cache until you get an optimal read/write speed (for me, this is at 4096KB) – more is not always better. You can uninstall the speed tester once you're done
  2. To manually set your SD read ahead cache on boot, go to this thread and follow the instructions for Version 1. Replace 128 with the optimal value for your SD card (determined as above).

Set swappiness:
  1. You can customise your swappiness by creating/adding the following to userinit.sh in data/local/
    Code:
    #!/system/bin/sh
    
    #Swap
    swapon dev/block/mmcblk0p3
    
    echo [COLOR="Red"]50[/COLOR] > /proc/sys/vm/swappiness
    Red value ranges from 0 (don't swap unless you run out of memory) to 100 (swap from the get go). Feel free to experiment; in my experience performance is most stable around 50. Don't forget to set permissions (to rwxr-xr-x).


You should now have a beautifully smooth, stable miniCM9 on Trebuchet (battery life should be good). Stock browser should run fine thanks to swap, apps will stay in memory and load quickly. Make sure to free up apps via home button » swipe if you no longer need them, especially if running on less swap memory.



How do I get ... working? / Extras


Set custom lock screen icons:
  1. After selecting your application, tap on the icon to get a menu allowing you to choose from your gallery or system (white lock screen-styled icons)

Enable lock screen rotation:
  1. Follow this guide to patch your framework-res.apk to allow lock screen rotation, or replace yours with the one attached (but first, make sure you are using the same version of miniCM9! the apk is for 3.0.4). In either case, backing up is a good idea, folks
framework-res.apk for miniCM9-3.0.4


Fix Japanese font rendering on ICS:

Probably not something that concerns most people; but if you are using Japanese on your android, you will have noticed that by default, Chinese versions of unicode unified ideograms are rendered (which can be less than optimal at times). To get proper Japanese text output across applications, you will have to install the Japanese Droid font (DroidSansJapanese) and insert a reference to it in your font fallback .xml.

To make your life easier, I have included the files in a zip for your perusal:

  1. Extract the files
  2. Copy DroidSansJapanese.ttf to system/fonts
  3. Replace your fallback_fonts.xml in system/etc with the one provided
Japanese font files for ICS


Dark Holo themed apps:

If you like the dark Holo ICS theme, and want your applications to suit the rest of your system, you can find various inverted google apps for ICS-based roms around the web. I've included the ones I use and work well on miniCM9 on our X8 here for convenience.

  1. Extract the files
  2. Replace your apps in system/app with the ones included
  3. Reboot & enjoy a true ICS UI
Dark Holo ICS themed apps for miniCM9


Get voice input working on miniCM9:

If you've ever used voice input features, you will have noticed these (while present) fail to work after installing the rom. So will any type of android-based voice recognition. To get basic voice functionality working (sadly not ICS flavoured) do the following:

  1. in system/app delete your voice search apk
  2. reboot your system
  3. now find Google Voice Search 2.1.4 (for Android 2.2+) on Google Play and install it.
  4. voice search and recognition should now work as it did on older roms.

To get voice typing working you will have to replace your input method (or install it as an additional IME to switch to when you want to use voice typing).

  1. install IceCream Sandwich-ICS Keyboard by VLLWP from Google Play (for Android 1.6+). DO NOT UPDATE this, as its Jelly Bean version or other ICS keyboards will not work with voice typing.
  2. enable and select it as an input type and hit the microphone key. Confirm the prompt, and you should be able to use basic android speech recognition in any text form you like.


Lightweight Jelly Bean keyboard:

More of a recommendation, but what it says on the tin;

  1. get this app from Google Play (keep in mind like stock keyboard it won't work with voice input, so you might want to run it in addition to the aforementioned) and install it -- once you're all set you can now safely remove LatinIME.apk from your system/app
  2. you save memory (both in usage footprint and SD card space) and get a fully featured Jelly Bean keyboard with functional word prediction in exchange, which is a fair trade, no?



... and that is all I can think of right now. May update this thread as things change :)
 
Last edited:
X

Xerdox

Guest
Nice! I want to ask you something. Is the way to check if swap work? I am not sure :eek:

1. Create partizion (256 mb)
2. Create file userinit.sh and added it into sdcard
3. Copy and paste it into data/local/
4. Set permission
5. Reboot

Correct?
 

epithetic

Senior Member
May 7, 2012
168
151
0
Nice! I want to ask you something. Is the way to check if swap work? I am not sure :eek:

1. Create partizion (256 mb)
2. Create file userinit.sh and added it into sdcard
3. Copy and paste it into data/local/
4. Set permission
5. Reboot

Correct?
Swap should work as soon as you have a partition on current versions. The userinit is just if you want to set swappiness/specifics.

The way to check is going to terminal emulator and typing in 'free'. You should see your swap space listed.


(note swap size in the 'total' column)

Does it improve battery saving or performances ???
Does what improve battery life/performance? Both are more than decent with the settings provided, if that's what you mean. I'll see about adding screenshots.

 

IAmNice

Senior Member
Jun 28, 2012
2,401
546
0
Why would you disable KSM? Ksm improves performance. It only drains a bit of battery and doesnt harm anything.

Sent from my E15i using xda app-developers app
 

epithetic

Senior Member
May 7, 2012
168
151
0
Why would you disable KSM? Ksm improves performance. It only drains a bit of battery and doesnt harm anything.
Have not extensively tested it with the latest build so it may have been fixed since, but last I tried it caused performance/stability issues for me aside from the battery drain.

Can i change the size of the swap partition¿ i have 128 and want 256... thanks
Yes, using gparted (see linked tutorial) you can resize your existing partition.
 

IAmNice

Senior Member
Jun 28, 2012
2,401
546
0
Ive tried it and rom seems to be a bit better with KSM. Naa recommands it too.

Sent from my E15i using xda app-developers app
 

LeFeverts

Senior Member
Sep 27, 2011
253
94
0
Szarvas
did any1 faced with lag on calls? ei: when i'm reciving call, the screen is black for 2-5secs, and after lights on. i dont have any idea whats the problem, maybe can it be the low cpu freq?
 

Lajbymester

Senior Member
Jan 5, 2011
223
68
0
The apps on my phone often take 2-5 seconds to start. I thought it is because some of them are on the ext4 partition, but even the settings app does the same, and it is really annoying. When I click on an app, the ICS gradient dark background is shown for some seconds, then it is loaded. Is there a solution for this? Or is MiniCM9 just like that?
 

epithetic

Senior Member
May 7, 2012
168
151
0
The first time you open apps might take a second to load (depending on your settings)

After that they should remain cached in normal use and open more or less instantly, without the empty screen.