Ok, so on Diting right now, 2 minutes in, and the device shutdown. Like, not a reboot. It shut down.
Charger is plugged in, I was using the phone, then it blacked out. I tried turning on through the power button, but nothing happened. I suppose it was a reboot so I waited.
The Mi logo came on, then the green battery icon for charging. This means the phone has shut off.
Why? How can I get logs from that?
This is really new for me now. The phone shut down. It's not hot, it's not slow, it's not buggy... It literally just turned off suddenly on me. No warning or anything. I can't extract logs from a turned off phone. I can probably enter TWRP and extract logs from somewhere after the fact, but I need to know where.
I have turned the phone back on and I'm back to using it normally to see what happens.
-------
Again, less than 1 minute. Phone has stopped charging, I noticed it through the Ambient display that it wasn't charging, though connected. I pressed the power button to turn it on, the Ambient display faded away like if it was going to turn on, then it played the "charger disconnected" sound, then turned off again.
I have ACC through Magisk. I will try disabling it as fast as I can, as this might be interfering something.
--------
ACC off, still with shutdown issues. Also no sound. Charging keeps coming and going,
and I think the reboot is triggered when an audio is played (such as playing music). I'll try to reproduce it a couple more times to confirm Can't confirm, I managed to "play" music in the background. Audio didn't come out, but the player was playing in the background. I installed a log app to recover logs, and as I opened it, the audio started working again, and it's charging consistently now. Could've been "fixed" by installing an app, or something worked out after a couple of minutes since boot.
I'll try rebooting the phone and seeing if the issue persists after a reboot, and see how to recover a whole log since boot.
---------
I haven't rebooted. I suppose the logs of it having issues, then sorting out somehow are also valuable.
These are the logs.
---------
If I keep music playing on the background (I left a music player playing music in the background, after audio went through), the phone doesn't bug out (audio works, charging works, doesn't shut down). The moment I stop the music, the charging bugs out after a little while, and audio is gone again. If I press play on the media player, it shows music as progressing, but no audio for 2-3 minutes. After I wait with the music progressing in the background, it suddenly comes back again, and phones resumes charging.
I'll clear logs, start recording, pause music, then resume music and wait until it starts playing again to stop the logs.
---------
Log recorded. It's almost 200K lines. That's how it went:
1 - Phone was charging, had music playing on the background
2 - Logs cleared. Started logging.
3 - Exactly at 00:50, music was paused. I could see a LOT of logs coming in.
4 - After 2-3 minutes, phone was still charging, though logging a LOT of stuff.
5 - Tried playing music again. No dice, audio wasn't coming through (Music player was working)
6 - After a while, charging stopped. Logging got even more intense
7 - A minute or two later, music comes through, phone starts charging, logging calms down significantly.
8 - When logging became relatively calm (not 10K lines/second), stopped recording the log and saved it.
Please analyze the issue. Maybe the device is "sleeping" too deeply, and by playing a music in the background prevents it?
If the logs aren't good enough, please tell me what I need to do.
---------
Roughly the same thing as above, but with less lines as I skipped a lot of waiting. Not sure if the log results are the same.
Here's the log and a video of how it's happening/how it was captured
and
Here's just the log file