The object of this exercise is to get a Hello World app running on a DragonBoard 410c that has the Android OS install, as supplied by the manufacturer. The overarching context for this is that this activity is part of the Yellow Brick Road to running Windows 10 IoT-Core on the device as an IoT using Azure as connectivity medium. My background is not Android. I don’t have an Android phone. My background is the Microsoft software stack top to bottom; particularly the bottom. Whilst I have many blogs on Windows Embedded Compact/CE, Windows 10 IoT-Core and Windows Universal App development, I am a newbie to Android. So my observations through the trials and tribulations in getting setup for Android app development, and deploying such are through the eyes of a novice (but a novice who knows what to look for!).
This blog will cover getting the development environment set up on a Windows 10 development machine. It also covers (an issue I wrestled with for some time) getting the target connected to the development machine. The second blog in this sequence will cover app development and deployment. Given my Windows background, it might have made sense to do the app development in Xamarin, the cross platform .NET app development environment for which you can simultaneously develop code for Windows, Android and Apple. You can also code in Visual Studio and deploy to an Android device. That will be the topic of a subsequent blog as I wish in this first instance to use the generic Android develop environment (Android Studio). I will then cover Android specific development in Visual Studio (2013) using a plugin. The hard part of the installation is getting ADB set up.
The DragonBoard 410c (Developer)
DragonBoard 410c (96Boards)
Java SE Development Kit 8
Video of Android Studio installation
Target System: Windows 10 Build Version 1511I used a “clean” system: New OS installation. No Visual Studio installation prior to starting this setup.
1. Install Java SE Development System (Choose 64 bit version if using a 64 bit system)One suggestion is to install JDK such that it doesn’t have spaces in its path (ie Old DOS 8.3 format)
2. Add a new environment variable: JAVA_HOME that points to your JDK folder, eg C:\Program Files (x86)\Java\jdk1.8.0_91Find it under C:\Program Files (x86)\Java or C:\Program Files\Java
3. Check the system environment variable Path. Add C:\ProgramData\Oracle\Java\javapath if not already there.
4. Also add “%JAVA_PATH%\bin to the Path at start if not there.
5. At a command prompt enter javac –version. It should reflect the JDK version
6. Download and start the Android Studio installation. Take the defaults. Also, take note of the SDK location (for later).
7. Launch Android Studio, take defaults. It will download various additional components.
8. Install ADB, the Android Debug Bridge (as follows) which is required for connecting to an Emulator or device. I did not install any emulators as my target (older) system does not support hardware virtualisation as needed for emulation.
9. Also need a path to ADB for command line operations. - Add an environment variable for the Android SDK: eg ANDROID_SDK C:\Users\Me\AppData\Local\Android\sdk\ - Add the following to the path: %ANDROID_PATH%\platform-tools
UPDATE:Here are the Java environment settings for a new install on another 64 bit PC.
At the Java install the JDK path was:
More installation images:
To deploy an app developed in Arduino Studio (and other development contexts) you need to connect the board’s OTG (Micro USB) to the development machine (where Arduino Studio is installed). (Remember that you can’t use the USB Host on the board if you are using the OTG port). When you plug the board in in this manner, a driver is needed on the host end which wasn’t installed after I had installed the Arduino Studio on my Windows 10 PC.
Connect up an Android DragonBoard 410c to the development system (running) and power up the DragonBoard. Open Device Manager and you will see three entries for Android requiring a driver. Examine the drivers’ properties, in particular the VID and PID. You will see:
We need a suitable driver for this.
Update: Not sure what happened but later on these became PID 9092 :
This happened after I turned debugging off on the device then back on ????.
The driver you need is Google USB Driver.
When in place it should be located at <sdk>\extras\google\usb_driver\ where <sdk> is the root location of the Arduino SDK. This location can be used by Device Manager to install the driver when the driver is in place. The SDK is installed as part of the Studio but there are many optional components including this driver. In the root of the SDK is a tool that can action the download of optional components.
To determine the root location:
Get the driver
%CompositeAdbInterface% = USB_Install, USB\VID_05C6&PID_9091&MI_00
%CompositeAdbInterface% = USB_Install, USB\VID_05C6&PID_9091&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_05C6&PID_9091&MI_02
%CompositeAdbInterface% = USB_Install, USB\VID_05C6&PID_9091&MI_03%CompositeAdbInterface% = USB_Install, USB\VID_05C6&PID_9092&MI_00%CompositeAdbInterface% = USB_Install, USB\VID_05C6&PID_9092&MI_01 %CompositeAdbInterface% = USB_Install, USB\VID_05C6&PID_9092&MI_02 %CompositeAdbInterface% = USB_Install, USB\VID_05C6&PID_9092&MI_03
You can now install the install the device driver for one of the Arduino devices (I just did the first one) from Device Manager by browsing to <sdk>\extras\google\usb_driver folder and by selecting that folder. (Update Driver (Right Click) after selecting the device, then choose Browse my computer …
BUT you run into an error saying:“The hash for the file is not present in the specified catalog file”.
This means the driver is unsigned (at least not recognised) and so you need to permit unsigned driver installation. That has to be enabled at boot time. Normally you do this only as a temporary measure, although comments indicate you can do it permanently (not recommended). Also comments indicate you can enable it from an Admin command line using bcdedit but I found that didn’t work. The following is how to do it in Windows 10 as a one-time boot option:(Ref: http://www.technipages.com/enable-disable-device-driver-signing )
A menu will appear where you can press “7” on your keyboard to choose “Disable driver signing enforcement“.
Now Device Driver Signing should be disabled, allowing you to install any driver you like in Windows 10 until you reboot. You can now complete the Google USB Driver installation.
I only installed one driver and rebooted the dev PC. On inspect in Device Manager I noted:
Next: Android Studio App Development
Just a note that I came back here and followed my instructions and got this working on another system. Will blog about creating an app next in Android Studio that lists the number of sensors that have a driver loaded on the system.