Resolved 9.11.21 MI9 diag_logs


Status
Not open for further replies.

xtsuname

Members
Oct 2, 2019
18
15
On 9.11.21 in MI9, diag_logs is being created endlessly causing battery drain and storage getting full very fast
 
  • Like
Reactions: henno
I made a logcat and here is a snippet of the error. Logcat's link is attached here.

11-23 19:56:20.494 1552 1552 E Diag_Lib: diag_mdlog: command = c
11-23 19:56:20.494 1552 1552 E Diag_Lib: diag_mdlog: command = n
11-23 19:56:20.494 1552 1552 E Diag_Lib: diag:main: kernel supported: NUM_PERIPHERALS = 6, DIAG_CON_ALL: 127
11-23 19:56:20.494 1552 1552 E Diag_Lib: diag: No Session is active for the given mask
11-23 19:56:20.495 1552 1552 E Diag_Lib: diag_mdlog: offline_log is sensor
11-23 19:56:20.495 1552 1552 E Diag_Lib:
11-23 19:56:20.495 1552 1552 E Diag_Lib: diag_mdlog: Continuing with default directory path /sdcard/diag_logs/20191123_195620_sensor
11-23 19:56:20.506 1552 1552 E Diag_Lib:
11-23 19:56:20.506 1552 1552 E Diag_Lib: diag_mdlog: Diag_LSM_Init succeeded.
11-23 19:56:20.506 1552 1552 E Diag_Lib:
11-23 19:56:20.506 1552 1552 E Diag_Lib: REMOTE PROCESSOR MASK 0
11-23 19:56:20.506 1552 1552 E Diag_Lib: diag:kernel supported: NUM_PERIPHERALS = 6, DIAG_CON_ALL: 127
11-23 19:56:20.506 1552 1552 E Diag_Lib: logging switched
11-23 19:56:20.507 1552 1552 E Diag_Lib: Output dirs /sdcard/diag_logs/20191123_195620_sensor --- /sdcard/diag_logs/20191123_195620_sensor
11-23 19:56:20.507 1552 1552 E Diag_Lib:
11-23 19:56:20.507 1552 1552 E Diag_Lib: diag_mdlog: Reading mask for MSM, proc_type: 0
11-23 19:56:20.507 1552 1552 E Diag_Lib: diag_mdlog: Default mask file being read for proc_type: 0
11-23 19:56:20.507 1552 1552 E Diag_Lib: Reading the mask file: etc/sensor_diag.cfg
11-23 19:56:20.507 1552 1552 E Diag_Lib: diag: Determining contents of directory /sdcard/diag_logs/20191123_195620_sensor for circular logging ...
 
I did a nandroid backup and decided to factory reset and format data from TWRP. After signing in to my Google account, the diag_logs folder started filling up again. Looks like I am going back to 9.11.14.
 
  • Like
Reactions: giodeluigi
I found out how to start/stop the modem log capture.

Go to Settings-My Device-All Specs. Tap 5 times on Kernel version and CIT menu will open. Tap on the 3 dots at the upper right corner. Tap Additional tools. Tap MODEM test tools. Tap on Open/Close Offline Log to start or stop the log.

Video capture here.

Sent from my MI 9 using Tapatalk
 
  • Like
Reactions: giodeluigi
I found out how to start/stop the modem log capture.

Go to Settings-My Device-All Specs. Tap 5 times on Kernel version and CIT menu will open. Tap on the 3 dots at the upper right corner. Tap Additional tools. Tap MODEM test tools. Tap on Open/Close Offline Log to start or stop the log.

Video capture here.

Sent from my MI 9 using Tapatalk
In this way you see the battery stop draining?
 
to roll back to a previous version you just flash it the same way as if it was a newer version?
 
to roll back to a previous version you just flash it the same way as if it was a newer version?
Here was what I did to flash back from 9.11.21 to 9.11.14.

I have Mauronofrio's latest TWRP which is 3.3.1-46.

Reboot to TWRP, wipe Dalvik & cache, install 9.11.14, wipe Dalvik & cache, reboot.

Sent from my MI 9 using Tapatalk
 
Here was what I did to flash back from 9.11.21 to 9.11.14.

I have Mauronofrio's latest TWRP which is 3.3.1-46.

Reboot to TWRP, wipe Dalvik & cache, install 9.11.14, wipe Dalvik & cache, reboot.

Sent from my MI 9 using Tapatalk
Thanks I'll try that.
I have that same issue on the Mi 9 SE
 
Since your device is a Grus, you should use a TWRP that is meant for your device.

Sent from my MI 9 using Tapatalk
I know that
but since your post was the only one i found reporting this issue I just wanted to know how to downgrade
 
Last edited:
Just to confirm, you when to 9.11.21, tried your "fix", it didn't work and you went back to 9.11.14 again?
Yes, that was what I did. I dirty flashed from 9.11.14 to 9.11.21 just to try the fix. When it failed, I dirty flashed back to 9.11.14.

Sent from my MI 9 using Tapatalk
 
How's your battery on 9.11.14 now?
The dial_logs bug disappeared?
It is still too early to tell. Yes, the diag_logs bug has definitely disappeared after flashing 9.11.14.
6a96f7fbd38329aaaec3dbd72798e4cc.jpg
7ae1232cf904e083cb9520180986ee02.jpg
d10840d14f09c51aba654f351dc74e59.jpg


Sent from my MI 9 using Tapatalk
 
OK, just reflashed 9.11.14, wiped cache and dalvik and my phone got bootlooping into TWRP until I removed Force Encryption and DM-Verity, then it booted up normally in system.
What's the reason of this?
 
I have one solution for ya:
1) delete internal storage/diag_logs folder
2) create file diag_logs
3) profit
 
  • Like
Reactions: Poney70
I have one solution for ya:
1) delete internal storage/diag_logs folder
2) create file diag_logs
3) profit
Oh yeah, very simple & nice solution! A directory is just a special file on Unix system (Android) so it's impossible to create "diag_logs" as a directory's name. ^^
 
That's just a workaround to not being overloaded with diag_logs files because still diag is still trying to be monitored so battery is still taking a hit
 
  • Like
Reactions: giodeluigi
I have one solution for ya:
1) delete internal storage/diag_logs folder
2) create file diag_logs
3) profit
Thanks but I think that this trick just avoid folder to grow bigger and bigger but the battery drains anyway
 
Status
Not open for further replies.