How Android phones get page time-consuming data for an app (command-line mode)
-
Please install BusyBox on the phone, it is used to simulate various commands under the Linux system, such as Cp\grep ...
If you don't do step 1, you'll be in trouble later. Anyway I was tangled up all afternoon.
2. The phone must be root, can obtain SU permission;
3. Enter cmd and input adb shell;
4. Enter Su;
5. Enter command logcat |grep packagename |grep Displayed to print time-consuming data for the corresponding page;
6. The printed log can be processed again;
Note:
Huawei Mobile Phone cannot print the log under the ADB shell Logcat, the following prompts:
Note:log switch off, only Log_main and log_events would have logs!
Workaround:
Mobile phone dial *#* #2846579 #*#*, enter projectmenu--background settings--log set--log switch--open;
How Android phones get page time-consuming data for an app (command-line mode)