[Android Apps and Games] nobnut:
EDIT: Still can't get it to write to the txt file.

EDIT2: Stop the press! Content has been written! Just not what we were expecting. I was running the latter test you asked for and was surprised to see this in wakelock.txt:

PARTIAL_WAKE_LOCK 'MAIL_SERVICE' activated (minState=0, uid=10261, pid=7897)

There she blows! From the 'dumpsys power' test you asked me to run in terminal... Down the bottom ;)

export PATH=/data/local/bin:$PATH
$ export PATH=/data/local/bin:$PATH
$su
# dumpsys power
Power Manager State:
mIsPowered=true mPowerState=7 mScreenOffTime=240351 ms
mPartialCount=0
mWakeLockState=
mUserState=SCREEN_BRIGHT_BIT SCREEN_ON_BIT
mPowerState=SCREEN_BRIGHT_BIT SCREEN_ON_BIT
mLocks.gather=
mNextTimeout=2284719 now=2278763 5s from now
mDimScreen=true mStayOnConditions=0
mScreenOffReason=3 mUserState=7
mBroadcastQueue={-1,-1,-1}
mBroadcastWhy={0,0,0}
mPokey=0 mPokeAwakeonSet=false
mKeyboardVisible=false mUserActivityAllowed=true
mKeylightDelay=6000 mDimDelay=47000 mScreenOffDelay=7000
mPreventScreenOn=false mScreenBrightnessOverride=-1 mButtonBrightnessOverride=-1
mScreenOffTimeoutSetting=60000 mMaximumScreenOffTimeout=2147483647
mButtonOffTimeoutSetting=6000
mLastScreenOnTime=2280577
mBroadcastWakeLock=UnsynchronizedWakeLock(mFlags=0x1 mCount=0 mHeld=false)
mStayOnWhilePluggedInScreenDimLock=UnsynchronizedWakeLock(mFlags=0x6 mCount=0 mHeld=false)
mStayOnWhilePluggedInPartialLock=UnsynchronizedWakeLock(mFlags=0x1 mCount=0 mHeld=false)
mPreventScreenOnPartialLock=UnsynchronizedWakeLock(mFlags=0x1 mCount=0 mHeld=false)
mProximityPartialLock=UnsynchronizedWakeLock(mFlags=0x1 mCount=0 mHeld=false)
mProximityWakeLockCount=0
mProximitySensorEnabled=false
mProximitySensorActive=false
mProximityPendingValue=-1
mLastProximityEventTime=0
mLightSensorEnabled=true
mLightSensorValue=1000.0 mLightSensorPendingValue=-1.0
mLightSensorScreenBrightness=118 mLightSensorButtonBrightness=0 mLightSensorKeyboardBrightness=0
mUseSoftwareAutoBrightness=true
mAutoBrightessEnabled=true
mMaxBrightness=255
mOldTemperatureIndex=0
mScreenBrightness: animating=false targetValue=118 curValue=118.0 delta=5.9

mLocks.size=0:

mPokeLocks.size=0:

# dumpsys power
Power Manager State:
mIsPowered=true mPowerState=7 mScreenOffTime=8482 ms
mPartialCount=1
mWakeLockState=
mUserState=SCREEN_BRIGHT_BIT SCREEN_ON_BIT
mPowerState=SCREEN_BRIGHT_BIT SCREEN_ON_BIT
mLocks.gather=
mNextTimeout=2339494 now=2333534 5s from now
mDimScreen=true mStayOnConditions=0
mScreenOffReason=2 mUserState=7
mBroadcastQueue={-1,-1,-1}
mBroadcastWhy={0,0,0}
mPokey=0 mPokeAwakeonSet=false
mKeyboardVisible=false mUserActivityAllowed=true
mKeylightDelay=6000 mDimDelay=47000 mScreenOffDelay=7000
mPreventScreenOn=false mScreenBrightnessOverride=-1 mButtonBrightnessOverride=-1
mScreenOffTimeoutSetting=60000 mMaximumScreenOffTimeout=2147483647
mButtonOffTimeoutSetting=6000
mLastScreenOnTime=2372708
mBroadcastWakeLock=UnsynchronizedWakeLock(mFlags=0x1 mCount=0 mHeld=false)
mStayOnWhilePluggedInScreenDimLock=UnsynchronizedWakeLock(mFlags=0x6 mCount=0 mHeld=false)
mStayOnWhilePluggedInPartialLock=UnsynchronizedWakeLock(mFlags=0x1 mCount=0 mHeld=false)
mPreventScreenOnPartialLock=UnsynchronizedWakeLock(mFlags=0x1 mCount=0 mHeld=false)
mProximityPartialLock=UnsynchronizedWakeLock(mFlags=0x1 mCount=0 mHeld=false)
mProximityWakeLockCount=0
mProximitySensorEnabled=false
mProximitySensorActive=false
mProximityPendingValue=-1
mLastProximityEventTime=0
mLightSensorEnabled=true
mLightSensorValue=-1.0 mLightSensorPendingValue=-1.0
mLightSensorScreenBrightness=118 mLightSensorButtonBrightness=0 mLightSensorKeyboardBrightness=0
mUseSoftwareAutoBrightness=true
mAutoBrightessEnabled=true
mMaxBrightness=255
mOldTemperatureIndex=0
mScreenBrightness: animating=false targetValue=118 curValue=118.0 delta=5.9

mLocks.size=1:
PARTIAL_WAKE_LOCK 'com.maxmpz.audioplayer.player.PlayerService temp' activated (minState=0, uid=10194, pid=7004)

mPokeLocks.size=0:

#