Intel® VTune™ Amplifier XE and Intel® VTune™ Amplifier for Systems Help

Preparing a Target Android* System for Energy Analysis

Note

Energy analysis with the Intel® SoC Watch data collector is available for target Android*, Windows*, or Linux* devices and provided only with the Intel® VTune™ Amplifier for Systems.

When using VTune Amplifier for Systems to collect energy data on a target Android device, make sure to:

Build the Device Drivers

Complete the following steps if the Intel SoC Watch device drivers are not already installed on the OS image:

  1. Extract the system_studio_target.tgz package to the host system used to build the target system's Android kernel.

    By default, the package can be found in the following location: /opt/intel/system_studio_<version>/targets/system_studio_target.tgz

  2. Navigate to the following location: <extract_dir>/system_studio_target/socwatch_android_<version>/soc_perf_driver/src
  3. Run the build driver script with the following command:

    > sh ./build-driver
  4. Navigate to the following location: <extract_dir>/system_studio_target/socwatch_android_<version>/socwatch_driver
  5. Run the build driver script with the following command:

    > sh ./build-driver -k <kernel_build_dir>

    Where the <kernel_build_dir> is the local Android lib/modules directory produced while building the Android kernel. The -k option is not required if the DEFAULT_KERNEL_BUILD_DIR is properly set in the build_driver script.

  6. Sign the driver using the sign-file script found in the kernel/gmin/scripts directory using the following command, replacing the 2.x with the appropriate Intel SoC Watch version:

    > .../sign-file sha512 signing_key.priv signing_key.x509 .../socwatch2_x.ko

Install the Intel SoC Watch Collector

Complete the following steps to install the Intel SoC Watch collector:

  1. Connect the host system to the target system via adb.
  2. Navigate to the following location: <exract_dir>/system_studio_target/socwatch_android_<version>
  3. Run the socwatch_android_install.sh file to install the Intel SoC Watch executables in the /data/socwatch directory on the target Android system.

Load the Device Drivers

Complete the following steps to load the device drivers on the target Android system:

  1. Connect the host system to the target system via adb.
  2. Run the following adb commands to start a shell with root privileges:

    > adb root

    > adb shell

  3. Navigate to the /lib/modules directory, which contains the drivers you installed.

  4. Load the latest version of the socperf driver using the following command:

    > insmod socperf<version>.ko
  5. Load the socwatch driver using the following command, replacing the 2_x with the appropriate Intel SoC Watch version:

    insmod socwatch2_x.ko
  6. Run the following command to confirm that the drivers loaded successfully:

    > lsmod

See Also