Android phones have a bugreport for debugging purposes, and can log a lot of logs. The previous article talked about how to install this log tool. This one records the generation and export of bugreport. Test mobile phone: Android phone 7.0 or above
- Install an ADB on the computer, just install ADB, and configure the path, so you can use adb directly in any path. SDK is very big
- Turn on the debug mode and make the developer mode by pressing the version number several times on the phone.
- Turn on debugging in developer mode
- Connect your phone to your computer and select Transfer files.
- Open the CMD window
- The following is the command set time:
- Reset battery statistics and history
Adb shell dumpsys batterystats --reset
2. Get the detailed wakelock data, Chinese is the wake lock, the application can hold the lock, the CPU can not enter the sleep state, has been working. For example, when the screen of the mobile phone is off, some applications can still wake up the screen to prompt the user for the message. Here is the wakeoc lock mechanism. Although the screen of the mobile phone is closed, these applications are still running. After this switch is turned on, try not to open it for too long. The reason is: the log is too big to bear.
Adb shell dumpsys batterystats --enable full-wake-history --enabled
Adb shell dumpsys batterystats --disable full-wake-history --off
3. crawling logs
Adb bugreport bugreport.zip