📜 ⬆️ ⬇️

A story about making friends with the Nexus Player (FUGU) and the Intel Mobile Development Kit

The Intel Mobile Development Kit for Android contains many useful tools for developing and optimizing applications. In order to take full advantage of them, creating programs for the Nexus Player, you need to make some changes to the firmware of the device.



There are various working environments and tools for Android development. In addition, they are constantly evolving. Therefore, we have tried to make this guide universal. Here are recommendations and links to the necessary resources that will allow everyone to prepare the Nexus Player to work with Intel MDK. We conducted tests using the following devices and programs:


It should be noted that the factory image of the LMY47D system should be easily stitched onto any Nexus Player that can be taken in the store. Below we consider the situation in which you may need this opportunity.
')

Building a boot image with root-rights


In order to use all the features of the Intel Mobile Development Kit (Intel MDK) on the Nexus Player, you must have root access to it. You can get access by self-assembling the boot.img image and flashing it onto the device. Although during the preparation of boot.img, the system.img and recovery.img images are also created, they do not interest us, since in order to prepare the Nexus Player to work with MDK, it is enough to work on boot.img.

You can find instructions on how to set up the environment for assembling an image, as well as on downloading its source code, using source.android.com .

Following the guide provided on the above resource, we found the most recent branch of the code, switched to it and completed the build. At the time of this writing, it was the LMY47D branch, or android-5.1.0_r1 for the FUGU device. As soon as the working environment is prepared, to build the image we need the following sequence of commands:

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 

Please note that the lunch command can be run without parameters, then the configuration is performed through the menu. This may be necessary for later versions of the kernel, and it is very likely that the launch keys for lunch might change. The most important thing when you run this command is, firstly, the build is for the FUGU device, and secondly, the use of the USERDEBUG parameter.

If everything is done correctly, then at this stage several files will be created, located in the out / target / product / fugu / folder. Among them is the one that we need - boot.img.

Getting root rights on Nexus Player


Now that the boot image build is complete, it needs to be flashed to the device. Connect the Nexus Player to your computer using USB and turn it on. Make sure with the help of the adb devices command that the system recognized it. If after executing this command it turns out that ADB does not see the Nexus Player, this usually means that the option of debugging via USB is disabled in the developer’s settings on the device. To continue the work it must be enabled.

Now we have to perform a fairly simple sequence of commands - and the newly created image will be flashed to the device.

 adb reboot bootloader fastboot oem unlock fastboot flash boot out/target/product/fugu/boot.img fastboot oem lock fastboot continue 

Nexus Player is ready to go!


Now everything is ready to work with the Nexus Player using the tools of Intel Mobile Development Kit. In particular, after successfully completing the above steps, you will be able to:


If something went wrong ...


If during the work something went wrong, or you, after experiments, want to return the device to the factory state, in which root-rights are not granted, you can do it. Factory images for Nexus Player are here . There are also simple and clear instructions for reflashing. In fact, at the beginning of work on this material, Android 5.0 was installed on our device. However, the behavior of the system did not suit us, so the Nexus Player was upgraded to Android 5.1.0 using the LM47D factory image. After that, everything we needed worked like magic.

Results


If you want to optimize your Android applications for the Nexus Player, now you have everything you need to unlock the potential of this device using the Intel Mobile Development Kit.

Source: https://habr.com/ru/post/266927/


All Articles