Skip to content
This repository has been archived by the owner on Feb 5, 2023. It is now read-only.

No statistics appear #2

Open
billwang115 opened this issue Oct 23, 2016 · 35 comments
Open

No statistics appear #2

billwang115 opened this issue Oct 23, 2016 · 35 comments

Comments

@billwang115
Copy link

Opening statistics in endurance mode does not show any statistics. This problem just occured after updating the app to version 0.8. Before when I had the problem in 0.7, I changed my selinx to persmissive which seemed to solve the problem, back then. Currently, even though my selinux is set to permissive, The statistics section still shows a blank white screen. I tried unstalling the app and reinstalling,but there are still no statistics.

I am currently running stock android 4.4.2 rom.

@waylaidwanderer
Copy link
Owner

waylaidwanderer commented Oct 25, 2016

@billwang115 let me know if this APK fixes your issue. (It's in a zip file due to GitHub uploading restrictions)

@waylaidwanderer
Copy link
Owner

@billwang115 & @Gronkdalonka try this APK instead.
app-release.zip

@Gronkdalonka
Copy link

Still no luck for me. Already tried cleaning app data.
error3.log.txt

@waylaidwanderer
Copy link
Owner

@Gronkdalonka I can see statistics on an emulated Nexus 5 5.1.0. Not sure where your problem lies, but I'm going to try @billwang115's stock android 4.4.2 next to see if I can figure out the cause.

@billwang115
Copy link
Author

@waylaidwanderer I downloaded the apk(version 0.81 i believe), that you suggested for me and grondalonka. Statistics still do not appear in the statistics page. It just shows the loading statistics and then a blank white screen like before.

@waylaidwanderer
Copy link
Owner

Good timing @billwang115, I believe I've fixed your issue. @Gronkdalonka, you might as well try the posted APK as well to see if it makes a difference on your device. This time, could I get you to clear data, uninstall and then reinstall Power Nap, just to be absolutely sure we're starting with a clean slate here?

app-release.zip

@billwang115
Copy link
Author

billwang115 commented Oct 26, 2016

@waylaidwanderer After installing and reinstalling, the app actually runs properly now. I know the app is working though after checking the xposed log. I knew the app wasn't working before because of some java.lang error in the logs. Currently, there are still no statistics showing in the statistics page. My selinux is currently set to permissive so I don't think that is a problem.

@waylaidwanderer
Copy link
Owner

I'm at a loss as to why it's not working. I've tested it on stock Android 4.4.4 and 5.1.0 and both have statistics showing up. Maybe I'll go through Power Nap's code and add a ton of logging and see if that helps.

@martytoo
Copy link

martytoo commented Oct 26, 2016

When I recently used 0.7 on my rooted 5.0 Verizon S5 the statistics showed up intermittently. It seemed if i switched in and out of the statistics tab they would eventually show on the screen. But I can't get them to show in 0.8.1. If I want to see statistics again will i lose functionality by reinstalling 0.7?

@waylaidwanderer
Copy link
Owner

Can you clear the Xposed log, turn on debug mode in Power Nap (hold down volume button on home screen of app), reboot your phone, turn the screen off for a couple seconds to allow Power Nap to work, then turn off debug mode and upload the log here?

@Gronkdalonka
Copy link

@waylaidwanderer still no statistics but exposed log got entries now stating "Stats saved successfully" I'll post the log once i'll get to a computer

@waylaidwanderer
Copy link
Owner

@Gronkdalonka can you also post the contents of /data/data/net.jzhang.powernap/shared_prefs/stats.xml?

@Gronkdalonka
Copy link

@billwang115
Copy link
Author

@waylaidwanderer I had the same problem as martytoo. Back in 0.7, the statistics would sometimes appear and sometimes not. I think that was just some glitch back then.

@billwang115
Copy link
Author

Here is my log after turning on debug mode with powernap.
error.log.txt

@waylaidwanderer
Copy link
Owner

Thanks guys. I'll continue trying to fix it.

@martytoo
Copy link

If this isn't what you need I will try again. My boot time is quite long
due to apps loading at boot.

On Oct 25, 2016 11:43 PM, "Joel" notifications@github.com wrote:

Can you clear the Xposed log, turn on debug mode in Power Nap (hold down
volume button on home screen of app), reboot your phone, turn the screen
off for a couple seconds to allow Power Nap to work, then turn off debug
mode and upload the log here?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#2 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AI2LezvYHOKTzAmHWNPIw-xqabAFsdHaks5q3sxYgaJpZM4KeB5D
.

@waylaidwanderer
Copy link
Owner

I don't think attaching files work if you reply by email. To clarify, I mean the log you can find by opening the Xposed Installer app and going to the logs page.

@martytoo
Copy link

martytoo commented Oct 26, 2016

OK, I think you want it uploaded on GitHub. I'll try.

I can't find:
data/data/net.jzhang.powernap/shared_prefs/stats.xml

xposed_error_20161026_144154.zip

On Oct 26, 2016 11:45 AM, "Joel" notifications@github.com wrote:

I don't think attaching files work if you reply by email. To clarify, I
mean the log you can find by opening the Xposed Installer app and going to
the logs page.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#2 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AI2Le6OXFWjRoUuZOLyVxCq13-x5IuVnks5q33V-gaJpZM4KeB5D
.

@waylaidwanderer
Copy link
Owner

waylaidwanderer commented Oct 27, 2016

@martytoo It doesn't look like Power Nap is working on your phone (I see no messages in the logs about it allowing wakelocks), which may explain why you don't have any statistics. Can you try uninstalling the APK and reinstalling it? You can see in the Xposed logs for yourself if it's working or not (when your screen is off it will log stuff like "Allowed wakelock [etc.]"). You may also need to disable Amplify, although I'm not sure if it is causing conflicts.

@waylaidwanderer
Copy link
Owner

Actually, if you don't have "Enable while charging" ticked, that could be the reason. If so, disregard what I just said.

@waylaidwanderer
Copy link
Owner

@martytoo Use a root file explorer to find the stats.xml file. Start from the root folder "/" and go from there. The full path is "/data/data/net.jzhang.powernap/shared_prefs/stats.xml"

@martytoo
Copy link

Ok, I wasn't at root when I started to look for it. This was stats from after the reinstall that you suggested.
stats.zip

@shmrv
Copy link

shmrv commented Oct 27, 2016

Tested 8,1 today... AOSP 4.2.2 ROM. No statistics, until i turn on debug mode for PowerNap.
Xposed log shows all messages, statistics too. After disabling debug mode - empty statistics.

Thx alot for help.

@Gronkdalonka
Copy link

@waylaidwanderer Well if you would add that "ton of logging" i would volunteer to test. In the end this always helped me when i couldn't find the bug :). Anyway, thanks for your work so far.

@Ketanblazze
Copy link

I use CM12 after I updated my screen never used to get back on, after I lock my device ( OnePlus One )
No bootloop or anything
Just after I lock the device never used to get back on ..
Soo while it was on, I uninstalled the module from xposed
And rebooted... Everything was fine after it .

@daimoniuma
Copy link

daimoniuma commented Oct 29, 2016

LG G3 S (D724), Android 5.0.2 (Stock). The same.

<map> <string name="stats">{}</string> </map>

Even in Xposed's log I see: «Stats saved successfully».

@luisblop
Copy link

luisblop commented Oct 30, 2016

Hi @waylaidwanderer, here's my report.

I use a Moto X (2nd gen) with stock Android 5.1 (SDK 22), latest Xposed for Lollipop v86 and SELinux enabled with enforcing.

I took my time to compare and positively there are no bootloops in version 0.8.1 but besides the same reported issue of no statistics appearing unfortunately I got to the conclusion that this new version simply doesn't seem to work properly.

I verified this assumption by forcing some wakelocks via push message (gcm). The previous version 0.7 kept my phone in standby because it gets to block the wakelocks (which appears in the log of Xposed) whereas when using the new version 0.8.1 my phone now wakes after sending push messages, meaning that Power Nap doesn't block the wakelocks anymore.

With v0.8.1 (debug mode on), the only lines in the Xposed's log are:
I/Xposed ( 1116): [Power Nap] System tried to update inactive wakelock, returning null.
I/Xposed ( 7953): [Power Nap] Hooked into self.
I/Xposed ( 1116): [Power Nap] Stats saved successfully

And as already pointed by other users, the stats file is just empty:
<map> <string name="stats">{}</string> </map>

So I have two questions:

  • Does the version 0.8.1 still need root permission as asked by v0.7 ?
  • Is it strictly necessary to set SELinux as permissive in order to use PowerNap v0.8.1 ?
  • Does the new version 0.8.1 of PowerNap require to use a newer Xposed version for Lollipop/Marshmellow ? I've updated to latest Xposed v86 and still same issues.

I hope this information is useful and thanks for all your effort.

NB. By the way, I confirm that I've cleared all data and uninstalled Power Nap before updating

@ghost
Copy link

ghost commented Nov 1, 2016

I have had this "screen not powering on" error today due to editing my processor settings and using powernap at the same time. Disabled my processor manager and the problem went away. Is it maybe that I'm limiting the processor speed too low or an app conflict. I'm only going down to half speed on the cpu

@sdembis
Copy link

sdembis commented Nov 3, 2016

Initial 8.0 version caused reboot issue on Moto G LTE running stock 5.1 and had to be uninstalled. Version 8.1 seems to have solved the problem on the Moto G LTE and is able to now be installed on Samsung Galaxy Ace s5830 running Mardon's CM11 whereas version 7 was not able to be, However, statistics not working on either phone yet - still needs some work but thank you for what you've done so far. --- S.

Addendum: Power Nap creating too many issues on the Galaxy Ace with Mardon's CM11 - e.g.,, black screen, launcher problems (closes mostly), extreme lagging, etc. - had to be uninstalled. Would be great if could be streamlined for these older phones.

Addendum 2: Decided to install Power Nap again on the Galaxy Ace with Mardon's CM11 but this time deleted data first and then white-listed Apex launcher and Android System as well as setting the launcher to be kept in memory. Seems to have solved the black screen, closes and lagging. Still no stats, however.

Addendum 3: On the Moto G LTE, stock 5.1 I'm getting in the XPOSED Logs:

I/XPOSED (1384) [Power Nap] System tried to update inactive wakelock, returning null

Could you please provide an explanation of this for users who may be seeing this as well. It would be much appreciated and this has come up before in the comments on XDA but no answer was provided. It would help alleviate any concerns that something is not working or a conflict is occurring somewhere.

Thank you, in advance. Your input would be appreciated.

S.

@martytoo
Copy link

In the past we had to set Selinux to permissive. This doesn't seem to be the case with version 0.7 on my 5.01 running S5. But since the statistics aren't showing with 0.8.1 I am wondering if this setting is still required.

@daimoniuma
Copy link

Possible explanation arrived. 😉

W/XSharedPreferences(  323): getSharedPreferences
W/XSharedPreferences(  323): java.io.IOException: Permission denied while reading /data/data/net.jzhang.powernap/shared_prefs/net.jzhang.powernap_preferences.xml
W/XSharedPreferences(  323): 	at de.robv.android.xposed.services.ZygoteService.readFile(Native Method)
W/XSharedPreferences(  323): 	at de.robv.android.xposed.services.ZygoteService.readFile(ZygoteService.java:24)
W/XSharedPreferences(  323): 	at de.robv.android.xposed.services.BaseService.getFileInputStream(BaseService.java:148)
W/XSharedPreferences(  323): 	at de.robv.android.xposed.XSharedPreferences.loadFromDiskLocked(XSharedPreferences.java:122)
W/XSharedPreferences(  323): 	at de.robv.android.xposed.XSharedPreferences.access$000(XSharedPreferences.java:28)
W/XSharedPreferences(  323): 	at de.robv.android.xposed.XSharedPreferences$1.run(XSharedPreferences.java:107)

@daimoniuma
Copy link

Seems like this app just incorrectly asks for own settings at boot. This issue can be captured only via Liveboot. Thanks to Chainfire.

@carlitosa
Copy link

had the issue too that powernap didn't do much nor show information in the stats page.

make sure lowmemorykiller is not set up too harsh so that the service gets killed..

if you have greenify installed, powernap should be shown in the running in background apps. if it is not there, powernap won't do a thing.

@carlitosa
Copy link

perhaps also worth mentioning, in my search to find this problem, I created a file to run at startup which sets selinux to permissive and chmods the xml files for powernap to global read write (i don't care :p)

/system/su.d/permissive.sh

#!/system/bin/sh
setenforce 0
chmod 777 /data/data/net.jzhang.powernap/shared_prefs/*.xml

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants