"Automated test Mode"
Supports starting and running in the form of adb shell commands. Note that the Office family software may change the characters in the command, causing the command to be unavailable! Please enter the command manually, or copy it from the accompanying command.txt text.
1. Start Home
ADB shell am start-a android.intent.action.main-c android.intent.category.launcher-n iflytek.testtech.androidpropertytool/. Mainac
2. Open Monitoring
Execute the following two commands in turn, taking care to replace the Scarlet Letter section:
ADB shell am broadcast-a monitorstart--es monitor cpu,pss,upflow,downflow,battery--es pkg com.example.test--es Interva L 5
ADB shell am broadcast-a changedir--es savedir handtest
Monitor: Monitored objects (CPU, PSS memory, upload traffic, download traffic, battery)
PKG: Package Name
Interval: interval (seconds)
3. End Monitoring
ADB shell am broadcast-a monitorfinish
4. View data files
The data exists in the external storage space of Android (generally referred to as the/sdcard directory)
For example:
/sdcard/androidpropertytool/xxx/handtest/cup.txt
/sdcard/androidpropertytool/xxx/handtest/pss.txt
/sdcard/androidpropertytool/xxx/handtest/upflow.txt
/sdcard/androidpropertytool/xxx/handtest/downflow.txt
/sdcard/androidpropertytool/xxx/handtest/battery.txt
/sdcard/androidpropertytool/xxx/handtest/cpusystem.txt
/sdcard/androidpropertytool/xxx/handtest/psssystemleft.txt
where "XXX" is the package name of the app being tested.
Note: The old data file is saved in a time-stamped directory, for example:
/sdcard/androidpropertytool/xxx-2014-08-01-14-43-43-029/handtest/cpu.txt, if not required, please delete it manually.
Automated acquisition of application performance data using ADB in the Android system