Is it possible to somehow understand from the logs what happened to the phone a month ago? Are there such logs? I didn’t have access to my phone for a month, I’m afraid that I could have installed any software or hardware spyware. Is it possible to check it somehow by logs? Does the Android system keep logs for all operations in the system?
Here is some ADB commands that can help:
Dump each app and it data usage
for package in $(pm list packages | cut -f2 -d&quot;:&quot;); do echo $package; pm dump $package | grep  &quot;Mobile network&quot;; done;

Monitor Application
for package in $(dumpsys package | grep &quot;Package \[&quot; | cut -d &quot;\[&quot; -f2 | cut -d &quot;\]&quot; -f1); do
    echo $package $(dumpsys package $package | grep firstInstallTime)
done;

That will list install date of all the applications on the device.
You can replace &quot;firstInstallTime&quot; with &quot;lastUpdateTime&quot; to get last update time.
Some applications monitor and store the phone state in a database or a log file, you can also backup the apps in the device and try to find some useful information in these backups.
Hope it can help!