5,595,918 Members 31,389 Now Online
XDA Developers Android and Mobile Development Forum

Disable Fast Dormancy to prevent com.android.phone wakeups

Tip us?
 
jonasl
Old
(Last edited by jonasl; 30th November 2012 at 01:28 AM.)
#1  
Senior Member - OP
Thanks Meter 168
Posts: 379
Join Date: Nov 2009
Location: San Francisco, CA
Default Disable Fast Dormancy to prevent com.android.phone wakeups

Like many others I was seeing many wakeups by com.android.phone, and as noted by others this is because of fast dormancy. Or rather, because of LG's implementation of it.

I'm not gonna go into too much detail, but the offending implementation can be found in com/android/internal/telephony/LgeFDHandlerInterfaceImpl . This class is in /system/framework/com.lge.core.jar . After data activity on HSPA networks they use AlarmManager to periodically wake up and check the number of bytes transmitted over the network interface. This goes on until some time after it stops changing, and the connection is considered dormant.

This periodic checking is what's waking the device, and for every new byte transferred the wakeup/polling period is extended and device doesn't sleep. The chattier apps are, the more awake time you'll get.

Enough of the boring details, here's how I disabled it and got rid of the com.android.phone wakeups. Root required.

Code:
$ adb shell
# su
# sqlite3 /data/data/com.android.providers.telephony/databases/telephony.db
update dcm_settings set fastdormancy="0" where numeric="310410";
.quit
# reboot
This helped me, hope it does the same for you.

Edit 2:
I've written a quick and dirty app that tries to handle this setting without need for terminals or root. Try it and report issues here: http://forum.xda-developers.com/show....php?t=2021248

Edit 1:
In essence you need to change a value in a sqlite database and there are many ways to do it. There are apps, use adb shell etc. Whatever works for you. If someone wants to write an app that makes this easier, be my guest

Reversal is restoring the original value "1,0,0,1000,5000,60000,3000,5000,1,8" and reboot:
Code:
update dcm_settings set fastdormancy="1,0,0,1000,5000,60000,3000,5000,1,8" where numeric="310410";
This database is not there after a wipe, so future ROM chefs wanting to include it by default should edit /etc/dcm_settings.xml as this is where the initial database contents come from. Just replace the original value with "0" for ATT.

Code:
<profile>
	<siminfo
		operator="ATT"
		country="US"
		mcc="310"
		mnc="410"
		extraid=""
	/>
	<settings
		fastdormancy_param="1,0,0,1000,5000,60000,3000,5000,1,8"
		ipmtu="1410"
	/>
</profile>
The Following 40 Users Say Thank You to jonasl For This Useful Post: [ Click to Expand ]
 
n1mr0d
Old
#2  
Member
Thanks Meter 11
Posts: 66
Join Date: Apr 2011
Holy Hell!!!

so far so good...it's a shame I can only thank so much!!!
 
d08speed3
Old
#3  
d08speed3's Avatar
Senior Member
Thanks Meter 172
Posts: 1,412
Join Date: Jul 2010
Quote:
Originally Posted by jonasl View Post
Like many others I was seeing many wakeups by com.android.phone, and as noted by others this is because of fast dormancy. Or rather, because of LG's implementation of it.

I'm not gonna go into too much detail, but the offending implementation can be found in com/android/internal/telephony/LgeFDHandlerInterfaceImpl . This class is in /system/framework/com.lge.core.jar . After data activity on HSPA networks they use AlarmManager to periodically wake up and check the number of bytes transmitted over the network interface. This goes on until some time after it stops changing, and the connection is considered dormant.

This periodic checking is what's waking the device, and for every new byte transferred the wakeup/polling period is extended and device doesn't sleep. The chattier apps are, the more awake time you'll get.

Enough of the boring details, here's how I disabled it and got rid of the com.android.phone wakeups. Root required.

Code:
$ adb shell
# su
# sqlite3 /data/data/com.android.providers.telephony/databases/telephony.db
update dcm_settings set fastdormancy="0" where numeric="310410";
.quit
# reboot
This helped me, hope it does the same for you.
I use Comand prompt and copy these codes?
His: Droid DNA
Hers: AT&T LG Optimus G
 
faisalsiddiqui
Old
(Last edited by faisalsiddiqui; 28th November 2012 at 09:56 PM.)
#4  
Member
Thanks Meter 3
Posts: 77
Join Date: Jan 2008
Thanks a lot for this, can you please explain how to use this code, i am rooted and am trying to run this on my computer with adb and i get a message sqlite3 not found
 
Murasakiii
Old
#5  
Murasakiii's Avatar
Senior Member
Thanks Meter 170
Posts: 554
Join Date: Feb 2011
Location: Portland
I plugged my phone in as charge only and ran this code using cmd.
After the end of each line simply press enter and it prompts for the next.
When you prompt for reboot, it takes a couple of seconds, for those who get confused when their phone sits there.
Anyway, the code seems to work for me, looking forward to results.
Hope this helped.
 
pfoxdizzle
Old
#6  
Senior Member
Thanks Meter 45
Posts: 305
Join Date: Mar 2011
Location: Auburn

 
DONATE TO ME
Im getting a no sqlite3 found error as well
 
faisalsiddiqui
Old
#7  
Member
Thanks Meter 3
Posts: 77
Join Date: Jan 2008
Quote:
Originally Posted by pfoxdizzle View Post
Im getting a no sqlite3 found error as well
I just used sqlite editor from the market and edited the value to "0". I can confirm that this process works, i have been struggling with this wakelock for 2 weeks now and have tried so many things but this is the only thing that has worked. Kudos to the OP!!
 
Murasakiii
Old
#8  
Murasakiii's Avatar
Senior Member
Thanks Meter 170
Posts: 554
Join Date: Feb 2011
Location: Portland
Are you both rooted and have unlocked bootloader? Not sure why you're getting errors. Did any of you retry this process via computer cmd with USB debugging?

Sent from my LG-E970 using xda app-developers app
Current:
LG Optimus G E970
Mahdi 4.4.2 + FrancoMOD

Retired:
HTC Inspire4g
ViperDHD ROM (Inspire Fix)
The Following User Says Thank You to Murasakiii For This Useful Post: [ Click to Expand ]
 
pfoxdizzle
Old
#9  
Senior Member
Thanks Meter 45
Posts: 305
Join Date: Mar 2011
Location: Auburn

 
DONATE TO ME
rooted yes. Unlocked no.
 
Murasakiii
Old
#10  
Murasakiii's Avatar
Senior Member
Thanks Meter 170
Posts: 554
Join Date: Feb 2011
Location: Portland
Unlock. It literally takes no time.

Sent from my LG-E970 using xda app-developers app
Current:
LG Optimus G E970
Mahdi 4.4.2 + FrancoMOD

Retired:
HTC Inspire4g
ViperDHD ROM (Inspire Fix)

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes