[How to] Keep an App Running in Background Memory on Android
BY LAZY SMURF
Multitasking is an important part of the Android OS. Android OS helps in better multitasking by keeping some apps running in background. When the number of background apps increases, some apps are killed by the OS. When this happens, some apps which the user wants to run in the background might get killed.
There is a way out of this. The Android user can lock the apps in the memory to prevent it from being killed by the OS. This involves creating a new local.prop file in the /data directory and then just entering a few lines to edit this file.
Follow the instructions given below to lock the app in memory.
Requirements :
Android device must be rooted
File manager installed on the Android (for e.g Root Explorer)
Steps :
Download the Root Explorer apk file from the link and install it on the device.
Open Root Explorer and provide the root permissions.
Now tap on “Mount R/W” which can be seen on top of the screen.
Scroll down and open the “data” directory.
Once in the /data directory, press menu key and select “New File”.
Enter the name of the file as local.prop.
local.prop
Now long press on local.prop and select the “Open With” option.
Now select text editor.
The app’s process name should be known to the user. For e.g. if the user wants to lock the Contacts app in memory, type “sys.keep_app_1=com.android.contacts”. “com.android.contacts” is the process of the Contacts app.
Similarly other apps can be locked in the memory in the following manner.
lock app
Now press menu key and select Save and exit.
Now system will show a message saying ‘Old local.prop backed up as local.prop.bak’. And you are done.. Reboot and enjoy.
Note : This method will not work on all ROMs. However, it is risk free. So the user can give it a try.