Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,811,290 Members 46,470 Now Online
XDA Developers Android and Mobile Development Forum

[24.02.2010] AutoClosePatch 1.1

Tip us?
 
Chainfire
Old
(Last edited by Chainfire; 2nd March 2010 at 11:01 AM.) Reason: I put in the thread title it was released 24 october 2010... doh
#1  
Chainfire's Avatar
Senior Moderator / Senior Recognized Developer - Where is my shirt? - OP
Thanks Meter 49,961
Posts: 9,089
Join Date: Oct 2007

 
DONATE TO ME
Default [24.02.2010] AutoClosePatch 1.1

As posted on my blog: http://www.chainfire.eu/articles/68/..._1_0_released/

Updated to 1.1 on 24 February 2010

AutoClosePatch
Some devices, especially the new 2009 Omnia series from Samsung do not have a lot of memory available. Some of these are also configured to use rather aggressive memory management. The result is that you can hardly start any amount of applications (3 or 4, usually) before the system starts to shut down already running applications, while half or more of the available physical memory is not being used at all.

What AutoClosePatch attempts to do is hook into these memory management functions and beat them into submission, preventing them from doing anything we have not explicitly told them to do.

Of course, we do have to have automatic application closing functionality so our devices do not get stuck in a low memory position, so occasionally we let the system do what it wants within specified parameters.

Note that this patch was specifically written and only tested on the Omnia II (I8000), but it should work on many WM 6.5 devices. This patch does not need any of the other changes mentioned in various MoDaCo threads and is compatible with TaskMon!

Also note that the system is not always very smart, and in my experience tends to close the last application I openened instead of the first.

Beta
Consider this a beta version (even though it is a 1.0 release). Several factors come into play and operation cannot be guaranteed. Works great for me, though!

I take no responsibility for issues that may occur, at all. If your dog explodes due to using AutoClosePatch, tough luck.

Settings
By default, my Omnia II starts closing apps when available memory drops below about 30mb, and doesn't stop closing apps until available memory has risen above about 45mb. As I start out with about 50mb of available memory this isn't very handy.

AutoClosePatch's default settings are to not start closing apps until available memory drops below 15mb, and to stop closing apps when available memory has risen to above 20mb.

The "Ultra" variant lowers this to 10/15, but has more chance of showing you an 'out-of-memory' dialog.

Installation
Install the AutoClosePatch CAB. If you want to play with the "Ultra" variant, install the normal version first!

Soft-reset after installation

Uninstallation
Simply uninstall the CAB files if you are not using the "Ultra" variant. Uninstalling will clear most settings but not some system settings. These changes aren't harmful, but you'll need to hard-reset to clear them up.

Soft-reset after uninstallation

Technical
Skip this part if you're not a techy

The whole thing is done through run-time patching, this means no files are modified on the device itself, only in-memory.

Some system calls are overridden / intercepted in shell32.exe, and depending on actual memory state WM_CLOSE may be re-cast as WM_HIBERNATE.

For the new 2009 Omnia series from Samsung TaskMon.dll is also patched, disabling it's application closing functionality. All other TaskMon functions should remain fully operational. In essence, only the standard WM application closing functionality should remain functional.

The low memory boundary (when apps start being closed) can be configured through the following registry key:

HKEY_CURRENT_USER\Software\Chainfire\AutoClosePatc h\CloseStartMB

The high memory boundary (when apps stop being closed) can be configured through the following reigstry key:

HKEY_CURRENT_USER\Software\Chainfire\AutoClosePatc h\CloseStopMB

You must soft-reset after changing these keys for them to take effect.

Also note that if you are going below the default 15/20 value you must install the "Ultra" settings first.

Furthermore, if you are playing with very low settings (and are thus using the "Ultra" settings) make sure to NOT set the CloseStopMB value above 20!

Downloads
REDISTRIBUTION AND COOKING INTO ROMS IS EXPLICITLY FORBIDDEN (for the time being)

AutoClosePatch v1.1

AutoClosePatch v1.1 Ultra (Settings only)

Donate
Donations can be made through PayPal

Changelog
1.1 Adjusted closing behavior so it closes less programs
1.1 Slightly adjusted default settings

1.0 Initial release
BLOG - G+(Chainfire) - G+(Personal) - TWITTER - IRC - PAYPAL - BTC 1JeoxivKEXbbiegsv1BrUC7fD7GgSPcqkG

A proper quote includes only the relevant paragraphs, and a proper post never ends with the word "why"

 

Android
HTC G1, Hero, One
LG G Pad 8.3, G Watch, G3
Moto E
Samsung i5800, i9000*2, P1000*2, P7100, i9100*2, N7000, P6800, i9300, N7100, i9505, N9005, G900F
Sony T LT30p, Z C6603
Nexus Galaxy*2, N7*2, N10, N7-2013, N7-2013-3G, N5

SuperSU, Mobile ODIN, TriangleAway, DSLR Controller, CF-Root, 500 Firepaper, OpenDelta, USB Host Diagnostics, ExynosAbuseAPK, Live dmesg+logcat, NoMoarPowah!, CF-Bench, Chainfire3D, CF.lumen, SGS2 SIM Unlocker, GingerBreakAPK, SuperPower, and more!

Windows Mobile 5/6
E-Mobile EM-ONE
HTC Wizard*2, Kaiser, Touch, Diamond, Pro, HD*2, Diamond 2, Pro 2*2, HD2*2
Samsung i780, i900*2, i8000*2, b7300, b7320, b7330, b7620*2, b6520

WMWifiRouter, KaiserTweak, FPUEnabler, WMLongLife, WMRegOptimizer, CFC+GUI, TF3D+v2 ports, Kaiser+Omnia2+Snapdragon 3D drivers, GfxBoost, and more!

Windows Phone 7
LG GW910

iOS
Apple iPad 3, iPad Mini 2


NOTICE: I do not respond to tech support questions through PM.
 
holyseal
Old
#2  
Junior Member
Thanks Meter 1
Posts: 4
Join Date: Mar 2009
looks pretty cool
my omnia should arrive sometime next week, will definitely use this.
thanks !
 
khomen
Old
#3  
khomen's Avatar
Member
Thanks Meter 1
Posts: 58
Join Date: Jan 2010
does not really work for me, whenever i get to 10mb of free ram, all applications get closed ...
 
Chainfire
Old
#4  
Chainfire's Avatar
Senior Moderator / Senior Recognized Developer - Where is my shirt? - OP
Thanks Meter 49,961
Posts: 9,089
Join Date: Oct 2007

 
DONATE TO ME
khomen that should be fixed in 1.1
BLOG - G+(Chainfire) - G+(Personal) - TWITTER - IRC - PAYPAL - BTC 1JeoxivKEXbbiegsv1BrUC7fD7GgSPcqkG

A proper quote includes only the relevant paragraphs, and a proper post never ends with the word "why"

 

Android
HTC G1, Hero, One
LG G Pad 8.3, G Watch, G3
Moto E
Samsung i5800, i9000*2, P1000*2, P7100, i9100*2, N7000, P6800, i9300, N7100, i9505, N9005, G900F
Sony T LT30p, Z C6603
Nexus Galaxy*2, N7*2, N10, N7-2013, N7-2013-3G, N5

SuperSU, Mobile ODIN, TriangleAway, DSLR Controller, CF-Root, 500 Firepaper, OpenDelta, USB Host Diagnostics, ExynosAbuseAPK, Live dmesg+logcat, NoMoarPowah!, CF-Bench, Chainfire3D, CF.lumen, SGS2 SIM Unlocker, GingerBreakAPK, SuperPower, and more!

Windows Mobile 5/6
E-Mobile EM-ONE
HTC Wizard*2, Kaiser, Touch, Diamond, Pro, HD*2, Diamond 2, Pro 2*2, HD2*2
Samsung i780, i900*2, i8000*2, b7300, b7320, b7330, b7620*2, b6520

WMWifiRouter, KaiserTweak, FPUEnabler, WMLongLife, WMRegOptimizer, CFC+GUI, TF3D+v2 ports, Kaiser+Omnia2+Snapdragon 3D drivers, GfxBoost, and more!

Windows Phone 7
LG GW910

iOS
Apple iPad 3, iPad Mini 2


NOTICE: I do not respond to tech support questions through PM.
 
fire_z
Old
#5  
Senior Member
Thanks Meter 3
Posts: 133
Join Date: Jul 2007
Location: Manila
Works with Omnia B7610 but with a bug

When memory reaches 24mb down (in my case 24-18mb) you cannot open anymore applications/programs,and those that were opened (16 apps opened with 24mb left) even the task manager cannot be opened, so soft reset is needed to close all... Though system apps (those in the settings) still open and run.
 
jakaka
Old
(Last edited by jakaka; 24th February 2010 at 05:17 PM.)
#6  
Member
Thanks Meter 11
Posts: 66
Join Date: Apr 2008
Thank you my good man 08C54399RW746270M Here you have little something for beer
 
Chainfire
Old
#7  
Chainfire's Avatar
Senior Moderator / Senior Recognized Developer - Where is my shirt? - OP
Thanks Meter 49,961
Posts: 9,089
Join Date: Oct 2007

 
DONATE TO ME
Quote:
Originally Posted by fire_z View Post
Works with Omnia B7610 but with a bug

When memory reaches 24mb down (in my case 24-18mb) you cannot open anymore applications/programs,and those that were opened (16 apps opened with 24mb left) even the task manager cannot be opened, so soft reset is needed to close all... Though system apps (those in the settings) still open and run.
Did this happen with 1.0 or 1.1 ?

Please try agian with 1.1 and make sure to soft-reset after installation !
BLOG - G+(Chainfire) - G+(Personal) - TWITTER - IRC - PAYPAL - BTC 1JeoxivKEXbbiegsv1BrUC7fD7GgSPcqkG

A proper quote includes only the relevant paragraphs, and a proper post never ends with the word "why"

 

Android
HTC G1, Hero, One
LG G Pad 8.3, G Watch, G3
Moto E
Samsung i5800, i9000*2, P1000*2, P7100, i9100*2, N7000, P6800, i9300, N7100, i9505, N9005, G900F
Sony T LT30p, Z C6603
Nexus Galaxy*2, N7*2, N10, N7-2013, N7-2013-3G, N5

SuperSU, Mobile ODIN, TriangleAway, DSLR Controller, CF-Root, 500 Firepaper, OpenDelta, USB Host Diagnostics, ExynosAbuseAPK, Live dmesg+logcat, NoMoarPowah!, CF-Bench, Chainfire3D, CF.lumen, SGS2 SIM Unlocker, GingerBreakAPK, SuperPower, and more!

Windows Mobile 5/6
E-Mobile EM-ONE
HTC Wizard*2, Kaiser, Touch, Diamond, Pro, HD*2, Diamond 2, Pro 2*2, HD2*2
Samsung i780, i900*2, i8000*2, b7300, b7320, b7330, b7620*2, b6520

WMWifiRouter, KaiserTweak, FPUEnabler, WMLongLife, WMRegOptimizer, CFC+GUI, TF3D+v2 ports, Kaiser+Omnia2+Snapdragon 3D drivers, GfxBoost, and more!

Windows Phone 7
LG GW910

iOS
Apple iPad 3, iPad Mini 2


NOTICE: I do not respond to tech support questions through PM.
 
sudkcoce
Old
#8  
sudkcoce's Avatar
Senior Member
Thanks Meter 197
Posts: 763
Join Date: Sep 2009
Default Thank you!

Works great on my omnia i900!
Just what I needed!

Best regards!
 
junalmeida
Old
#9  
junalmeida's Avatar
Recognized Developer
Thanks Meter 19
Posts: 192
Join Date: Nov 2007
Location: Rio de Janeiro
Hi Chainfire,

Donation sent to keep your research on.
Thanks very much.
Marcos Almeida Jr.
Current contributions: MySquare | AutoRotate Config

http://about.me/junalmeida
 
jefferysung39
Old
#10  
Junior Member
Thanks Meter 0
Posts: 4
Join Date: Mar 2010
Thank you so much.

I found this thread from WinMo and is now going to give it a try.

Thanks again for your work!

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Stream Your Media Files with the New Version of Droid Sync Manager

Android is a Linux-based operating system, but this fact doesn’t put … more

Old but Gold Internet Browser is a Blast from the Past

A Web browser is one of these applications that we can’t live without. We useit … more

Real-World Battery Saving Tips for Android – XDA Developer TV

You need Real-World Battery Saving Tips for your Android device. Our … more

Android L Will Have Data Encryption Turned On by Default

Android L, once it is eventually released, will featuredata encryption turned on by … more