Hi everyone!
kanpurite made a great job giving us the easy way to locking apps in memory in this thread.
But, as i told in http://forum.xda-developers.com/showpost.php?p=31627356&postcount=23 there is other, a little bit harder, but still it can be done.
Requirements:
A Pc (this guide is made over Windows, but may work on linux as well)
notepad++
baksmali/smali tools (attached at this thread)
root explorer (or any file explorer with root capabilities)
Here is a step by step guide to do it:
1. Extract baksmali tools to a new folder
2. Extract services.jar from your phone (at /system/framework) and copy to your baksmali folder
3. Run baksmali manager.bat
4. select option 4 (select file to work), then select services.jar
5. select option 1 (baksmali) and wait (CAUTION: DON'T CLOSE THE BAKSMALI MANAGER WINDOW)
6. Go to your baksmali folder, there must be a new folder named "services"
7. enter to services folder and go to this sub-folder
8. open ActivityManagerService.smali with notepad++
9. search for ".line 13892" and add the following after "if-lez v10, :cond_2af":
(NOTE: You can change to any app you want, just give the proper name of the app process....)
10. add the following:
11. change the subsequent numbers of ".line" (including the old .line 13895) like this:
12. Save the file.
13. Go to the baksmali manager window and select option 2 (smali) and wait, it will create a classes.dex file on your baksmali folder
14. Open up services.jar with 7zip or WinRAR and drag the newly created classes.dex into the window to refresh services.jar with the new
classes.dex
15. Copy the new services.jar file to your sdcard and from there, copy to /system/framework (use root explorer, mount read/write and copy the
file).
16. set proper permissions: set 644 permissions ((rw-r--r--) or (tick Read: owner, group, others / Write: owner)
17. Restart, make a wipe dalvik and cache and
18. Enjoy!
kanpurite made a great job giving us the easy way to locking apps in memory in this thread.
But, as i told in http://forum.xda-developers.com/showpost.php?p=31627356&postcount=23 there is other, a little bit harder, but still it can be done.
Requirements:
A Pc (this guide is made over Windows, but may work on linux as well)
notepad++
baksmali/smali tools (attached at this thread)
root explorer (or any file explorer with root capabilities)
Here is a step by step guide to do it:
1. Extract baksmali tools to a new folder
2. Extract services.jar from your phone (at /system/framework) and copy to your baksmali folder
3. Run baksmali manager.bat
4. select option 4 (select file to work), then select services.jar
5. select option 1 (baksmali) and wait (CAUTION: DON'T CLOSE THE BAKSMALI MANAGER WINDOW)
6. Go to your baksmali folder, there must be a new folder named "services"
7. enter to services folder and go to this sub-folder
Code:
\com\android\server\am
9. search for ".line 13892" and add the following after "if-lez v10, :cond_2af":
Code:
iget-object v2, v0, Lcom/android/server/am/ProcessRecord;->processName:Ljava/lang/String;
const-string v5, "com.android.contacts"
invoke-virtual {v2, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-nez v2, :cond_2b4
move-object/from16 v0, p1
iget-object v2, v0, Lcom/android/server/am/ProcessRecord;->processName:Ljava/lang/String;
const-string v5, "com.android.mms"
invoke-virtual {v2, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_2bf
.line 13894
:cond_2b4
const/4 v11, 0x0
10. add the following:
Code:
.line 13895
.end local v11 #adj:I
.end local v34 #schedGroup:I
:cond_2bf
Code:
.line 13896
move/from16 v11, p2
.line 13897
.restart local v11 #adj:I
const/16 v34, 0x0
.line 13898
.restart local v34 #schedGroup:I
const/4 v2, 0x1
move-object/from16 v0, p1
iput-boolean v2, v0, Lcom/android/server/am/ProcessRecord;->hidden:Z
.line 13899
const-string v2, "bg-activities"
move-object/from16 v0, p1
iput-object v2, v0, Lcom/android/server/am/ProcessRecord;->adjType:Ljava/lang/String;
goto/16 :goto_f1
13. Go to the baksmali manager window and select option 2 (smali) and wait, it will create a classes.dex file on your baksmali folder
14. Open up services.jar with 7zip or WinRAR and drag the newly created classes.dex into the window to refresh services.jar with the new
classes.dex
15. Copy the new services.jar file to your sdcard and from there, copy to /system/framework (use root explorer, mount read/write and copy the
file).
16. set proper permissions: set 644 permissions ((rw-r--r--) or (tick Read: owner, group, others / Write: owner)
17. Restart, make a wipe dalvik and cache and
18. Enjoy!
Attachments
-
1.2 MB Views: 296
Last edited: