Wednesday, May 9, 2012

Task Manager For CyanongenMod Custom Rom

It is very well known to everyone who uses CyanogenMod custom rom that it doesn't come with a task manager. Yes, Cyanogen Mod believes that android is smart enough to manages it's applications and running processes and thus they release a rom without task manager. I too agree with them and I am quite sure anyone who is aware about the state of activities in an android application will probably agree with them. However, many users are unhappy about this situation and they would like to use task manager to manage the process themselves. So, in this post I will guide you through the installation process of task manager in cyanogenmod rom so that you will be able to take control of your running processes.

The method below uses Android Debug Bridge (ADB) to install Task Manager on your smartphone running cyanongemod. This method is tested and works fully with any cyanogen mod rom on Samsung Galaxy Mini/Pop/Next GT-S5570 smartphone. However, I think it will work on other devices running Cyanogen Mod rom. So, you can give it a try on your device and don't forget to inform us if it worked so that other user with the same device can also try it out. And, now without further delay let's proceed to installation.

Method 1
Requirements : Make sure you have everything listed below before you proceed.
Once you have got everything needed. Make sure you enable USB debugging at Settings>Applications>>Development and then connect it to your PC via USB cable. Then follow the instructions below to install Task Manager.
  1. Navigate to the folder where you downloaded TaskManager.apk file.
  2. Press Ctrl + Alt + Left Shift + Right Mouse Click and you will be presented with a context menu.
  3. Now, Select Open command window here option. Command prompt will load setting the current directory as root. 
  4. Once in command prompt window type these commands below one after another. (Make sure you device is connected via USB).
  5. adb push TaskManager.apk /system/app/TaskManager.apk
    adb shell
    chmod 644 /system/app/TaskManager.apk 
  6. That's all. You have successfully used adb push command to install Task Manager on your device. Now you may close the command prompt as well as disconnect your device from PC.
In case you are knew to ADB and are wondering to know what we did in step 4 then here's a short explanation to it.
  • First we use adb push command to push (or copy) TaskManager.apk app folder inside system directory. Since task manager is a system app we pushed it to /system/app directory.
  • Second we navigate to shell prompt. ADB shell lets you access the terminal of you device remotely and operate it with the help of various terminal (Linux) commands that are supported by android. Note that busybox adds support for many new commands that are not supported already. This is a reason why busybox is installed while rooting a device.
  • Task Manager For CM7
  • Thirdly, we ran a Linux command chmod which stands for change mode and is used to change files/folders permissions to set appropriate permission to the TaskManager app we pushed recently. Here we are setting read and write and no execution access for the owner and group, and read, no write & no execute for all other users and group with the help of 644 numerical permission. Without setting permission or setting wrong permission will lead to many error including force closes. Note that every system app should have 644 permission. To learn more about chmod command and it's attributes please visit this Wikipedia page.
Method 2
Alternatively, you can use Root Explorer or similar other app to install TaskManager on your device.
  • With the help of root explorer copy the TaskManager.apk file from above to system/app/ directory. [You may need to remount system as read/write using the R/W button at the top of the app before you can make changes to system files.]
  •  Now navigate to /system/app/ folder and long press on TaskManager.apk file to get a list of menu options. Select Permissions from the menu (you should see something like below --not exactly the same though.)
  • Then, Set appropriate permissions : Read-write for Owner and Read only for Group and Others. Or more specifically, set permission to rw-r-r. You can also use root explorer permission option to set the permission as shown below.
    Task Manager Permissions
  • Once set, you are done with it. Run, Task Manager app from App Drawer and give it a try. If you don't see the app or if it doesn't appear to work, reboot your device first.
That's all. Now you have got Task Manager on your Cyanogen Mod based rom and also filled your brain with some important and useful information regarding ADB and permissions. I hope you will enjoy managing your android processes & tasks. However, be aware that instead of prolonging battery life, using any kind of Task manager applications inappropriately, might lead to faster drainage of battery. So, it is suggested to use it at your own risk. However, don't hesitate to ask if you have any doubts regrading any of the topics mentioned above at the comments below.

UPDATE!!! 2012/05/02
I've got a much more easier way to install Task Manager on your android device running custom roms at this article. Now, you can simply flash file (download from the article mentioned above) in clockwork mod recovery and all is done. No need of any commands neither you'll have to worry about setting permissions. Simply flash the zip and you're done. Enjoy!