How I boosted performance of my HTC Desire Z 4.2 custom ROM

A. Install custom ROM of your choice
B. Install Smart Launcher 2
C. Create and enable swap
D. Install Pim my ROM and tune CPU

HTC Desire Z (Vision)
AOSP 4.2.2 – Jelly Baby – v2.0.0
Smart Launcher 2
Pim my ROM
Swapper 2
Terminal Emulator

A. Install custom ROM of your choice

1. Download Android 4.2.2 Jelly Baby ROM and Google Apps for HTC Desire Z (Vision) to your computer.
2. Connect Your Device to your computer and copy the above downloaded file to your device.
3. Turn Off your device and disconnect it from PC.
4. Now to get in the Bootloader Mode. Switch ON the phone while pressing and holding Volume Down + Power buttons together.
5. Follow the navigation instructions on the screen. Select BOOTLOADER and then go to RECOVERY.
6. In Clockwork Mode Recovery perform full data wipe, then Scroll down to ‘Flash zip from sd card’ and press the power button to select it.
7. Now use your volume keys to highlight the Android 4.2.2 ROM zip file and select it using power button,confirm the installation on next screen.
8. After the installation is complete go back and select ‘Reboot system now’, the phone will boot now and it will take almost 5-minutes to run it for the first time, So Please be Patient

NOTE: Repeat Step 7 TO Install Google Apps on your device.

Some useful Android SDK hints:

cd ~/android-sdk-linux/
tools/android update sdk
cd platform-tools
./adb kill-server
sudo ./adb start-server
./adb devices
./adb shell
mount /system
umount /system
exit
./adb reboot bootloader

B. Install Smart Launcher 2

I really love Trebuchet because it’s simplicity, but there is something much simpler and that’s Smart Launcher 2.

C. Create and enable swap

http://forum.xda-developers.com/showthread.php?t=1821071

What is Swap?

A swap file allows an operating system to use hard disk space to simulate extra memory. When the system runs low on memory, it swaps a section of RAM that an idle program is using onto the hard disk to free up memory for other programs. Then when you go back to the swapped out program, it changes places with another program in RAM. I can say Swap file is like Virtual Memory on your PC.

Requirements:
• Any ROM (Tested on Jelly Baby above)
• Any _CUSTOM_ Kernel (Tested on Fyodor 3.0.83 Kernel)
• 300+ MB space on MicroSD HC class 10
• Terminal Emulator

1. Download the Swapper 2 and the Terminal Emulator and install them. Make sure you have BusyBox installed too.
2. Go to Terminal Emulator type “free” without the quotation. Make sure you see “0” on the Swap.
3. Open Swapper 2 application, go to Setting, Swap size=300 MB, Swappiness=60 (you can play on the numbers as you like). Go Advanced preferences check “Recreate swap file” and “Reformat swap” then exit…
4. Open Swapper 2 click ON it will show some Fail. Just wait for few secs and it will continue. If not, click the ON again.
5. Go to Terminal Emulator type “free” and you will see that the “0” has been replaced.


If you like it hard core, like I do (sometimes), I use swap partition instead of swap file. Just be VERY careful co select your SD card. If you know the size of you SD card (from Android Settings -> Storage), use ‘fdisk /dev/block/mmcblkX’ (replace X mostly with number 1) and (p)rit command to identify it. It will show you the size of the SD card and current partition(s) (mostly only one, type FAT32). As you correctly identified the SD card, you may proceed to create swap partition.

D. Install Pim my ROM and tune CPU

The tuning of your device may bring excellent performance, but you have to pay it with the battery which will last less than you were used to.
Download the application Pimp my ROM from Google Play. Start it, choose TOOLS and Pimp My CPU. Overclock your processor Current max. speed to maximum (or as much as you like) and Current min. to some reasonable low amount. Very important is Governor: interactive and IO Scheduler: deadline. Don’t forget to Set on Boot: ON to keep your settings persistent. Select save and restart your phone. Enjoy the speed! This works for me on my HTC Desire Z and HTC One V. YMMV.

Some hints:

My SD card was fully occupied by FAT32 partition. So I removed SD card from my device, connect it to my computer and used GParted to shink the partition (not much hardcore, but I love that GUI).
In my example below, I’m using partition #3. You may need to replace it.


fdisk /dev/block/mmcblk1
(p)rint, (n)ew, (p)rimary, partition number (3), first cylinder (RETURN), last cylinder (+384M), (t)ag, partition number (3), hex code (82), (p)rint, (w)rite
mkswap /dev/block/mmcblk1p3
swapon /dev/block/mmcblk1p3
free

Configure Swapper 2 according to article above, just in “Settings”, select “Advanced preference”, check “Use swap partition” and point “Swap partition” to ‘/dev/block/mmcblk1p3’. It will show same false positive failures, but don’t worry. Restart you phone, launch Terminal Emulator and type ‘free’. If you see swap usage (not 0), your swap partition works.

Print Friendly, PDF & Email