yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] nobnut:
Hang on... could be my fault. I miscounted the SU requests.

Let me try again.

EDIT: Looks like we are moving forward again. Just rebooted and no failure. DS Boot Report: 15000%

To be cont'd...

EDIT 2: Not much more to report. As you say Shutdown is deleted. I do not get a + after screen off for 10+ seconds. DeepSleepDetective.txt still doesn't appear to be being updated.

I will await instructions.
[Android Apps and Games] brandall:
LOL! They are annoying things! I think the superuser elite version just gives an application full permissions and defaults to 'yes' - but the binary wouldn't update for me :(

Right - time for instructions - I added an Edit to the above post

EDIT - Went to thank you, but they've gone again....
[Android Apps and Games] pulser_g2:
OK. Might have been a false alarm - I can't get it to show in logcat, so I put the messages in the wrong place.

I can put any message in, if you can show me where you want it triggered, in the source code of AOSP Android 2.3.3 R3 :)

Otherwise it's harder to tell, as I don't really know much about the power side of android, so I don't know where you want to put the messages.
[Android Apps and Games] brandall:
Testing Instructions

I will keep adding to this post so others can reference, so keep an eye on it!

1) DSDDispOn - Alert, Flash put an '-' in the text box - drag to action #16 (the one before last)

Test - Turn screen off for 10 seconds

Result - Should see a + then a -

Test - Flick screen on and off quickly

Result - Should see just a -

2) DSDDO (SGSII) - Flash 'DSDDO' in action #2

Test - In DSDDispOn, change action #13 (which should a goto action) to IF less than 30 (not 300 or 600 whichever I set it to in release version). Switch screen off for 40 seconds.

Result - Should see a + then DSDDO

3) DSDIntMaths - Flash 'Maths' - in action #1

Test - same as above, leave off for 40 seconds and relax :)

Result - Should see + then DSDDO then 'int'

More to come....
[Android Apps and Games] brandall:
I'll have a good read of it later and let you know - thanks for your efforts they are very much appreciated :)
[Android Apps and Games] nobnut:
I only see a '-'

Sorry. I don't understand what you mean by the highlighted part? Is it the same as test 1?.. and drag it to action 2?

DSDDispOn action 13 was already set to < 30.

Again, sorry, I don't understand what I need to do.
[Android Apps and Games] brandall:
Was there not an Alert, flash + action in position #12? Right before the goto action?? Perhaps I took it out because I thought it would be annoying...? Please insert if not there - you'll need to add 1 to all of the goto actions to make sure they still point to the variable clear at the end so they don't hit the perform task action

Each one is just going to 'flash' a screen prompt, so we can tell it has made it that far - so it's + Alert, Flash and then the test in the text field.

Thought I'd set it to < 300 - Oops! Well, 30 is all good then...
[Android Apps and Games] nobnut:
Yes it was/is there.

I understood the purpose, I just wasn't sure of my feeble mind interpreting your instructions correctly.

As it happens, I had not messed it up. But no joy. I do not see the Toast notifications apart from the screen off and back on = '-'. I though it might be being displayed under my lockscreen but even when I 'test' the task, I onl get a '-'.

It is possible that I have done something wrong but I don't think so.

I am very sorry but I have to go now. My 'real' life is a bit difficult at the moment and I won't be back around for any meaningful length of time until tomorrow now.

Thank you for all of your help, patience and everything else today... as ever.
[Android Apps and Games] brandall:
Thanks to you too - I'll have V4 ready on your return ;) Hope all is well...

EDIT: The lack of sleep finally caught up on me... just woke up on the sofa with my face on my laptop showing the Android power management - it was an exciting read! I think the best thing you can do is once your device is booted up and you run into problems, variable clear everything and then variable set %DISPOFFT to 100 and see if it runs smoothly again after that... It will mess with your data of course, but perhaps stop everything failing....
[Android Apps and Games] brandall:
Version 4 will be up in 20 and solve all of your worries :) Thanks again for your testing.
[Android Apps and Games] nobnut:
C'est magnifique!
[Android Apps and Games] brandall:
Long 20 minutes! Putting a few more safety nets in to stop failures... A little bit longer...
[Android Apps and Games] nobnut:
Rule number 1. Never rush the Dev.

Just trying to help you. I'll be here.
[Android Apps and Games] brandall:
V4 Up

V4

* Append box should be unticked in action #1 of DSDShutdown

* Corrected variable clear data in %DSDDO

* Added variable clear %DSDDOS to end DSDDispOn

* Added file existence check to DSDDeviceBoot

* Added safety value to %DISPOFFT to prevent knock-on failures if not set

* Reverted to V1 DSDDO due to toolbox differences in devices

* Reverted to V2 DSDAdhoc due to toolbox differences in devices

* Removed unneeded actions from DSDSuperUser due to revert

* Added '+' '-' & 'Zzzz' popups to confirm task flow

* Added DSDAdhoc into .zip

* Reverted to V2 DSDShutdown due to toolbox differences in devices

IMPORTANT READ BEFORE FIRST RUN!!!!!!

Thanks to nobnut and his testing, I've been able to establish that the SuperUser requests initially cause issues by preventing the tasks from completing and therefore corrupting the data - which goes on to cause more errors. We need to get these all out of the way at once. Please follow these instructions:

1) Open the task DSDSuperUser - keep pressing 'test' until no more SuperUser requests are appearing. This will leave all the commands free to run in the tasks. Apply out of Tasker and then go back to this task and press 'test' once again to make sure no further SU permissions didn't prompt the first time. There may well (should) be 4 permission to accept.

2) Reboot your phone

3) Once booted, you will receive an error that the data was corrupted. This is as expected (as there isn't any). Ignore it.

Ad-hoc

I've added an ad-hoc task into V3, so you can check the statistics at any time. Easiest way to launch it is via an icon from your desktop using a Tasker 'run task' widget, available in the widget options on your launcher. DSDAdhoc should be triggered first, which in turn will trigger DSDAhMaths and information will appear on your display.
[Android Apps and Games] brandall:
Should work perfectly for you now! :eek:
[Android Apps and Games] nobnut:
Rock on! I'll let you know how I get on.

(....\............../... )

.\....\........... /... /

..\....\........../... /

...\..../´¯.|.¯`\../...

.../... |....|.... (¯ `\

..|.....|´¯.|´¯.| \...|

..\......` ¯..¯ ´...../

...\_ ........... _../
[Android Apps and Games] nobnut:
I can't import v4.0 DSD_Boot.prf.xml. It throws an error.

Everything else imports correctly.
[Android Apps and Games] brandall:
Damn it!?

Attached another one...
[Android Apps and Games] nobnut:
Edit... I'm being stupid. Ignore this post.
[Android Apps and Games] nobnut:
Still no go I'm afraid. Error again.
[Android Apps and Games] brandall:
Are you definitely running the beta version?

I've attached just the task in case the context is causing the problem - if it works, you'll have to add the context device boot and then choose this as the task please...
[Android Apps and Games] nobnut:
I was trying to install all of the xml files from v4.0. I can install all apart from the DSD_Boot.prf.xml.

EDIT: Sorry, Beta version of what? Tasker? If so, no, I have the full version.

EDIT 2: The new task won't install either... it gives me a 'bad packet data format' error.
[Android Apps and Games] brandall:
DOH! That may well explain lots of errors!!!

Latest Beta Version of Tasker (Profiles use new functionality)

I have to dash out for a while now - hope it works after you have the Beta running! Good luck!
[Android Apps and Games] 4silvertooth:
I have just installing v3 and v4 is out. (V4 still says coming soon)

Well why is DSD Power profile active as deafault shouldn't it be Display On

Edit: I think my profiles are not switching. I'll try v4.
[Android Apps and Games] nobnut:
Oh man! I'm sorry... I read about the Beta in your OP but I assumed that was for folk who hadn't purchased the full version.

Damn. I have installed it and will start again.
[Android Apps and Games] nobnut:
I think it appears to be working now... I am sure it would have been working before, if I hadn't been stupid. Anyway...

Following a short test, this is what was recorded to DeepSleepDetective.txt

name expire_count wake_count
name expire_count wake_count
PowerManagerService
name expire_count wake_count
PowerManagerService
name expire_count wake_count

ApmCommandThread AudioOutLock KeyEvents PowerManagerService client-interface efsd-interface gps-lock radio-interface
name expire_count wake_count
PowerManagerService
ApmCommandThread AudioOutLock KeyEvents PowerManagerService client-interface efsd-interface gps-lock radio-interface
name expire_count wake_count

ApmCommandThread AudioOutLock KeyEvents PowerManagerService client-interface efsd-interface gps-lock radio-interface
------------------------------------------------------------------------
|| 30-06-2011 || 13.35 || DSP: 14 minutes @ 67%|| 62% of Uptime
------------------------------------------------------------------------
Active Tasker Profiles: ,DSDNotify,
------------------------------------------------------------------------
Active Applications
------------------------------------------------------------------------
name expire_count wake_count
"sec-battery-monitor" 0 25
PowerManagerService
ApmCommandThread KeyEvents client-interface efsd-interface gps-lock radio-interface

I see a '-' after short screen off time and a '+' after long screen off time.

I see the 'Zzzz' after a period of sleep.

I saw a notification showing Sleep had been prevented with a % number (I didn't have a time to read it though, I think it said 62%).

AdHoc works. It reads UPT 42% and PDS 66% (I am guessing that this 66% figure is the same figure that showed in the statusbar notification above that I didn't have time to read).

Looking at the DeepSleepDetective.txt file, I see that gps-lock and battery monitor appear to be the issues preventing sleep.

I also see that the 'Active Applictions section is blank. What would be displayed here when triggered?

EDIT: For the sake of clarity, would the following definitions be true?

PDS = Preventing Deep Sleep (time that the device wasn't asleep but satified the criteria for being so)

UPT = Uptime (Self explanatory, time the device has been switched on for)

DSP = Deep Sleep (Time sactually spent in 'sleep')

If the above is correct, I am slightly confused about the line:

|| 30-06-2011 || 13.35 || DSP: 14 minutes @ 67%|| 62% of Uptime

This means that the device was in deep sleep for 14 minutes, I am slightly confused however as to the relationship between the 67% and 62%.

Thank you very much. This is all excellent! :)
[Android Apps and Games] pulser_g2:
This looks interesting guys.

In absence of anyone with ideas on where they wanted logcat messages shown while running, I've abandoned that idea, as it likely won't help us with WHAT stops the sleep...

I might look at trying to set this up in tasker, but am not too sure about what we're hoping to see from it...
[Android Apps and Games] nobnut:
This isn't a bug as such. I am just reporting for the record.

If you reboot whilst connected to a power source and leave it plugged in (approximately 30 minutes in my case), the Adhoc report shows UPT as 0% and PDS as 10001%.
[Android Apps and Games] nobnut:
If you do Pulser, don't do what I did, you need to use the Tasker Beta found here.
[Android Apps and Games] brandall:
It's fast updates here! V4 ok? No profiles should remain active other than charging and incall.

There's absolutely no need to apologise! It's actually a blessing, because it's made me analyse everything in great detail and pick up on problems I would have probably overlooked otherwise. Your testing as been much appreciated. I'll make the first post more clear.

Great stuff :)

DSP = Deep Sleep Potential - It's therefore the time the device spent awake, when it could have been in deep sleep. The percentage is the percentage of the Potential Deep Sleep - So in the above example, it could have been asleep for 14 minutes, but only slept for 67% of that.

PDS = Potentially Dense Spellller - TYPO!! = Please can you adjust it to DSP in action #33 of DSDAhMaths :o

UTP = Yes, Uptime.

Looks like we might have another toolbox output issue... Can you open the terminal and type 'ps' into it please. This should give you an active process list. Can you look at the applications and see what their corresponding PID is. It was 125 on my device.

Thanks in advance!
[Android Apps and Games] brandall:
Thanks Pulser - I fell asleep reading about power management last night! I was thinking though, if it's about to fall asleep, then that's all good, it's when it doesn't - so all down to wakelocks really and me getting a better understanding of them and how I can output substantial information in regard to how long they have been active, how often and if they were forced to end...

Can you shed any light on where that information would be hiding via the terminal? I've extracted /proc/wakelocks and /sys/power/wake_lock and wake_unlock.

This is my next focus - Incall and power are not always function correctly - I have to study the behaviour more. If you press 'test' in DSDDeviceBoot it will reset the stats.

Sorry, I meant the PPID, but that doesn't help because it's not in your output! Damn it!

I'll upload my binary if you don't mind testing it to see if it gives a different output as Pulser suggested??
[Android Apps and Games] nobnut:
Go for it.

Doesn't work I'm afraid. It complains about not having a Shutdown file and when clicked, Adhoc results still show 0% and 10001%.
[Android Apps and Games] brandall:
I'll upload shortly :eek: I'll add it to this post.

That's fine it flashed that warning, it should have reset all data though.... Could you run it once more and then do a variable list action straight after and tell me what remains in the list please...?
[Android Apps and Games] nobnut:
There were 4. Three of them were mine:

SD cache: 2048

Time2: word (Talking clock I guess)

Time 1: 4

There was also:

Chrg: 1

I repeated the process and this time had the phone unplugged and:

Disp off:2 +100 was showing

Still, Adhoc shows the 0% and 10001%

Unfortunately, I have to disappear at about 5.10. I won't be back until tomorrow AM :o
[Android Apps and Games] brandall:
Thank you - if the phone is on charge then no DSP is available as it can't sleep on charge due to the OS monitoring the charge level. It would explain the strange figures - I need to deal with this.

Disp off: 2 + 100 suggests I haven't ticked 'do maths' somewhere - I'll investigate.

Attached is the binary. From what I understand it should be copied to /system/bin and then from the terminal type:

su

DesireBinary ps

and see if the output contains PPID and then

DesireBinary uptime

Let me know the output if you have time, otherwise, until tomorrow - and thanks for all today!! :)
[Android Apps and Games] nobnut:
Damn! "DesireBinary: no such tool"

Ideas? I've checked permissions as well.

The path given in Terminal looks ok and shows as 'export PATH=/data/local/bin:$PATH'
[Android Apps and Games] brandall:
Right, it'll be my mistake - can you try renaming it to lower case please? I'll have a read up this evening on where it should go... :mad:
[Android Apps and Games] nobnut:
I just tried with three possible permissions settings on the file. Still getting the 'no such tool' error :(

I will be online from tomorrow early doors if you want to leave me any instructions. In the meantime, have a good evening and don't stress over this.

I'm about to empty whatever is left of my thanks clicks on your posts, then pack up and go.

Thanks for everything!

EDIT: Just for the record I tried it in xbin also. No love there either.
[Android Apps and Games] brandall:
I've used all mine! Enjoy your evening... Until tomorrow :eek:
[Android Apps and Games] brandall:
Hi pulser - I've tried this - renamed my own toolbox desiretoolbox and after having to give it execute permissions I tried 'desiretoolbox uptime' but it says 'no tool found'.

Any ideas what I'm doing wrong??

I get different outputs from 'busybox uptime' and just 'uptime' - it's the output from just 'uptime' that I want and want everyone else to have. Can you talk me through what I need to extract and how I make the reference the 'uptime' binary I have..... If that made sense?

Thanks in advance

EDIT: I've attached what I have, which I assume are symlinks? Toolbox, uptime and ps
[Android Apps and Games] brandall:
V5 Up!

V5

* Changed PSD to DSP in Flash action #33 in DSDAhMaths - TYPO! Thanks nobnut

* Removed unneeded variable clear action in DSDNotify

* Ticked missing 'do maths' in action #13 of DSDAdhoc

* Added minimal uptime threshold until tasks are expected to perform maths to avoid data corruption

* Corrected %CPUDSDD error in action #8 of DSShutdown

* Corrected adding X% in DSD-Shutdown write file action as '%' is looked for for errors... Oops.

* Removed append from above write action to minimise possible errors.

* Added functionality to sum scaling frequencies using locale

* Added above command to DSDSuperuser, DSDAdhoc & DSDDO

* Added additional variable clear caution in DSDDO to avoid %CPUDSDD1 & %CPUTISD1 being used.
[Android Apps and Games] pulser_g2:
Ok breakthrough...

Use the command "toolbox uptime" in the sgs2

Busybox overrides the default uptime command via symlink.

I was getting my sleep time etc when I ran that
[Android Apps and Games] pulser_g2:
So... Did we agree the drain was caused by the inbuilt android battery monitor?

If so, can anyone tell me any specifics about it? That will help me try to find a nice fix :)

But I need to know which part of the power management/battery monitor you are referring to...

Are you meaning the battery monitor in the framework, or the bit in the Settings.apk?
[Android Apps and Games] nobnut:
I think brandall will need to update his Tasker profiles and tasks before we can be conclusive on that. The battery monitor is definitely a candidate from what brandall said the other day. But hopefully we will have some evidence and a source for the culprit soon.

Will keep you posted.

EDIT: Further evidence however is that it isn't showing in my DHD results either... just the SGSII.
[Android Apps and Games] brandall:
Morning! Thanks nobnut :) some great info for me to look at - browsing now.

name expire_count wake_count
"sec-battery-monitor" 0 25

I assume the above relates to this application you posted a screen shot from Is that an additional application you've downloaded, or part of the SGSII package??

How many phones do you have btw?!? :eek:

WHOOP! Thank you so much pulser, that was really doing my head in! I can lose many lines of maths from V6 now! After a short nap maybe....

I'd imagine the wakelock above relates to a third party application - doesn't look like a stock app to me... Nobnut?

Right, need to digest some info!
[Android Apps and Games] nobnut:
No, this is part of Gingerbread (Settings > About Phone > Battery usage). You will have it on your Sensation soon enough.

Ummm 7 Android phones, 1 WP7, 2 WM6.5 and 3 Android Tablets (Too many!)

Indeed!

If you mean the 'battery' wake. I believe that is stock. I have no monitors or any of that shenanigans going on.

If you mean what is causing the other wake (device wakes every minute or so but only momentarily [screenshot I provided] - doesn't seem to impact battery life, I get 2+ days with light usage)... not sure. I was going to root it out and sort it the other day when I came across this thread. I thought it would be a good test for your work to see what was causing it!

Good luck!
[Android Apps and Games] brandall:
Oh... looks pretty fancy for stock!

You must get a lot of phone calls! ;)

If you have a moment, could you test the following individual commands in the terminal please:

toolbox ps | grep "app_" | awk '{print $9}'

toolbox uptime | awk '{split ($9,a,":"); print (a[1]*60+a[2])*60}'

toolbox uptime | awk '{print ($3 $6 $9}'

Thanks in advance!
[Android Apps and Games] nobnut:
You had a typo in #3 :p That is why I had a few goes at it.

Were you expecting "0" in number 2? If not can you check it please to make sure I did as you wanted?

In order:

$ export PATH=/data/local/bin:$PATH
$ toolbox ps | grep "app_" | awk '{print $9}'
com.sec.ccl.csp.app.secretwallpaper.themetwo
com.touchtype.swiftkey.phone.trial
android.process.media
com.sec.pcw.device
android.process.acore
com.google.process.gapps
android.process.acore
net.dinglisch.android.taskerm
com.android.providers.calendar
com.symantec.mobilesecurity.sku28
com.qs.enhancedemail
com.Elecont.WeatherClock
com.google.android.apps.maps:HotpotService
com.google.android.apps.maps:NetworkLocationService
com.sanels.tempcpupro
com.snoggdoggler.android.applications.doggcatcher.v1_0
com.elnware.ActiveAppsWidget
com.smlds
com.maxmpz.audioplayer
com.maxmpz.audioplayer.widgetpack1
com.poynt.android
org.sickipedia
it.braincrash.volumeace
com.melodis.midomiMusicIdentifier
nextapp.systempanel.r1
com.facebook.katana
tunein.player
com.croworc.nationalrail.live
net.dinglisch.android.zoom
com.webkey
com.android.vending
com.wikitude.drive.gb
com.carl.tcpro
com.beansoft.lcd_density_changer
com.rmgeren.widgets.stockspro
com.anddoes.fancywidgets
com.google.android.apps.maps:LocationFriendService
org.koxx.pure_news
com.levelup.touiteur
de.dbware.circlelauncher
com.anddoes.fancywidgets.unlocker:remote
com.google.android.apps.maps
jackpal.androidterm
/system/bin/sh
toolbox
/sbin/ext/busybox
/sbin/ext/busybox
/system/xbin/busybox
/system/xbin/busybox
$

0

export PATH=/data/local/bin:$PATH
$ export PATH=/data/local/bin:$PATH
$ toolbox uptime | awk '{print ($3 $6 $9}'
awk: cmd. line:1: Unexpected token
$ toolbox uptime | awk 'print ($3 $6 $9)'
awk: cmd. line:1: Unexpected token
$ toolbox uptime | awk '{print ($3 $6 $9)}'
03:57:08,07:24:13,00:00:00
$

Note - You can see the final command I entered for number 3.
[Android Apps and Games] brandall:
Sorry!

toolbox uptime | awk '{print $3 $6 $9}'

Didn't need the random bracket :o

The 'zero' is not the output I wanted.... damn... could you try just

toolbox uptime

I really hope sleep-time doesn't come out as 00:00:00...

Thanks in advance....
[Android Apps and Games] nobnut:
Yes it does (come out as 00:00:00)... but I have had my device plugged in since I rebooted. Shall I unplug and leave it for a while to try and give it some sleep time?
[Android Apps and Games] brandall:
Damn... yes please... a few minutes should hopefully provide a result....
[Android Apps and Games] nobnut:
Bingo!

'toolbox uptime' yields sleep time of "00:06:49"

Same result for 'toolbox uptime | awk '{print $3 $6 $9}'

Both tests give the other two times as well e.g. (04:28:16,08:06:37,00:06:49)

Happy days!
[Android Apps and Games] brandall:
RESULT! WHOOP! :D

If I had any thanks left I would thank you with a thanks.... I'll do it later...

Ok, so, I hope all is running fine? Now the structure, maths and errors are sorted I can start looking more at the purpose of this and digging a little deeper with what's going on when deep sleep has been prevented...

Do you have a task killer installed on your device? If so, which one please??
[Android Apps and Games] nobnut:
No Sir! None of those installed.
[Android Apps and Games] brandall:
Ok! Cool. Might be an idea to clear all of the text files so results from this more trusted version are only considered going forward? I'm getting a bad maths evaluation error when deep sleep is prevented... It's still working fine, but I as yet can't work out why..

If you percentages start to go a little wayward at any point, just run DSDDeviceBoot to clear everything and start again. Charing/incall/screen off/on confusion needs some more intelligent logic.

It's wakelock reading time :(