Post Reply

[MOD]{Test 14} Sense 4+ MultiTasking Breakthrough!Non-Sense App Limit! TRY & KILL IT!

OP zeppelinrox

23rd September 2012, 03:39 AM   |  #1  
zeppelinrox's Avatar
OP Senior Member
Flag IN THE FREAKIN' OP
Thanks Meter: 21,296
 
9,312 posts
Join Date:Joined: Dec 2010
Donate to Me
More
================================================== ==
If this is helpful, please Rate the thread 5 Stars and click Thanks!
================================================== ==

It's been awhile since I've made a new thread but I thought that I should make one here...
Since this is where I figured out how to get proper multitasking to work on newer Sense ROMS.
And I'd like to refine it some more

================================================== ========

It all started weeks ago when I first released my -=Maximum Overdrive=- Multitasking Mod.
It fixes Multitasking on ALL ROMS from Froyo to Jelly Bean (except for those with Sense 4 and up lol)
How? To put it simply, I bumped the MAX_HIDDEN_APPS value from 15 to 70

And now, you can now patch your Sense services.jar yourself!

Do it with the Ultimate Jar Power Tools Patcher script HERE!
It's available as a Windows exe HERE! but does not yet have the Non-Sense App Limit (soon)

A great addition to this mod is the Unlimited Recent Apps Panels mod by steal25.
I tried and failed to do it - but at least I was able to help him break the 16 panel barrier to make it Unlimited

================================================== ========

The plan is to have Sense's app limit bumped from 8 visible apps to 50 apps.

Don't worry about if you can't run that many apps at once - the lowmemorykiller will kick in according to your minfrees...
Just crank them up if you need more free ram... lower them for more multitasking

I'd suggest using V6 SuperCharger in conjunction with the mod in order to tweak the minfrees, but more importantly, take advantage of its OOM grouping fixes
The OOM grouping fixes will help ensure that the higher, supercharged ADJs won't result in an overly-aggressive lowmemorykiller.

So if you're enjoying multitasking improvement without using V6 SuperCharger's grouping fix - it's even better with SuperCharger!
Get it HERE

================================================== ========

A few ROMS already have this implemented but for those that don't, give it a spin!

Included Mods:

SuperCharged with Die-Hard Launcher
Maximum Multitasking Mods ie. -=Maximum Overdrive=- and Time Killer Killer
Non-Sense App Limit!

Installation:

1. Optional But Highly Recommended: Install my latest V6 SuperCharger script. See above as to why
2. Download your modded services-sense*.jar and rename it as services.jar
3. In terminal type: su, enter. Leave terminal running.
4. Copy the new services.jar into your /system/framework folder.
5. Go back to terminal and type: cd /system/framework, enter, chown 0.0 services.jar, enter, chmod 644 services.jar, enter.
6. Reboot. This will take awhile since it will optimize apps the first time.

================================================== ========

About Battery Life: If you think battery is draining quicker, give it a couple of days before assuming the worst.
I'd guess that battery life should get better since the device won't have to restart apps as much as before.

================================================== ========

So this is the progression for those that don't know what's up so far...

Test 1 - Found the additional Sense app limit... but FAILS to boot... lol
Test 1B - Boots! But doesn't work as good as hoped.
Test 2 - Ok now we're getting somewhere... messing with HTC_RECENT_APP_FUSION seems to be the key...
Test 3 - Fine tune a bit...
Test 4 - More refinements...
Test 5 - Totally disable MAX_VISIBLE_TASKS? Tweaked SuperCharger (more complete)
Test 6 - Tweaked "Trimming Apps" routine to take into account the larger max hidden apps value.
Test 7 - HIGHLY EXPERIMENTAL - Changed HIDDEN_APP_MIN_ADJ (priority) to be the same as SERVICE_ADJ - Why? Well... it may prevent recently ran apps like facebook or your browser from reloading since MaxOD is succesfully allowing 70 hidden apps to stay in memory.
Test 8 - Did away with last change - HIDDEN_APP_MIN_ADJ is back to stock ADJ 9
.......... - "Hidden Protector" added - less important Empty Apps can kick out more important hidden apps from memory. By default, Android will keep at least 2 hidden apps in memory before this happens. I bumped it up to 15
.......... - I also prevent Server apps (apps you just left with ADJ 6 priority) from becoming a "worstType" ie. likely to be killed. This doesn't happen in pre-ICS roms so hey... it's worth a shot, eh?
Test 9 - HIGHLY EXPERIMENTAL - Going with the idea of making Service apps the same as Hidden Apps (since I can greatly control hidden apps) I raised the service app ADJ to be the same as hidden.
.......... - Re-enable HTC_RECENT_APP_FUSION since I'm now able to raise the visible app and recent app limits without touching it. This also means I don't have to mess with TaskRecord.smali or ActivityStack.smali.
Test 10 - Updating Ultimatic Tools code so here's a test run. Service Apps back to the usual ADJ as a test to see if previous test (with service adj the same as hidden apps) is better or not
Test 11 - Sense 4+! Not too much different appart from a big ass song and dance in ProcessList.smali to determine Max Hidden Apps based on ram.
By default I see that if you have 512 mb of ram, it's 10 apps, if you have 2gb of ram it's only 20 apps. Otherwise, it's the usual 15.
But it's 70 apps across the board in these jars lol
Test 12 - Sense 4+ - BIG TEST! After some deep analysis, I've made some important changes that should make memory management smoother. Lots of fixed up if/else conditions (which weren't making sense after changing ADJs) but also took out a few edits that actually hampered memory management to an extent.
Test 13 - Further refinements over Test 12. This is REALLY good... Also removed signature check so it better NOT bootloop (Thanks il Duce for the heads up)
Test 14 - Forced the low minfrees in ProcessList.smali so that the lowmemorykiller will treat ram like it's on a low memory device which means much less app killing overall.
Test 15 - Added: Hard-Coded minfrees - to ProcessList.smali. Without any minfree tweaks, the lowmemorykiller minfrees are 10, 14, 100, 110, 120, 130
............. - Added: Hard-Coded OOM Grouping Fix (adj grouping) - to ProcessList.smali. Without any adj grouping tweaks, the values are SuperChargers - 0, 3, 6, 10, 12, 15 (default is 0, 1, 2, 4, 7, 15)
............. - Added: Idle Offset Control Valve (see code below) - to ProcessList.smali and ActivityManagerService.smali
Code:
    // We put empty content processes   after any hidden processes that have
    // been idle for less than 15 seconds.
    static final long CONTENT_APP_IDLE_OFFSET = 15*1000;

    // We put empty content processes after any hidden processes that have
    // been idle for less than 120 seconds.
    static final long EMPTY_APP_IDLE_OFFSET = 120*1000;
I made:
CONTENT_APP_IDLE_OFFSET = 65 seconds (instead of 15 seconds)
EMPTY_APP_IDLE_OFFSET = 305 seconds (instead of 120 seconds)

So now, if there were apps that normally get killed which you BulletProof (with V6 SuperCharger), you can probably now lessen the BulletProof frequency (it's an option now lol).
Say make it 60 seconds instead of 30 seconds.
I know some apps normally need it as low as 14 seconds to never get killed - which is why I figure it's related to content app idle offset default of 15 seconds.

================================================== ==========

What's hacked:

ActivityManagerService.smali
SuperCharging
Time Killer Killer - MAX_SERVICE_INACTIVITY boosted from 30 minutes to 24hrs
Non-Sense App Limit
..... - MAX_RECENT_TASKS boosted from 20 to 50
..... - MAX_VISIBLE_TASKS boosted from 8 to 50
..... - Rendered HTC_RECENT_APP_FUSION a non-factor - it prevented the application of boosted values

ProcessList.smali
SuperCharging
Maximum Overdrive - MAX_HIDDEN_APPS boosted from 15 to 70

================================================== ========

How do I know if it worked?

Mod 1.
Run the latest V6 SuperCharger script and it will tell you if your launcher is SuperCharged!

Mods 2 and 3. Install System Tuner and put the widget on the desktop.
Make note of how many apps the widget shows running after running a whole bunch of apps.
It would look like ##/##

So feel free to post before and after screen shots!

================================================== ========

Another Test for Maximum Overdrive - Install aLogcat, before and after the mod, run as many apps as you can, run aLogcat and search for longer.

Example Before and After....



Notice how there is very little killing activity after the mod?
But more importantly, notice that before the mod, app #16 gets killed. After the mod, app #71 gets killed.
Because max hidden apps went from 15 to 70
Note that you will likely see a blank screen after the mod, that means you never hit the app limit so nothing got killed

================================================== ========

Feedback will be appreciated

For assistance, testing and support, thanks to:
il Duce, jeffsanace, steal25, bog3nator, fernando sor, mrlakadaddy, SteelH

Click THANKS, it tickles
Last edited by zeppelinrox; 26th May 2013 at 04:36 PM.
The Following 83 Users Say Thank You to zeppelinrox For This Useful Post: [ View ]
23rd September 2012, 04:21 AM   |  #2  
Senior Member
Flag Lubbock
Thanks Meter: 375
 
1,807 posts
Join Date:Joined: Dec 2008
More
Quote:
Originally Posted by zeppelinrox

It's been awhile since I've made a new thread but I thought that I should make one here...
Since this is where I figured out how to get proper multitasking to work on newer Sense ROMS.
And I'd like to refine it some more

The plan is to have the app limit bumped from 8 apps to 50 apps.

Don't worry about if you can't run that many apps at once - the lowmemorykiller will kick in according to your minfrees...
Just crank them up if you need more free ram... lower them for more multitasking

I'd suggest using V6 SuperCharger in conjunction with the mod in order to tweak the minfrees, but more importantly, take advantage of its OOM grouping fixes
The OOM grouping fixes will help ensure that the higher, supercharged ADJs won't result in an overly-aggressive lowmemorykiller.

So if you're enjoying multitasking improvement without using V6 SuperCharger's grouping fix - it's even better with SuperCharger!

================================================== ========

So this is the progression for those that don't know what's up so far...

Test 1 - Found the additional Sense app limit... but FAILS to boot... lol
Test 1B - Boots! But doesn't work as good as hoped.
Test 2 - Ok now we're getting somewhere... messing with HTC_RECENT_APP_FUSION seems to be the key...
Test 3 - Fine tune a bit...
Test 4 - More refinements...

================================================== ========

As of now... Test 4, the latest, is working great as far as I know
I'm re-attaching here for convenience.

There are more tests that I'd like to try so I'll attach the latest tests to this OP as well.

Feedback will be appreciated.

================================================== ========

A few ROMS already have this implemented but for those that don't, give it a whirl!

What's inside:

SuperCharged with Die-Hard Launcher
Maximum Multitasking Mods ie. -=Maximum Overdrive=- and Time Killer Killer
Non-Sense App Limit!

To install:

1. Rename your downloaded jar as services.jar
2. Copy the new services.jar into your /system/framework folder.
3. In terminal type: su, enter, cd /system/framework, enter, chown 0.0 services.jar, enter, chmod 644 services.jar, enter.
4. Reboot. This will take awhile since it will optimize apps the first time.To install...

================================================== ========

About Battery Life: If you think battery is draining quicker, give it a couple of days before assuming the worst.
I'd guess that battery life should get better since the device won't have to restart apps as much as before.

For assistance, testing and support, thanks to:
il Duce, jeffsanace, bog3nator, fernando sor, mrlakadaddy, SteelH

Click THANKS, it tickles

woot! welcome! officially!

edit: i can say this for the first time ever! FIRST!
Last edited by bog3nator; 23rd September 2012 at 05:05 AM.
The Following 6 Users Say Thank You to bog3nator For This Useful Post: [ View ]
23rd September 2012, 04:39 AM   |  #3  
Senior Member
Flag Orange County, CA
Thanks Meter: 192
 
750 posts
Join Date:Joined: Feb 2006
More
Thx...subscribing
23rd September 2012, 05:01 AM   |  #4  
jsonger121's Avatar
Senior Member
Flag W.Va.
Thanks Meter: 62
 
195 posts
Join Date:Joined: Jan 2012
More
looks to me that you sir have some serious skills in ur bag. you should make some sick ass serious ROM and just take the hole dag on thread over lol....great work man!
The Following User Says Thank You to jsonger121 For This Useful Post: [ View ]
23rd September 2012, 05:04 AM   |  #5  
Senior Member
Flag Lubbock
Thanks Meter: 375
 
1,807 posts
Join Date:Joined: Dec 2008
More
meanrom has the oom settings at like 10, (some numbers) 40 lol, what settings do you suggest?
23rd September 2012, 05:25 AM   |  #6  
zeppelinrox's Avatar
OP Senior Member
Flag IN THE FREAKIN' OP
Thanks Meter: 21,296
 
9,312 posts
Join Date:Joined: Dec 2010
Donate to Me
More
Quote:
Originally Posted by bog3nator

woot! welcome! officially!

edit: i can say this for the first time ever! FIRST!

Thanks man
And thanks again for all the testing you've done so far
Quote:
Originally Posted by jsonger121

looks to me that you sir have some serious skills in ur bag. you should make some sick ass serious ROM and just take the hole dag on thread over lol....great work man!

heh thanks.
I've never made a ROM.
It would probably be easier to hook up with a team and call it Super Multitasking Overdrive Kick Ass Ignition Nitro Goo.

Or SMOKING ROM for short lol
Quote:
Originally Posted by bog3nator

meanrom has the oom settings at like 10, (some numbers) 40 lol, what settings do you suggest?

What does SuperCharger suggest?
The Following 3 Users Say Thank You to zeppelinrox For This Useful Post: [ View ]
23rd September 2012, 05:52 AM   |  #7  
EPayne123's Avatar
Senior Member
Flag Fort Myers
Thanks Meter: 160
 
695 posts
Join Date:Joined: Jan 2010
More
V6 Suggest slot 3 to be at 180MB of free RAM.

Sent from my EVO
23rd September 2012, 06:03 AM   |  #8  
zeppelinrox's Avatar
OP Senior Member
Flag IN THE FREAKIN' OP
Thanks Meter: 21,296
 
9,312 posts
Join Date:Joined: Dec 2010
Donate to Me
More
I forgot bog3nator posted his boom stick output in the other thread
Code:
You have 770 MB of RAM on your device...
         ...1000 HP settings are recommended!

          -=SuperMinFree Calculator=- says:

   Cust-OOMize with 8, 16, 154, 169, 184, 200 MB!
Not sure why it would say 180mb for you when it says 154 for bog?
Anyway, it's safe to play with settings to find ones that work for your use.
If setting 8 is too high, maybe try 7.
The Following User Says Thank You to zeppelinrox For This Useful Post: [ View ]
23rd September 2012, 06:08 AM   |  #9  
EPayne123's Avatar
Senior Member
Flag Fort Myers
Thanks Meter: 160
 
695 posts
Join Date:Joined: Jan 2010
More
Sorry, those look like the settings I had gotten. Must be wrong, disregard. My apologies.

Sent from my EVO

---------- Post added at 06:08 AM ---------- Previous post was at 06:07 AM ----------

I would say that anything lower than 6-7 may be cutting it too low for AOSP on our device BUT like u said, it all depends on the end user.

Sent from my EVO
23rd September 2012, 02:47 PM   |  #10  
Senior Member
Thanks Meter: 900
 
3,605 posts
Join Date:Joined: Jan 2010
More
One question does this work on odex and stock rooted roms

Sent from my EVO using xda premium

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes