Disable Fast Dormancy to prevent com.android.phone wakeups

Search This thread

jonasl

Senior Member
Nov 13, 2009
380
171
San Francisco, CA
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://xdaforums.com/showthread.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>
 
Last edited:

d08speed3

Senior Member
Jul 23, 2010
2,723
522
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?
 

faisalsiddiqui

Senior Member
Jan 3, 2008
220
11
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
 
Last edited:

Murasakiii

Senior Member
Feb 23, 2011
753
211
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.
 

faisalsiddiqui

Senior Member
Jan 3, 2008
220
11
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!!:fingers-crossed:
 

Murasakiii

Senior Member
Feb 23, 2011
753
211
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
 
  • Like
Reactions: Mramos860

Murasakiii

Senior Member
Feb 23, 2011
753
211
Portland
Warranty is kinda meh unless you're prone to breaking your phone. But everyone does things their own way.
Are you sure that you have sqlite3 on your phone and/or are you typing the code correctly in cmd? Via computer is the easiest way.
 

gowings23

Member
Jun 9, 2010
49
6
Ok, I have my LGOG rooted and unlocked and been trying to run this and can't get it to take. I'm not a noob, and I've used cmd prompt plenty for other phones. I had to use it a ton for my HTC One X. For some reason I can't get it to recognize the phone. Any suggestions?
 

BoostedSR20

Senior Member

Attachments

  • adb.jpg
    adb.jpg
    75 KB · Views: 919

Yoreo

Member
Nov 22, 2012
47
14
I'm assuming this fix was properly applied on my end?
 

Attachments

  • adb.jpg
    adb.jpg
    63.8 KB · Views: 795

arshad14

Senior Member
Dec 14, 2009
193
7
Toronto
LTE issues

I'm guessing this fix won't necessarily disable LTE when available and the phone would be able to switch back to LTE from DC-HSPA+ when it sees that LTE is available in the area?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 41
    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://xdaforums.com/showthread.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>
    2
    So I have the E973 and this app does not seem to do anything... toggled on or off, BBS is still showing this Alarm going off hundreds of times in a span of a few minutes.

    Going to try the command line method next.

    EDIT: Did it by command line and rebooted, and it still shows the Alarm going off all the time. Toggling this value on or off seems to do nothing.

    EDIT 2 : Ah ha - the problem, I bet, is your instructions (and the app) are keyed specifically to the ATT MNC, where as I am on the Bell MNC (302610). You should update your instructions to reflect that peoople should change whatever column matches their provider.... and maybe change your app so you can pick your own. I am going to try this now.

    EDIT 3: yep, this worked now!
    2
    My Android OS is still at 47% of my battery use, but I'm getting battery life like this...

    Just because it's more than everything else doesn't mean it's using THAT much battery. Granted, I haven't used my phone a ton today but this is good now matter how you look at it.

    Sent from my LG-E970 using xda app-developers app

    High percentage or not, I don't get that kind of battery life. And I do like to use my phone.
    1
    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
    1
    For those of you doing this through your PC's (read windows machine) you'll need ADB installed first.

    There is however aneasier method to do this.

    With your phone being rooted, download the android terminal emulator.

    Run it.

    And then type in everything after the # adb line, excluding the #s.

    This will allow you to do all of this through your phone without using a computer. However be careful, the first command will grant you super user rights, which allows you to do anything. You can seriously damage files and brick your phone. Only type what is shown in the OG post, and nothing else.

    Enjoy better battery life!

    2d