Uptime is always 0 on Android 11 #158
Comments
Does |
Yes but it can't be accessed. I've since tested this on a rooted device and the uptime displays properly, so I guess root is required to read that file. |
Seems to be an issue with android's tighter permission control with the newer versions.
from Termux FAQ |
I made a quick fix by treating Android as a different OS and using EDIT: I have not tested this that much. |
Send me example output from the uptime command. |
I guess changing the |
I meant output from |
I'm dumb...
|
neofetch works, so i just ripped its code. comment out line 372 (in the get_uptime function under case Linux) and then put
|
@sweatymachete lmao thats exactly what i did in my pfetch fork. I just check if /proc/uptime has read permission and if not i do that instead of the normal method. |
closing this now cuz the repo seems unmaintained |
@sweatymachete heres the full code if you're interested
|
Tested on a Samsung Galaxy s10e through termux (not rooted)
The text was updated successfully, but these errors were encountered: