yashsingh1/xdaforums huggingface dataset:
[Galaxy S II Themes and Apps] dan13l:
Um, unixbyte, not sure what you're showing us there?

13 seconds of use isn't *really* enough to tell whether this has made a difference...
[Galaxy S II Themes and Apps] crypticc:
Yes. Or if it is already there you can do

update nwkinfo set dormancy = 'on' where plmn = 1234;

Change 1234 to your carrier plmn.

I found key change was ANY number apart from 0 in the other table. 0 triggers a bug IMO
[Galaxy S II Themes and Apps] borchgrevink:
Anybody knows if Telenor in Norway supports fast dormancy?

Apparantly, yes!
[Galaxy S II Themes and Apps] eezdva:
My 3G network is def higher with FD off.

I might try it for a while to see if the battery drain is better with FD off.
[Galaxy S II Themes and Apps] tasty_boy:
i would like to try it, but it seems very hard and complicated...

gonna wait an easiest mode to do it!
[Galaxy S II Themes and Apps] ferreinf:
*#9900# disabled fd, exit is this hard? ;-)
[Galaxy S II Themes and Apps] saar17:
What is adb shell and how do i write and execute the lines you wrote in 3.
[Galaxy S II Themes and Apps] thongrim:
Hi,

I have a I9100, open market, with cyanogenmod-RC1 on it. I put ro.ril.fast.dormancy.rule=0 in my build.prop file. I tried also your guide, but sqlite cannot find the Dormancy column in the nwk database. Also, no Dormancy references in logcat.

Is that ok? Or disabling from build.prop is worse than your method?

Thanks
[Galaxy S II Themes and Apps] cowbutt:
It looks like the schema of the dormpolicy table has changed in Jelly Bean. With this schema, I was getting "getDormancyFromDB() DB not prepare error" (sic) errors in the output of

logcat -b radio | grep 'RIL::FD'

when I enabled my data connection. I found the solution at http://www.pocketpc.ch/samsung-galaxy-s3/172760-info-fast-dormancy.html and it is to add two more columns to the table. As root:

# cd /data/data/com.android.providers.telephony/databases
# sqlite3 nwk_info.db
sqlite> ALTER TABLE dormpolicy ADD COLUMN lcdonfdtime_Rel8 TEXT;
sqlite> ALTER TABLE dormpolicy ADD COLUMN lcdofffdtime_Rel8 TEXT;
sqlite> UPDATE dormpolicy SET lcdonfdtime_Rel8='-1';
sqlite> UPDATE dormpolicy SET lcdofffdtime_Rel8='-1';
sqlite> .quit
#

logcat -b radio | grep 'RIL::FD' now reports:

E/RIL ( 1852): [RIL::FD] getDormancyFromDB() Getting data from DB is done without any error

shortly after enabling data.

I did this on CyanogenMod 10.1.3.
[Galaxy S II Themes and Apps] nothingman1976:
Deleted
[Galaxy S II Themes and Apps] pulser_g2:
Hmmm...

ro.ril.disable.fd.plmn.prefix=23402,23410,23411

Anyone tried adding that to their build.prop?

It seems that this disables fastdormancy on those MCC/MNC numbers, at least on other devices... No idea if it works on Samsungs...
[Galaxy S II Themes and Apps] break1:
Hey guys, any ideas how i can fix display percentage?^^ screen brightness is already on lowest. Only thing i use is live wallpaper. But that shouldnt be the problem right? Btw i am on newest firmware and allready did fullwipe + root.

Cheers
[Galaxy S II Themes and Apps] nobnut:
Any chance of making that image a little smaller... it's a bit too big to see what's going on ;)
[Galaxy S II Themes and Apps] break1:
i dont know how, screenshots are just bad :P

anyways, display usage is at 40-50 % media around 10 % and android os about 15 %...

is there a way to get display usage down? i mean... i tried practicly everything... installing XWKE2 firmware, fullwipe, auto brightness off, screen timeout 30 seconds, screen brightness 10 %

still dont get it lower. i am using live wallpapers...but i cant imagine thats causeing such a high usage?
[Galaxy S II Themes and Apps] slyydrr:
I'm really not trying to be a douche, but you just hijacked this thread and took it way off topic. There are plenty of battery life related threads in General.
[Galaxy S II Themes and Apps] nobnut:
How long has the screen been on compared to the phone? For example, if you turn the phone on and have the display/screen on constantly... it will obviously consume a higher percentage of the power. If on the other hand you turn the phone on and leave the screen off for 12 hours then turn it one quickly to check the power usage... it will show you a very low percentage.

It all depends on your usage.
[Galaxy S II Themes and Apps] break1:
sorry dude, i will ask there then. i didnt want to spam here or so. Cheers
[Galaxy S II Themes and Apps] cTrox:
Just added it. Will let you know if something changes.

deleting the nwk_info.db didn't lower the Android OS percentage btw.

Edit: Still getting this in logcat:

D/FastDormancy( 2840): before ======= ENTER DORMANCY =======
D/FastDormancy( 2840): [FD] ON default: true
D/FastDormancy( 2840): Before mDormFlag: false in getCapaDormancy()
D/FastDormancy( 2840): After mDormFlag: false in getCapaDormancy()
[Galaxy S II Themes and Apps] uskr:
Ok, a lot of questions. I will to answer them all at once:

Q: But I don't have the second file?

A: That's fine, most people won't have it. But the code that checks for those files also checks for that one, so just in case I decided to make sure that one is deleted if ever exists.

Q: But that file may have more important network information?!

A: IT DOESN'T. If you take the time to open the file and look at it, you will se that it doesn't have much information at all. You will see it's ONLY contents are related to Dormancy, and NOTHING else. So if you are having FastDormancy problems, they already miss the information you need about your carrier anyway. Also, if you factory reset after KE2, it already delete those files.

Q: My battery usage seams the same!?

A: The problem only appears IF wifi is turned off or in "sleep mode". If you are testing it in those conditions, you won't see anything changed. You will only notice the fix while the phone has no wifi connectivity, has 3g on and is on standby. That's when FastDormancy goes nuts.

Q: How do I disable Dormancy?

A: If you wanna mess with the database or with o.ril.disable.fd.plmn.prefix=23402,23410,23411, you can find your current network plmn running over adb shell the command: getprop gsm.operator.numeric

Q: Why FastDormancy is there in the first place?

A: If your network support Dormancy AND the information required is on those databases, you can get a much improved battery life by using it. But only a few have that right now. Or at least working as intended.

I will post those on the first post.
[Galaxy S II Themes and Apps] zxz0O0:
While searching the second file, I found /system/csc/customer.xml. I opened it:

<FastDormancy>
<NetworkName>O2 UK Postpay</NetworkName>
<FastDormancyEnableStatus>off</FastDormancyEnableStatus>
<LCDStatus>on</LCDStatus>
</FastDormancy>

There is more, not only from O2 UK Postpay. Maybe we can change something in this file to disable it.
[Galaxy S II Themes and Apps] αкαѕнα:
interesting... have moved "/data/data/com.android.providers.telephony/databases/nwk_info.db" to sd card now....
[Galaxy S II Themes and Apps] beppez82:
Are those dormancy configuration stored into locals CSC?
[Galaxy S II Themes and Apps] darkalchemist:
hmm, seems to have perhaps helped 3g life a bit! Will need a bit more time to see for certain but nice find. Now if only we can pinpoint the android os drain....
[Galaxy S II Themes and Apps] dan13l:
That seems to be ignored - I just added it, rebooted, and the dormancy stuff keeps popping into the log every five seconds.
[Galaxy S II Themes and Apps] uskr:
I did that to mine too.

I guess that should reduce the battery usage from FastDormancy even more, I just couldn't find any side-effects of forcing the longer pooling times. I set mine to 20.

If nothing goes wrong during the day I will update the guide to show people how to add that manually to their carrier.
[Galaxy S II Themes and Apps] BeelzeM:
Is this only an issue with networks that don't support NCFD?

Supposedly my carrier (Vodafone Netherlands) supports Fast Dormancy, will this still be a problem for me?
[Galaxy S II Themes and Apps] uskr:
Check adb logcat and see if you phone keeps poping FastDormancy messages every second while the screen is off. (wifi should be off too)

If your network support Dormancy and everything goes well, FastDormancy should pop only once, when the phone goes in standby mode, and it will say Dormancy was enabled.
[Galaxy S II Themes and Apps] BeelzeM:
Unfortunately I'm still waiting on my phone. But once it gets here I'll run logcat to check. I spoke to a technical employee of Vodafone and he confirmed FD is supported. Will check. Thanks.
[Galaxy S II Themes and Apps] Andrmgic:
Mine repeats over and over.. on at&t in the US..

Would be nice to get this fixed and enjoy better battery life.

It happens about every 5 seconds since I deleted the db file.
[Galaxy S II Themes and Apps] uskr:
5 seconds is 'Ok'. You will notice a tremendous difference already. The problem is that before it kept doing it over and over nonstop, basically keeping your CPU alive and processing things the entire time.

I will post a quick howto on how to make it 10s or more between the pooling.
[Galaxy S II Themes and Apps] dan13l:
Could someone upload the database with all intervals set to 20 seconds or more? Would love to try this out, but I'm not going to be in a position to do the mod myself for several hours.
[Galaxy S II Themes and Apps] aussiebum:
uh... I just checked my ROM and I have neither of the files mentioned?

/data/data/com.android.providers.telephony/databases/nwk_info.db
/system/csc/nwk_info.db

I'm using VilliamROM 1.0 (which is KE2 based).

After using Titanium Backup to freeze wifi sharing, wifi sharing manager, software update and "fixing" a potential SNS-related issue by adding login details, the only thing that's chewing up significant CPU time (well all 7minutes over 6 hours or so - or ~40%) is "Android OS", so was investigating to see if that was related to FastDormancy issue....

EDIT: ah bugger, I still have those FD messages like everyone else.
[Galaxy S II Themes and Apps] uskr:
Its fine to have them every 5+ seconds. After stock xe2, they were poping like every second or less. And it was draining a lot of battery.
[Galaxy S II Themes and Apps] robstunner:
Anyone notice the change in battery life?
[Galaxy S II Themes and Apps] aussiebum:
Yeah, I'm on KE2 and it's popping up around every 2-3 secs. My network doesn't seem to support FD so it's a waste of time.

Would someone be able to update their nwk_info.db so I can stick it into the Telephony section and edit it to put some ridiculously long FD polling interval? Thanks

I've already tried a bunch of FD-related prop entries (ro.ril.fast.dormancy.timeout, ro.ril.fast.dormancy.rule, ro.ril.disable.fd.plmn.prefix, ro.ril.fd.scron/off.timeout) in build.prop and rebooted but none of them do anything.
[Galaxy S II Themes and Apps] uskr:
Ok, I updated the front post with a quick howto explaining how to set FastDormancy to a higher pooling time. I set mine to 30s. Everything fine so far.
[Galaxy S II Themes and Apps] Andrmgic:
Interesting.. my dormancy is now returning "true" after making these changes.

310410 was "Vodaphone" originally in the existing database.. now that I'm using it as AT&T, dormancy is returning true.. I wonder if that is just because we set dormancy to off.. or if the carrier name really made a difference..

edit - Changing it to "Off" in nwkinfo must be what made it return true.
[Galaxy S II Themes and Apps] aussiebum:
Excellent - before it kept spamming Enter Dormancy every 2-3 secs or so because I didn't actually have a nwk_info.db at all.

I've forced it to only check once a minute (and with FD ON actually because my provider *should* be supporting it) and looks like that worked. Now just need to see if it makes a difference to battery life...
[Galaxy S II Themes and Apps] Vulpix:
Does one need root for this fix?
[Galaxy S II Themes and Apps] walda:
yes, otherwise you have no write/delete access to that file.

sent from my SGSII via T*patalk
[Galaxy S II Themes and Apps] nakamichito:
dial *#*#9900#*#* and [Disable fast dormancy] :)
[Galaxy S II Themes and Apps] crypticc:
Overnight test set to ten seconds. pass?

Daytime test commenced. Expect lots of usage and network flipping on train. One thing I have noticed, my 3g reception is better. Just passed through a famous black spot without a hitch. Normally phone would toggle repeatedly between 3g h and no reception as it hunted for a signal. (three don't do 2g)

:-D
[Galaxy S II Themes and Apps] TheMathMan:
Ok. I'm on giffgaff which I can't see in the list. It runs on O2 so I'm guessing I just change that setting?
[Galaxy S II Themes and Apps] crypticc:
Uskr, hi, I searched everywhere for sqlite3 binary. nada. Just lots of links to.c and .h files. I'm even looked on sqlite home page. Where are all these famous android binaries please? It always seems to be self-build.
[Galaxy S II Themes and Apps] aussiebum:
download Titanium Backup. It has sqlite3 included.

On other notes, looks like the database fudge works good - Android OS usage has dropped from 40% -> 18% so far...
[Galaxy S II Themes and Apps] aussiebum:
ooh - have u tried it and does it actually work?

On the other hand I'd like to keep FD on for networks that do support it as it's supposed to mean I save even more power so I wouldn't want to disable it until the last resort.
[Galaxy S II Themes and Apps] dan13l:
Tried the 9900 code, disabling it in there doesn't seem to make any difference.
[Galaxy S II Themes and Apps] aussiebum:
I reckon that only works IF your operator is setup in the nwk_info database (assuming you even have nwk_info.db.... I didn't and had to download it).
[Galaxy S II Themes and Apps] crypticc:
Do the getprop thing
[Galaxy S II Themes and Apps] crypticc:
UPDATE:

Morning test completed... Good result. Interesting that logcat shows no polling except when screen changes state to off. I reckon ANY value would work as it's just a delay from screen off and on before fast dormancy kicks in, and turns off, and the issue is that zero just causes the phone to have a hissy fit.

Now just to fix that wifi sharing, esp as wifi not even turned on.
[Galaxy S II Themes and Apps] fishton:
Has anyone checked the nwk_info.db from another device (ie: Nexus S in 2.3.4) just to see if there is any difference ? or if we could use it directly maybe
[Galaxy S II Themes and Apps] crypticc:
Someone on other thread has new o2 phone, reports doesn't have issue, have asked to pull nwk_info so can have a gander if network has put in proper values
[Galaxy S II Themes and Apps] DocRambone:
With disabled fast dormancy: 2 min cpu/h for android os, same as before...
[Galaxy S II Themes and Apps] CandyAndy:
wait, what is this:

"2. make sure you have sqlite3 binary installed (most people install it anyway while rooting). It's usually located at /system/xbin/sqlite3"

And where to get it? Can't find it from the market
[Galaxy S II Themes and Apps] simonk83:
Ok, I'm trying the instructions from the first post to change the timing, but when I get to the sqlite3 part it just tells me "sqlite3: not found".

I've checked the xbin folder and it's not there. I do have TitaniumBackup installed which tells me that sqlite is installed, but that doesn't seem to be helping.

Any ideas?
[Galaxy S II Themes and Apps] bentez2003:
I hurt my mind trying to understand the new guide. Really great job in tracking down the problem if this works guys! Can I use the terminal to punch in these commands? Also is there any hope of simplifying this for the less than gifted people amongst us? (me)
[Galaxy S II Themes and Apps] Guitarfreak26:
Same here mate, titanium says sqlite 3.7.3 installed
[Galaxy S II Themes and Apps] CandyAndy:
Same here. But rest of that I have no clue what to do :D :confused:
[Galaxy S II Themes and Apps] dan13l:
I copied sqlite3 from /data/data/com.keramidas.TitaniumBackup/files into /system/xbin - that did the trick.

I could post my database if that would be helpful? Basically the result of "getprop gsm.operator.numeric" on my device was 23410. So if you get the same, my version of the database should have the fix for you.

Edit: Here's the link to the modified database, just overwrite your existing one (I'd suggest making a back of it first though).

https://dl.dropbox.com/s/5xf6446ivgbdsek/nwk_info.db?dl=1
[Galaxy S II Themes and Apps] xedamen:
Yesterday I done this mod, and today my phone was worm all the day and my battery is 27% now, from 7 o' clock... Thanks....
[Galaxy S II Themes and Apps] dan13l:
OK, feedback on this.

After having wifi off for 4h 21 minutes of use, and being on a cellular connection the whole time, my Android OS use is 8m 24s. This is after applying the changes to the database using sqlite3, not removing the file, or modifying through the *#*# menu.

For reference, yesterday at the 4h 21m mark my Android OS consumption was at 46m17s, having had wifi on for most of that time.

On the face of it, the changes to the network database have reduced the android os time considerably. However, my battery is already at 66%, and yesterday, on wifi, the fast dormancy shouldn't have been causing a problem, yet the figure was still high and my battery at this stage was looking a lot healthier.

Consider me officially confused!
[Galaxy S II Themes and Apps] fishton:
If you re experiencing problems while you re in wifi, check if Wifi Manager and Wifi sharing are not causing these issues
[Galaxy S II Themes and Apps] sealer:
Thx man its really great I have been using my mobile more than 10 hs and just drop 10% only (light use)
[Galaxy S II Themes and Apps] aussiebum:
that's easy - just freeze the two offending Wifi Sharing apps with Titanium and you're done :)

You can squeeze even more battery life by freezing Software Update also.
[Galaxy S II Themes and Apps] landerson07:
This may sound really stupid but what is wifi sharing?? Is it just for tether and hotspots etc?? i.e. nothing to do with me connecting to my home wifi??

And software update, what is this?? Android market updates or just fw etc???

Lee

PS: sorry, don't mean to hijack the post and thanks to the op for everything he's done
[Galaxy S II Themes and Apps] Guitarfreak26:
SQL error: column plmn is not unique

i get that for the code line

insert into dormpolicy values("23420","My Carrier", 30,30);
[Galaxy S II Themes and Apps] Andrmgic:
Looks like you missed the part where you're supposed to delete the existing entry from dormpolicy before you insert your new one :)

you need to do -

delete from dormpolicy where plmn="23420";

Then you can do the insert.
[Galaxy S II Themes and Apps] lpsi2000:
Come on, 10 hours and only 10% lost. Use the phone:p
[Galaxy S II Themes and Apps] crypticc:
I actually only plugged it in for five minutes. Do in reality have been on stand by for 18 hours with one hour of commuter level hammering of web pages etc. actually setting up wifi sharing then disabling had allowed it to sleep too. I think that ten percent is the previous nineteen percent impact but actually zero since doing that setup.

Definite pass
[Galaxy S II Themes and Apps] dan13l:
Android OS cpu time is way down with this tweak, however battery life now seems to suck! Coming up to 12 hours with 30% battery left. Same use as yesterday pretty much when I managed 21 hours with 20% left! Something is really not right somehwere.
[Galaxy S II Themes and Apps] cmd512:
FastDormancy was created to help conserve battery life, so theoretically, making these changes could make your battery life worse. I've seen an increase in battery consumption as well. Not sure if it's because today's usage was slightly different than last few days, but if it's a little better one day and a little worse the next, that tells me this tweak isn't all that effective.
[Galaxy S II Themes and Apps] aussiebum:
oh, those two apk's look like they're for Wifi Direct. And Software Update for OTA updates. THat's why I froze 'em instead of deleting them - if I really need them I can just unfreeze in Titanium backup.
[Galaxy S II Themes and Apps] aussiebum:
Same here actually. I deliberately charged to 100% and left it to idle over night - it lost 7% over 6hrs 45mins instead of just 3% over 6hrs 21mins (same network location, no apps in foreground running).

But then again that might be because I used this tweak to set FD on for my network instead of off, and I guess it's possible my operator doesn't support FD in all parts of the network yet... guess I'll increase the polling time interval more and see if that helps (have it set a 1min intervals atm).
[Galaxy S II Themes and Apps] simonk83:
Hi mate,

I'm on Optus as well (TPG). I guess it'd be good to find out if they actually do support FD or not, then we can decide whether to remove this file or edit it. For now, I've removed it so I'll see how I go today. Had pretty bad battery life previously, and it seems to drop simply by being connected to 3G, so it'll be interesting to see if this makes any difference.

Out of interest, what state are you in, and what colour is your Phone Signal bar in the battery stats? Mine is generally always yellow, as appose to Green so I'm assuming that's not helping (I'm in Melbourne).
[Galaxy S II Themes and Apps] crypticc:
8 hours standby, one five minute charge to reset the counter, then another 16 hours with a reboot caused blip when I dropped my phone. Still good and flat lining when not actually using phone.
[Galaxy S II Themes and Apps] dryspuri:
:rolleyes:

OKay just to give you update!!!

fastdormancy is again coming with phone trying to enter dormacy and returning false value again going on and on...............

this stops if i deactivate data and wifi

again, with that thing going my phone was going crazy with dalvikm process 20265 trying to free memory even when screen is off, when I tried to uninstall programs to find out whats causing this......... there was wifi sharing on in my process list, I did forcestop it........... and that process has gone>>> sammy messed up again with beautiful hardware!!!

Really sammy how much difficult this could be, I am surgeon & still can figure out whats going on>>> why can't you!!!!

One more thing.

when I turn the wifi off but 3g data is on phone is going on with fastdormancy( screen turned off)

when I turn wifi on & phone goes to sleep there is no fastdormancy messages, and it appears quite!!

I am more confused than ever"""!!!! what the hell is going on??????????????

Just to give you further update!!

*#*#9900#*#* you enter screen to disable fastdormancy, i disabled it then also it continued with false value

i again entered the code, made it enabled!! and hey phone is giving true in fastdormacy, no more error messages continuing!!! will see battery life and will report back!!

i think i am close to this
[Galaxy S II Themes and Apps] Necrobutcher:
From 91% tod 88% in 10 hours overnight...
[Galaxy S II Themes and Apps] WeeJockMacFeegle:
Download fails every time. My broadband is down so trying from my phone.
[Galaxy S II Themes and Apps] WeeJockMacFeegle:
Broadband fixed. Got it now.
[Galaxy S II Themes and Apps] aussiebum:
Hey, yeah as I was mentioning to someone else there isn't any clear news whether Optus supports FD or not. I've had it set to "on" in the database and while ANdroid OS usage has dropped, doesn't seem to do much to battery life. Fiddling with the check interval doesn't seem to help much either.

Trying it with "Off" for Optus tonight see if it helps.

Now that u mention, mine is yellow too (last time I checked anyways).
[Galaxy S II Themes and Apps] uskr:
WKE7 FastDormancy is still crazy for networks not configured/supported, btw. The fix still applies.
[Galaxy S II Themes and Apps] dryspuri:
Does o2 UK 23410 in getprop supports it
[Galaxy S II Themes and Apps] landerson07:
If I flashed the new ke7 do I need to copy this file back over again? I'm on o2 contract if that matters?
[Galaxy S II Themes and Apps] dryspuri:
I think this upgrade thing is not working as all data from the device is not getting cleared, and I think that is the cause for all the problematic things to remain on the device, is there a way to do something like galaxy s to reformat the device