Set Up Android* System
When using the VTune Profiler to collect data remotely on a target Android device, make sure to:
For hardware event-based sampling, gain a root mode adb access to the Android device.
Optionally, do the following:
To view functions within Android-supplied system libraries, device drivers, or the kernel, get access from the host development system to the exact version of these binaries with symbols not stripped.
To view sources within Android-supplied system libraries, device drivers, or the kernel, get access from the host development system to the sources for these components.
Configure an Android Device for Analysis
To configure your Android device, do the following:
Allow Debug connections to enable adb access:
Select Settings > About <device>.
Tap Build number seven times to enable the Developer Options tab.
Select the Settings > Developer Options and enable the USB debugging option.
Path to the Developer Options may vary depending on the manufacture of your device and system version.
Enable Unknown Sources to install the VTune Profiler Android package without Google* Play. To do this, select Settings > Security and enable the Unknown Sources option.
Gain ADB Access to an Android Device
VTune Profiler collector for Android requires connectivity to the Android device via adb. Typically Android devices are connected to the host via USB. If it is difficult or impossible to get adb access to a device over USB, you may get adb over Ethernet or WiFi. To connect ADB over Ethernet or WiFi, first connect to Ethernet or connect to a WiFi access point and then do the following:
Find the IP Address of the target. The IP address is available in Android for Ethernet via Settings>Wireless&Networks>Ethernet>IP Address or for Wi-Fi via Settings>Wireless&Networks>Wi-Fi><Connected Access Point>>IP Address.
Make sure adb is enabled on the target device. If not enabled, go to Terminal App (of your choice) on the device and type:
> su > setprop service.adb.tcp.port 5555 > stop adbd > start adbd
Connect adb on the host to the remote device. In the Command Prompt or the Terminal on the host, type:
> adb connect <IPAddres>:5555
Gain a Root Mode ADB Access to the Android Device
For performance analysis on Android platforms, you typically need a root mode adb access to your device to:
Install and load drivers needed for hardware event-based sampling.
Enable the Android device to support Java* analysis.
Run hardware event-based sampling analysis.
There are several analysis types on Android systems that do NOT require root privileges such as Hotspots Analysis (user-mode samplingmode) and Perf*-based driverless sampling event-based collection.
Depending on the build, you gain root mode adb access differently:
User/Production builds : Gaining root mode adb access to a user build of the Android OS is difficult and different for various devices. Contact your manufacturer for how to do this.
Engineering builds : Root-mode adb access is the default for engineering builds. Engineering builds of the Android OS are by their nature not "optimized". Using the VTune Profiler against an engineering build is likely to result in VTune Profiler identifying code to optimize which is already optimized in user and userdebug builds.
Userdebug builds : Userdebug builds of the Android OS offer a compromise between good results and easy-to-run tools. By default, userdebug builds run adb in user mode. VTune Profiler tools require root mode access to the device, which you can gain via typing adb root on the host. These instructions are based on userdebug builds.
Use the Pre-installed Drivers on the Target Android System
For hardware event-based sampling analysis, the VTune Profiler needs sampling drivers to be installed. On some versions of Android systems, including most of the Intel supplied reference builds for SDVs, the following drivers are pre-installed in /lib/modules or /system/lib/modules :
Hardware event-based analysis collectors:
Typically having pre-installed drivers is more convenient. You can check for pre-installed drivers by typing:
adb shell ls [/lib/modules|/system/lib/modules]
If the drivers are not available or the version does not match requirements, consider building and installing the drivers.