The iOS 14.5.1 on hand has been unable to load battery usage information correctly since it was jailbroken with unc0ver 8.0.2. Today I finally couldn't stand this issue anymore and resolved it.
Cause
After some research, the cause of the issue was found in this post by @SongXiaoXi. Specifically, during the jailbreak process, Fugu14 changed the username from _analyticsd
to _nanalyticsd
, but kept the ID and $HOME
unchanged. However, a subsequent daemon changed the owner of /private/var/db/analyticsd
and its subdirectories to _analyticsd
(ID changed to 264
). This caused _analyticsd.back
to be unable to read the database information under /private/var/db/analyticsd
when started with 263
, resulting in the inability to render battery usage information.
Solution
The solution is also very simple. I wrote a tweak to do all the work for you. You need to add the following two sources, then search and install FixBatteryUsageFugu14
:
https://liam.page/apt/
https://liam.page/apt-beta/
The tweak will execute some shell commands each time SpringBoard starts.
You can also manually execute these commands to observe their effects. But please make sure you know what each step is doing before you proceed.
First, you need to install the
file-cmds
package in a package manager such as Cydia/Zebra. It provides thechflags
command. (Alternatively, advanced users may consider installingbinpack64
).Then, you need to execute the following commands in the iOS command line (or SSH into it).
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
cd /var/mobile/Containers/Data/Fugu14Untether/Library/Caches/com.apple.dyld/
ls -l
sudo chflags -v noschg,nouchg *.closure
sudo chown 263:263 *.closure
sudo chflags -v schg,uchg *.closure
ls -l
cd /var/mobile/Containers/Data/Fugu14Untether
ls -l
sudo chown -h 263:263 /var/mobile/Containers/Data/Fugu14Untether/Library # Only modify the owner of the Library symlink.
ls -l
cd /var/db
ls -l
sudo chown -R 263:263 /var/db/analyticsd/
ls -l
sudo launchctl stop com.apple.analyticsd
sleep 3
sudo launchctl start com.apple.analyticsd