Android Tools for Nitrogen Platforms on Windows10

Published on March 3, 2021

Android DeveloperIt has been a long time since our last post about Android Tools support on Windows. Since then most people have moved to Windows 10 which is more secure and therefore doesn't allow us to install unsigned drivers easily. This blog will provide a simpler method to install those tools on the latest Microsoft OS.

Android Tools installation

First, here is a quick reminder what the Android tools are about:
  • fastboot is a tool used to flash an OS into your device
    • Requires the platform to be in fastboot mode
    • That fastboot mode is available from U-Boot in our case
    • It can flash any type of OS (not only Android)
    • The platform must be connected to your PC via a USB cable
  • adb (Android Debug Bridge) is a tool to access/debug your OS
    • Adb access is available on all our Android images
    • It is also accessible in our Buildroot images
    • The tool can be used to get to the device terminal, push/pull files or even debug your app
    • The platform must be connected to your PC via a USB cable

Get and install latest tools from Google

Download the latest Platform Tools that Google provides: Once downloaded, you can extract the archive to the path of your choosing, for this blog it will be located inside C:\Android\platform-tools.

Update the PATH environment variable

After the previous section, you should already be able to start adb.exe and fastboot.exe. However this requires you to type the full path every time (C:\Android\platform-tools) which isn't convenient. Fortunately, Windows allows you to update the PATH environment variable to add this folder to it: Once the C:\Android\platform-tools path has been added, you will be able to call adb or fastboot from any folder in the Windows Command Prompt (cmd).

Fastboot driver installation

Now that the tool is installed, let's take a look at the driver needed for Windows to recognize the platform.

Get your platform into Fastboot mode

Some platforms, like Nitrogen8M or Nitrogen8MP, have a button labeled "Fastboot" which you can simply press while powering up the platform to enter the fastboot mode. Otherwise, in the U-Boot prompt, you can enter: => fastboot 0 At this stage you can connect your platform to your Windows machine with a USB cable.

Install Google ADB driver (optional)

You can get the latest driver directly from Google: Unzip this archive to the location of your choice, for this post it will be under C:\Android\usb_driver\. Then go to that folder, select android_winusb.inf and do righ-click > Install, then select Install again.

Select the driver in Device Manager

Go into your Windows Device Manager, you should see an unrecognized device named "USB download gadget". Right-click on it and select "Update Driver". Next, select "Browse my computer for driver software". At this point, click on "Let me pick from a list of available drivers on my computer". If it asks for the type of device you are installing, select "Universal Serial Bus devices". Finally, select the following driver: "WinUsb Device" / "ADB Device" and accept the warning that the driver originally doesn't recognize this device (due to different PID). At this stage, the device should appear as properly installed, still as "USB download gadget". All set, you can now use fastboot from a command prompt!

Use Fastboot to flash your device

First make sure that the tool recognizes your device using Windows Command Prompt (cmd): Then, if you want to flash Android for instance, you can execute the .bat file provided in our release archive:

ADB driver installation

Now that your device is flashed, you can try accessing its terminal using ADB.

Select the driver in Device Manager

Just like for fastboot, go into your Windows Device Manager, you should see the device already appearing as recognized platform. Or as: If not, please make sure to do the same procedure as fastboot above:
  1. Right-click on it and select "Update Driver".
  2. Select "Browse my computer for driver software".
  3. Click on "Let me pick from a list of available drivers on my computer".
  4. If it asks for the type of device you are installing, select "Universal Serial Bus devices".
  5. Select the following driver: "WinUsb Device" / "ADB Device" and accept the warning
 

Use ADB to access your device

Still using the standard Windows Command Prompt (cmd): That's it! You can now enjoy accessing / debugging your platform using Android Tools from your Windows machine.