For more detailed information coming from Intel Developer Forum 2015, go here:
IDF2015 Lab Notes: Getting your Nexus Player from shrink-wrap to Performance and Energy Analysis
Intel® SoC Watch is a command line tool for monitoring system behaviors related to power consumption on Intel® architecture-based platforms. It monitors power states, frequencies, bus activity, wakeups, and various other metrics that provide insight into the system’s energy efficiency.
After data collection, a summary file and raw data are produced by default on target system. The raw data (sw1) can be import to Intel Energy Profiler which is the same GUI as VTune Amplifier to correlate and visualize the system behavior over time. The summary file (csv) can be opened by Excel and make difference metric into graph for easier analysis.
Grant root permission from Nexus player
Nexus player is already release to market. The analysis tool need to grant the root permission performance data through kernel driver. You can follow this video tutorial steps: Nexus Player – How to Root Android TV in order to grant root permission. Once you have root permission, the device can recognize the su command in adb shell.
Rebuild kernel and kernel configuration for Nexus player
Google disabled the module upload function in kernel configuration. For this reason, we need to download the kernel source from Google official website and rebuild the kernel only based on our customize config after modifying modify the kernel configuration.
Step1. Download the kernel source from Google official website
Step2. The kernel configuration must be configured with enabling the following options.
- CONFIG_X86_ACPI_CPUFREQ=m (or CONFIG_X86_ACPI_CPUFREQ=y)
Step3. After build the kernel, the kernel file will be found under < INSTALLATION_DIR_PATH >\x86_64\arch\x86\boot\bzImage
Step4. Build boot image with pre-built kernel
For Intel platform device, sometimes only flash kernel partition will be failed. Therefore, we will build one boot image with our pre-built favorite kernel inside. For this purpose, we can put the pre-built kernel inside the Android source tree and build the boot image only.
For quick solution, we use the unpack/repack boot image script to build the boot image which is Android Image Kitchen. First you can download the factory image from Google developers. After use unpackimg.bat to extract the boot.img and the replace the < INSTALLATION_DIR_PATH >\split_img\boot.img-zImage with the bzImage you built before. At the end, using repackimg.bat to repack the new boot.img.
NOTE: Once your device can’t reboot anymore due to wrong flash instruction, you can plug off and on the power and long-press the hard key to make it run into fastboot mode. And then, using flash-all.bat script which is include in the factory image you download from Google developers to flash all images and recovery it.
Step5. Flash the new boot.img to the device.
adb reboot bootloader
fastboot flash boot boot.img
Now, you can check the kernel version to see if the flash is success or not. If so, we can start to build the SoCWatch driver based on this kernel source.
Build the SoCWatch driver
The driver source is included in SoCWatch package which you can download from Intel® System Studio. The SoCWatch is one of components in Intel® System Studio.
Step1. Build socperf1_2.ko via build driver script in < INSTALLATION_DIR_PATH >\soc_perf_driver\src\
Step2. Build SOCWATCH1_5.ko via build driver script < INSTALLATION_DIR_PATH >\socwatch_driver\lxkernel\
sh ./build-driver –k <KERNEl_BUILD_DIR> -s <KERNEl_BUILD_DIR>
Setup SoCWatch environment
You can execute the installation file (socwatch_android_install.bat) after grant root permission via adb root command. However, we can’t easily make adb run in root default. For this situation, we set up the SoCWatch environment step by step.
First step is to navigate to the SoCWatch directory and copy the necessary files into device. For this device, we only can push those files to sdcard location and then copy to /data/socwatch
adb push socwatch /sdcard/socwatch/
adb push setup_socwatch_env.sh /sdcard/socwatch/
adb push libs /sdcard/socwatch/libs/
adb push valleyview_soc /sdcard/socwatch/valleyview_soc/
adb push tangier_soc /sdcard/socwatch/tangier_soc/
adb push anniedale_soc /sdcard/socwatch/anniedale_soc/
adb push socperf1_2.ko /sdcard/socwatch/
adb push SOCWATCH1_5.ko /sdcard/socwatch/
cp –r /sdcard/socwatch /data/
chmod 766 socwatch
At the end you can refer the User Guide (see in attachment) for instructions to collect data. Once you got your output data after the data collection, you can pull the result file and have insight/analysis the target system with collected performance data in the host system.
For more such Android resources and tools from Intel, please visit the Intel® Developer Zone
Other Popular Deals
- The 10 best job hunting apps on AndroidTop 10 Android launchers worth trying out (2016)
- The 10 scariest horror games on AndroidAndroid app stores: 5 best alternatives to Google Play Store
- Best Android apps for rooted devices18 apps for a memorable Valentine's Day
- Top 15 Android games that you should playThe 20 best looking games for mobile phones
- 8 Android apps to tickle your funny bone17 must have apps for any Android device (plus alternatives)
- 5 apps to get the Android Lollipop look on your smartphoneTake control of your Android device with these apps
- 7 weird and strange apps for your Smartphone10 neat Google apps you may not know of
- 10 essential Indian apps for Android devicesPerfect Viewer