Intel® Developer Zone offers tools and how-to information for cross-platform app development, platform and technology information, code samples, and peer expertise to help developers innovate and succeed. Join our communities for Android, Internet of Things, Intel® RealSense™ Technology, and Windows to download tools, access dev kits, share ideas with like-minded developers, and participate in hackathon’s, contests, roadshows, and local events.
Android development tools and environments are in a constant state of flux, an attempt has been made here to provide sufficient links to reference material to enable one to accomplish the desired results using a different setup, however this is the configuration used for this walkthrough.
- Commercially purchased FUGU device with Android 5.1.0 image LMY47D*
- Linux system running Ubuntu 12 with internet access
*Factory image 5.1.0 LMY47D should be flashable to any commercially purchased FUGU device
In order to enable full functionality of the MDK tools it is necessary to have root access to the device, which requires building the boot.img image yourself. Although the steps included will also result in building a system.img and recovery.img these appear to be unnecessary at this time for getting the MDK tools working.
Follow the instructions for initializing the build environment and downloading the source as located on the source.google site: http://source.android.com/source/downloading.html
As suggested per the instructions I located the latest branch for checkout and build, which at the time was LMY47D or android-5.1.0_r1 for the fugu device. So once all appropriate packages are installed the pertinent command sequence from within the directory where you wish to build the source code is:
- repo init -u https://android.googlesource.com/platform/manifest -b android-5.1.0_r1
- repo sync -j5
- source build/envsetup.sh
- lunch full_fugu-userdebug
- make -j8
Note that the lunch command may also be run without parameters and the appropriate option selected from the menu, this may be necessary for later kernel versions and the keyword is likely to change. Of importance is that you are building a FUGU device, and you want a USERDEBUG build option.
At this point hopefully the build is successful and there should be several files including the needed boot.img file in the out/target/product/fugu/ directory.
Now that you have build a boot image it's necessary to flash it onto the device. Connect it via a USB cable and turn it on, then verify your connection with "adb devices" to ensure your device is listed. If not then you may need to turn on developer options in your existing image and enable USB debug.
At this point a fairly simple sequence of commands should enable you to flash your new boot image to the device.
- adb reboot bootloader
- fastboot oem unlock
- fastboot flash boot out/target/product/fugu/boot.img
- fastboot oem lock
- fastboot continue
You are now ready to go! You should be able to:
- Use your device like normal as though it were just out of the box
- Connect via adb and utilize "adb root" to have root access visibility to the device
- Run Intel® VTune™ Analyzer with Energy Profiler
If something should go wrong, or perhaps you simply wish to return your device to a factory default un-rooted image this is possible as well. Factory images are located here: https://developers.google.com/android/nexus/images and include instructions and run scripts for as simple a process as can be imagined. In fact the device I used to develop these instructions came with Android 5.0 with which this process did not work as desired, but by using these factory images I updated it to 5.1.0 (LMY47D) and then the procedure worked like a charm.