Set Up Android* System
- 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
- Allow Debug connections to enable adb access:
Path to theDeveloper Optionsmay vary depending on the manufacture of your device and system version.
- SelectSettings>About <.device>
- TapBuild numberseven times to enable theDeveloper Optionstab.
- Select theSettings>Developer Optionsand enable theUSB debuggingoption.
- EnableUnknown Sourcesto install theVTuneAndroid package without Google* Play. To do this, selectProfilerSettings>Securityand enable theUnknown Sourcesoption.
Gain ADB Access to an Android Device
- Find the IP Address of the target. The IP address is available in Android for Ethernet viaSettings>Wireless&Networks>Ethernet>IP Addressor for Wi-Fi viaSettings>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
- Install and load drivers needed for hardware event-based sampling.
- Enable the Android device to support Java* analysis.
- Run hardware event-based sampling analysis.
- 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 theVTuneagainst an engineering build is likely to result inProfilerVTuneidentifying code to optimize which is already optimized in user and userdebug builds.Profiler
- 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.VTunetools require root mode access to the device, which you can gain via typingProfileradb rooton the host. These instructions are based on userdebug builds.
Use the Pre-installed Drivers on the Target Android System
- Hardware event-based analysis collectors: