Knowledge Base & Forum/Forums/General Information

NOOK Developer Start Up Guide

ghoffer
posted this on August 29, 2012 09:53 AM

Last Update: 1 June 2013

Latest Changes: See Change Log

This guide describes how to install and test apps on the NOOK Emulator and on NOOK devices.

Contents

See Also: NOOK Developer Reference Guide, NOOK App Curation Guide, NOOK App Submission Guide

Important   The NOOK HD and NOOK HD+ have different screen formats than the NOOK Tablet and NOOK Color. For more information, see Display Density and System and Status Bar Sizes in the NOOK Developer Reference Guide.

 

1.0 Introduction

Quick Reference:
1.1 Request NOOK App Developer Access
1.2 Contacting NOOK App Support
1.3 Software Requirements
    1.3.1 General Requirements
    1.3.2 NOOK Device APIs
    1.3.3 NOOK Device Features
    1.3.4 NOOK Emulator Requirements
1.4 Task Checklist
Next:
2.0  Preparing Your Development Environment
3.0  Using the NOOK Emulator
4.0  Sideloading Apps

This guide helps you set up your computer to run the NOOK emulator and sideload (directly install) apps you create to the NOOK device. This guide is for developers and those wanting to understand the NOOK app development process.

For information about developing apps on a NOOK device, log into the NOOK Program Portal, and see Advice on qualifying and submitting apps as a NOOK App Developer.

This guide is for the NOOK HD, NOOK HD+, NOOK Color, and NOOK Tablet, and applies to Windows and Mac OS. Linux users should read Ubuntu Linux: Getting ADB working.

The NOOK provides an Android SDK Add-on to help you get started developing applications for NOOK devices.

The NOOK devices support the following Android SDK platforms:

  • NOOK HD & NOOK HD+ -- Android 4.0.3 (Ice Cream Sandwich) - API Level 15
  • NOOK Tablet -- Android 2.3.3 (Gingerbread) - API Level 10
  • NOOK Color -- Android 2.2 (Froyo) - API Level 8

Power Users:  If you want to start sideloading apps as soon as possible, Install Java, Install Android SDK, and Install NOOK SDK Add-on. Then skip to Add NOOK Device ID for ADB Access and complete the steps from that section.

Back to Top

1.1 Request NOOK App Developer Access

Before you can submit apps for the NOOK, you need to obtain NOOK App Developer status. Log on to the NOOK Developer site (http://www.nookdeveloper.com). To become a NOOK App Developer, click Register Now.

register_now_small.png

Click Get Approved.

get_approved_small.png

Complete the NOOK App Developer Qualification Form and click Submit Qualification Form. The NOOK submission team notifies you by email when you qualify.

Back to Top

1.2 Contacting NOOK App Support

For problems or questions, contact Developer Support:

https://nookdeveloper.barnesandnoble.com/support/support.html

You can also contact Developer Support using Twitter at @NOOKDeveloper. See http://twitter.com/nookdeveloper for more details.

NOOKAppsTweet.png

To supply a screenshot from your NOOK device:

  1. Hold and release the NOOK button and the Volume-down (-) button for approximately 1 to 2 seconds.
  2. On NOOK Tablet & NOOK Color, the Screenshot Captured notification appears at the bottom of screen if the screenshot succeeds. On NOOK HD & NOOK HD+, the screen flashes and a reduced image of the screen displays briefly.
  3. Connect the USB cable from your NOOK device to your computer.
  4. In Windows, open the NOOK device from AutoPlay > Open folder to view files, in Mac OS, use Finder.
  5. On the NOOK Color and Tablet, copy the screenshot from the Screenshots directory on the NOOK device. On the NOOK HD and NOOK HD+, copy the screenshot from the Pictures > Screenshots directory.
Note If you can't get a screenshot from the device, use the Android DDMS utility which you can run from the command line or from Eclipse. When DDMS starts, select the NOOK device, and press CTRL+S to take the screen capture.

Back to Top

1.3 Software Requirements

Topics:

1.3.1 General Requirements

  • Request NOOK App Developer Access to submit apps to NOOK Developer.
  • For problems or questions, contact Developer Support at https://nookdeveloper.barnesandnoble.com/support/support.html. You can also tweet Developer Support at @NOOKDeveloper. See http://twitter.com/nookdeveloper.
  • Ensure your computer can install the Android SDK. For more information, see Verify Environment for Android SDK.
  • Ensure that your APK does not have a debug certificate - ensure that the test command displays "Debug Cert Not Found":
    Windows: Run this command from a command prompt: cmd /c jarsigner --verify --verbose --certs AppName.apk | findstr "CN=Android Debug" || echo Debug Cert Not Found
    Mac and Linux: Run this command from a terminal: jarsigner --verify --verbose --certs AppName.apk | if grep -q "CN=Android Debug"; then echo Debug Cert Found; else echo Debug Cert Not Found; fi
  • Ensure that your APK does not install from the SD external memory card - You should see "No Install to SD Card" if your app doesn't install from the SD card:
    Windows: Run this command: cmd /c aapt decode xmltree "apk\Conqu-7999-application.apk" AndroidManifest.xml | findstr "installLocation" | findstr "0x2" || echo No Install to SD Card
    Mac and Linux: aapt decode xmltree AppName.apk AndroidManifest.xml | grep installLocation | if grep -q "0x2"; then echo Installs to SD card; else echo No Install to SD Card; fi
  • Windows XP is not supported for developing apps on the NOOK HD & NOOK HD+.
    Use Vista, Windows 7, or Windows 8 instead.
  • Adobe Flash is required to use the provision tool at http://www.nookdeveloper.com.
  • For Windows development, you need Administrator rights to your computer.
  • For Windows, if you install software on an alternate drive from C:, adjust paths in this guide accordingly.

Back to Top

1.3.2 NOOK Device APIs

Back to Top

1.3.3 NOOK Device Features

The Android SDK supports features that may not be provided in a NOOK device:

  • Android Widgets: Supported on NOOK Tablet and NOOK HD and NOOK HD+. Not supported on NOOK Color.
  • Accelerometer: Supported on all NOOK devices.
  • Bluetooth: Only supported on NOOK HD and NOOK HD+.
  • Camera: Not supported on any NOOK device.
  • GPS: Not supported on any NOOK device.
  • HDMI: Only supported on NOOK HD and NOOK HD+.
  • LocationManager with GPS: Not supported on any NOOK device.
  • LocationManager without GPS: Only supported on NOOK HD and NOOK HD+.
  • Messaging (SMS/MMS): Not supported on any NOOK device.
  • Microphone: Supported on NOOK Tablet and NOOK HD and NOOK HD+. Not supported on NOOK Color.
  • Text to speech (TTS): Only supported on NOOK HD and NOOK HD+.

Back to Top

1.3.4 NOOK Emulator Requirements

  • In Android SDK Revision 21, two new issues affect NOOK device development:
    • When you download the NOOK SDK Add-on, you now need to install the extra package, NOOK Device Definitions. For information see Install NOOK SDK Add-on.
    • You can only start the NOOK Emulator from the command line by specifying the skin name and the skin directory. Currently there's an issue in the Android SDK where the Android emulator doesn't discover the skin directory. The result is that starting the emulator from the AVD Manager or Eclipse displays a generic emulator without skins. Only starting the emulator from the command line displays the correct skins for a NOOK device. For information on the command see Start the Emulator.
  • The NOOK Emulator provides an approximation of how an app appears on a NOOK device, for example button colors may differ from the actual device. We recommend that you use a NOOK device to test your app's actual appearance and functionality before submitting your app to the NOOK developer site for acceptance. We cannot guarantee that apps tested only on the emulator will function correctly on a NOOK device.
  • The emulator for NOOK Tablet, NOOK HD, and NOOK HD+ works differently depending on how you create the AVD. Windows 8, Mac OS, and Linux work best if you create the AVD from the command line and not from the AVD Manager. Windows 7 and XP work best if you create the AVD from the AVD Manager. Windows 7 and XP can only run the emulator with NOOK skins when run from the command line. This restriction doesn't affect Windows 8, Mac OS, or Linux.
  • Wi-Fi and Bluetooth are not supported on the NOOK Emulator. The NOOK Emulator is built on the Google Android emulator, which also doesn't support Wi-Fi or Bluetooth. For more information, see Debugging Wi-Fi in the Emulator and Emulator Limitations. The Wi-Fi Debugging article also provides a workaround.
  • The NOOK HD and NOOK HD+ have different screen formats than the NOOK Tablet and NOOK Color. For more information, see Display Density and System and Status Bar Sizes in the NOOK Developer Reference Guide.
  • The following elements of the NOOK platform are NOT in the emulator image: Apps, Library, Search, Settings, and the NOOK Details API.

Back to Top

1.4 Task Checklist

Use the following checklist to verify the steps in this guide.

Back to Top

 

2.0 Preparing Your Development Environment

This chapter helps you prepare your development environment to create an app for a NOOK device.

Important You need a NOOK App Developer account to submit apps for the NOOK. For more information, see Request NOOK App Developer Access.

Quick Reference:
2.1  Install Java
2.2  Verify Environment for Android SDK
2.3  Install the Android SDK
2.4  Install NOOK SDK Add-on
2.5  Set the PATH Variable
2.6  Install Eclipse and the ADT Plugin
2.7  Handling the NOOK "n" Button
2.8  Hardware Acceleration (NOOK HD & NOOK HD+ Only)
Next:
3.0  Using the NOOK Emulator
4.0  Sideloading Apps

Back to Top

2.1 Install Java

Install the Java Development Kit (JDK), which includes the Java Runtime Environment (JRE).

Android supports JDK 1.6. The current version is JDK 6 Update 35, available at:

http://www.oracle.com/technetwork/java/javase/downloads/jdk6u35-downloads-1836443.html

Download the version for your OS and double-click to install. Verify the Java version by typing java -version from the command line.

Java Environment Variables

After installing Java, add the path to the Java installation's bin folder to your PATH environment variable. If you're not sure how to set the PATH variable to the bin folder, copy the path to the bin folder to a text file and add it when you get to the section, Set the PATH Variable:

  • On a Mac, the default path to set in the PATH variable is /Library/Java
  • For 64-bit Windows, the default path is c:\Program Files\Java\jdk<version>\bin
  • For 32-bit Windows, the default path is c:\Program Files (x86)\Java\jdk<version>\bin

Important  We recommend that Windows developers also set the JAVA_HOME environment variable. Point JAVA_HOME to the JDK installation directory, for example, C:\Program Files\Java\jdk1.6.0_35

Back to Top

2.2 Verify Environment for the Android SDK

To ensure your computer meets the requirements for developing Android SDK apps:

Browse to http://developer.android.com/sdk/

Click System requirements.

clip_image004.png

Back to Top

2.3 Install the Android SDK

  1. Download the Android Software Development Kit (SDK) from http://developer.android.com/sdk/index.html.
  2. We recommend that you don't click Download the SDK, instead scroll down and click DOWNLOAD FOR OTHER PLATFORMS, scroll further down to SDK Tools Only and double-click the installation file for your operating system.
  3. Agree with the terms and conditions and start the download.

Windows:

  1. Double-click the .exe install file in your Downloads folder.
    Important  Click Install for anyone using this computer
    Click through the installation script and accept the defaults that display.
  2. After the install completes, start the SDK Manager:
    Windows 8: Locate the SDK Manager in the Metro menu at the far right, right-click the icon, and click Run as Administrator.
    Windows XP/ 7: Start > All Programs > Android SDK Tools. Right-click SDK Manager and click Run as Administrator - Important  Always run the Android SDK Manager as administrator.

    clip_image009.png

Mac OS:

  • After downloading the zip file, consider moving the zip file to another directory such as Users/<username>/android. This makes referencing the tool paths easier. Unzip the Android SDK zip file by double-clicking the zip file.

Ubuntu Linux:

  • After downloading the software distribution TGZ file, double-click the file to start Archive Manager. Select the file and click Extract. The default installation location is /home/user/Downloads.

All:

In the SDK Manager, click the installation checkboxes for the following components:

  1. Android SDK Tools and Android SDK Platform-tools.
  2. Android 4.0.3 for development on the NOOK HD and NOOK HD+: SDK Platform and Samples for SDK.
  3. Android 2.3.3 for development on the NOOK Tablet: SDK Platform and Samples for SDK.
  4. Android 2.2 for development on the NOOK Color: SDK Platform and Samples for SDK.
  5. When done, click the Install button. 

Back to Top

2.4 Install NOOK SDK Add-on

The NOOK SDK Add-on provides custom device features to emulate a NOOK device and to provide NOOK APIs for use in your code. Before installing the NOOK SDK Add-on, install Java and the Android SDK.

Note  Starting with Android SDK Revision 21, you need to also install the NOOK Device Definitions package from the Extras menu of the SDK Manager. For more information see the NOOK Device Definitions step.

The NOOK SDK Add-on uses the Android SDK Manager to download and install software. 

The steps to install the Add-on are:

  1. Start the Android SDK Manager
  2. Specify the URL for the NOOK SDK Add-on
  3. Complete the Installation

Back to Top

2.4.1 Start the Android SDK Manager

To install the NOOK SDK Add-on, first start the Android SDK Manager depending on your OS:

2.4.1.1 Windows

  1. Windows 8: Scroll across the Metro menu, right-click SDK Manager, and click Run as administrator.
    Windows 7/XP:
    Click Start > All Programs > Android SDK Tools.
    Right-click SDK Manager and click Run as administrator

     clip_image009.png
  2. In the Android SDK Manager window, click Tools > Manage Add-on Sites.

    clip_image011.png

2.4.1.2 Mac OS

  1. Open a Terminal (Finder > Go > Utilities > Terminal).
  2. Change directory to the tools directory where you unzipped the Android SDK software and type android
    If you did not set the Path variable, type: ./android
  3. In the SDK Manager, click Tools > Manage Add-on Sites.

    MacSDKManagerToolsMenu.png 

    Note  If you start the SDK Manager from Eclipse, the menu appears as Tools > Manage Add-on Sites.

    EclipsePackagesToolsMenu.png 

2.4.1.3 Ubuntu Linux

  1. Click Dash Home, type terminal, and open a terminal.
  2. Change directory to the tools directory where you unzipped the Android SDK software and type: ./android
  3. Mouse over the top bar to show the Packages and Tools menus for the Android SDK Manager, and click Tools > Manage Add-on Sites:

For more information on using Ubuntu Linux for NOOK device app development, see Ubuntu Linux: Getting ADB working.

Back to Top

2.4.2 Specify the URL for the NOOK SDK Add-on

All operating systems:

  1. In the Android SDK Manager - Add-on Sites window, click the User Defined Sites tab.

    UserDefinedSites.png
  2. Click New in the Add-on Sites window.
  3. In the Add-on Site URL window, type one of the following URLs and click OK:

    NOOK HD and NOOK HD+

    http://su.barnesandnoble.com/nook/sdk/nook_hd_addon.xml

    NOOK Color

    http://su.barnesandnoble.com/nook/sdk/addon.xml

    NOOK Tablet

    http://su.barnesandnoble.com/nook/sdk/Nook_Tablet_addon.xml

  4. Click Close in the Add-on Sites window. Android SDK manager downloads the NOOK device add-on packages from the URL you specify.

2.4.3 Complete the NOOK SDK Add-on Installation

  1. Locate the download from Android SDK Manager by scrolling down and looking for NOOK SDK under Android 4.0.3 (API 15) for the NOOK HD & NOOK HD+, NOOK Tablet under Android 2.3.3 (API 10), or NOOKcolor under Android 2.2 (API 8).

    clip_image002a.png
  2. Click the checkbox for each package to install.

    clip_image004_0000.png
  3. Click the Install button. 
  4. In the Choose Packages to Install window, ensure that each NOOK package displays with a green check mark. For each package, click the package name on the left, click Accept License, and click Install.

    PackagesToInstall.png

  5. Verify that each NOOK package installs. If successful, Installed appears on the same line as the package name in the Android SDK Manager.

    clip_image010.png

    Important  If Installed doesn't display and you're using Windows, ensure that you ran the SDK Manager as administrator. If not run as administrator, packages do not display as Installed even though all functionality appears to work.

  6. Check the box for NOOK Device Definitions package under Extras.

    NOOKDeviceDefinitions.png
  7. In the Choose Packages to Install window, click the package name on the left, click Accept License, and click Install.

Back to Top

2.5 Set the PATH Variable

Adding the SDK Tools folder paths to the PATH environment variable simplifies how you enter commands from the command line.

Mac OS

  1. Start a Terminal from Finder > Go > Utilities > Terminal.
  2. Change directory to where you unzipped the Android SDK zip file, and then change directory to the tools directory.
  3. Use the pwd  command to determine the exact path to where the tools directory resides on your computer.
  4. Update the PATH variable in the .bash_profile initialization file with the following command. 
    Important  Change <path_from_pwd_commnd> in this command to the path you got from the pwd command--Only execute this command once:

    echo -e '\nexport PATH=${PATH}:<path_from_pwd_commnd>/android-sdk-macosx/tools:<path_from_pwd_commnd>/android-sdk-macosx/platform-tools' >> ~/.bash_profile
  5. Quit the Terminal by typing Command+Q or clicking the dismiss button. The .bash_profile file is read when the Terminal starts, so it's important to restart the Terminal so the new PATH value is recognized.
  6. Start a new Terminal from Finder > Go > Utilities > Terminal.
    From the Terminal, start the SDK Manager by typing:   android
  7. If the Mac still reports an error for the android command, use these steps:
    1. From the Terminal, type: echo $PATH and then change directory to the last path (the one you just added).

      Example: View the PATH and then cd to the last path to ensure the path works:
      $ echo $PATH
      /usr/bin:/usr/sbin:/usr/local/bin:/Users/mymac/Downloads/Android/android-sdk-macosx/tools:Users/mymac/Downloads/Android/android-sdk-macosx/platform-tools
      $ cd Users/mymac/Downloads/Android/android-sdk-macosx/platform-tools
    2. If the cd command is successful, ensure that you exited and restarted the Terminal. If the command is not successful, edit the ~/.bash_profile file and fix the path.

Windows

  1. Open System Properties: Press Windows Key + r, type sysdm.cpl, and click OK.
  2. On the Advanced tab, click Environment Variables.

    EnvVars.png

  3. In the Environment Variables window.

    clip_image016.png

    1. Double-click Path under System variables.
    2. Click in the Variable value field and press the End button on your keyboard to move the cursor to the end of the field. Add the following text to the end of the Path field. The quotes are required to work correctly with the android command's batch file. The starting semicolon is required to separate the new information from the existing information:

      ;"C:\Program Files (x86)\Android\android-sdk\platform-tools";"C:\Program Files\Android\android-sdk\tools"

      If you installed the Android software in a non-default location, locate the folder, right-click the address bar, and click Copy address as text to get the folder name for the command.

      If you need to add the Java path to the Path variable, add one of these:
      For 64-bit Windows, add  c:\Program Files\Java\jdk<version>\bin
      For 32-bit Windows, add  c:\Program Files (x86)\Java\jdk<version>\bin

    3. Click OK to exit each window Edit window, Environment Variables, and System Properties.
  4. Dismiss the Control Panel Home window.
  5. If you have a command prompt open, close it, and restart the command prompt to access the Android commands. Run the Windows command prompt as Administrator before submitting Android commands.

Back to Top

2.6 Install Eclipse Classic

Note: You can also use another Eclipse package if it supports Java development.

After you install Eclipse, install the ADT Plugin.

  1. Install the Eclipse Classic package from: http://www.eclipse.org/downloads/

    clip_image002_0000.png
  2. Extract the zip file. In Windows, use a program such as 7zip from 7zip.org.
    In Mac OS, double-click the tar.gz download file. In both cases, the eclipse folder creates.
  3. Create a shortcut. In Windows, right-click the eclipse.exe file in the eclipse folder and click Pin to Taskbar and/or Pin to Start Menu.

    clip_image006.png

    In Mac OS, drag the Eclipse icon into the Dock.
  4. Start Eclipse. If you did not create a shortcut in Step 3, double-click the eclipse.exe file in the eclipse folder. Otherwise, start Eclipse in Windows from the Taskbar or Start Menu, or in Mac OS from the Dock.
  5. Specify a workspace. Use the default value or click Browse. You may want to locate the workspace in the Android software directory to keep the directory organized. Click the checkbox for Use this as the default and do not ask again. Click OK.

    clip_image008_0001.png

  6. Click Workbench to open Eclipse for use.

    clip_image010_0000.png

Back to Top

2.6.1 Install the ADT Plugin for Eclipse

Android development using the Eclipse IDE requires the use of the Android Development Tools (ADT) plugin. Installation instructions are available at http://developer.android.com/sdk/installing/installing-adt.html.

Note  If you installed another IDE other than Eclipse, you can skip this step. The ADT plugin is only required by Eclipse.

To install the ADT plugin:

  1. Start Eclipse and click Help > Install New Software. If you did not create a shortcut, double-click the eclipse.exe file in the eclipse folder. Otherwise, start Eclipse in Windows from the Taskbar or Start Menu, or in Mac OS from the Dock.

    HelpInstallNewSoftware.png
  2. Click Add.

    clip_image014_0000.png
  3. In the Add Repository window, type ADT Plugin for Name and the following URL for Locationhttps://dl-ssl.google.com/android/eclipse/

    clip_image016_0000.png
  4. Click OK.
  5. Click the checkbox for Hide items that are already installed.

    clip_image018_0000.png

    If the items in the Name field display All items are installed, no further action is needed: the ADT Plugin has already been installed. Click Cancel.

    If you don't see All items are installed, continue to the next step.
  6. Click Select All for the Developer Tools and Native Development Kit (NDK) Plugins which are part of the ADT Plugin.

    clip_image020_0000.png
  7. Click Next.
  8. After the installation completes, restart Eclipse. If you did not create a shortcut, double-click the eclipse.exe file in the eclipse folder. Otherwise, start Eclipse in Windows from the Taskbar or Start Menu, or in Mac OS from the Dock.
  9. Click Window > Preferences. In Mac OS, click Eclipse > Preferences
  10. Click Android in the left panel and specify the downloaded SDK Location by clicking Browse and navigating to the location of the android-sdk folder. Click OK.
    Windows - Default is C:\Program Files (x86)\Android\android-sdk

    clip_image022_0000.png

    Mac

    clip_image024_0000.png

  11. Locate the Android SDK folder:

    Windows:  Browse to the installed android-sdk folder and click OK. By default, this folder is at C:\Program Files (x86)\Android\android-sdk

    clip_image026_0000.png

    Mac OS:  Locate the android-sdk-macosx folder where you unzipped the Android SDK distribution, and click Open.

    clip_image028_0000.png

  12. In the Preferences window, click Apply and OK.

Back to Top

2.7 Handling the NOOK "n" Button

The behavior of the NOOK "n" is as follows:

  • NOOK Tablet and NOOK Color, inside an app, in fullscreen mode, code the app to handle the n button. The "n" key fires a back key event. Apps should have a main menu that gives users options such as pausing or to resume playing. The "n" key takes users to the main menu. Outside of fullscreen mode, the NOOK device takes users to the main device menu.
  • NOOK HD and NOOK HD+, inside an app, if a user presses the n button, control goes to the device's home screen. These devices do not have a true full screen mode in that the system bar always displays. For more information, see System and Status Bar Sizes in the NOOK Developer Reference Guide.

    Note  The NOOK HD and NOOK HD+ have a system tray that always displays at the bottom of the screen that provides soft buttons for Back, Search, and Recent apps. For more information, see System and Status Bar Sizes in the NOOK Developer Reference Guide.

2.8 Hardware Acceleration (NOOK HD & NOOK HD+ Only)

If your apps utilize the hardware acceleration features in the NOOK HD & NOOK HD+ chipset, using the manifest attribute  android:hardwareAccelerated="true" is allowed. For more information, see Android Hardware Acceleration.

Back to Top

 

3.0 Using the NOOK Emulator

This chapter describes how to run and operate the NOOK Emulator. The NOOK Emulator is built on top of the Android emulator and provides custom skins and device features. The NOOK Emulator uses Advanced RISC Machine (ARM) hardware emulation.

Important   See NOOK Emulator Requirements for information on NOOK Emulator limitations.

Quick Reference:
3.1  Procedure Overview
3.2  Create an AVD
    3.2.1 Create an AVD - Command Line
    3.2.2 Create an AVD - AVD Manager
3.3  Start the Emulator
    3.3.1 Start Emulator - Command Line
    3.3.2 Start Emulator - AVD Manager
    3.3.3 Start Emulator - Eclipse
3.4  Install an App on the Emulator
3.5  Operate the Emulator
3.6  HelloWorld App
3.7  Accessing the SD Card from the Emulator
Next:
4.0  Sideloading Apps

This section is not required to sideload an app to a NOOK Device. To get started copying an app to a NOOK device, proceed directly to Sideloading Apps.

Prerequisites To use the NOOK emulator, you need to Install Java, Install the Android SDK, Install NOOK SDK Add-on, Create an Android Virtual Device (AVD). To create the HelloWorld app, you also need to Install Eclipse and the ADT Plugin.

Back to Top

3.1 Procedure Overview

To display an app on the emulator:

  1. Install NOOK SDK Add-on, which uses the Android SDK Manager to download and install the NOOK SDK Add-on. Installation creates packages for each NOOK device you want to emulate.
  2. Create an Android Virtual Device (AVD), which maps a device name to a package ID value. The NOOK Emulator is an Android Virtual Device (AVD) that works with the NOOK SDK Add-on.
  3. Start the emulator, which runs in the background. See Start the Emulator.
  4. Use the adb command to install the APK file on the emulator. See Install App on the Emulator.
  5. Navigate in the NOOK Emulator to the Apps menu and test your app. See Operate the Emulator.

3.2 Create an AVD

The NOOK Emulator is an Android virtual device (AVD), which you can create from the command line or from the AVD Manager.

Windows 7/XP works best if you create an AVD from the AVD Manager and run the emulator from the command line. To get the NOOK skins to display, you must run the emulator and specify the skin name and the folder where the NOOK skins reside.

Windows 8, Mac, and Linux work best if you create an AVD from the command line. If you create an AVD from the AVD Manager, to get the NOOK skins to display, you need to run the emulator and specify the skin name and the folder where the NOOK skins reside. If you create the AVD from the command line, you can run the emulator from command line, AVD Manager, or Eclipse.

3.2.1 Create an AVD - Command Line

  1. Get a command prompt or terminal:
    Windows 7/XP:  Click Start > All Programs > Accessories. Right-click Command Prompt and click Run as administrator.
    Windows 8: See the Windows 8 Note for how to get a Command Prompt that's run as administrator.
    Mac OS:  Click Finder > Go > Utilities > Terminal.
  2. List the available targets: android list targets
    Windows
    If the android command displays Java command options, see Windows Path variable.
    Look for each NOOK device that you installed in Install NOOK SDK Add-on. The target for the NOOK HD & NOOK HD+ is listed as NOOK SDK. In the list of targets, the target ID is the id: value. In the following case for the NOOK Tablet, the target ID is 4:
    id: 4 or "Barnes and Noble:NOOK Tablet SDK:10"

    Name: NOOK Tablet SDK...

  3. Create an AVD: android create avd -n <name> -t <targetID>
    Where:
    <name>
    - Name for the AVD, such as HD, Color, or Tablet. This can be any name. Allowed characters are: a-z A-Z 0-0 . _ -
    <targetID>
    - A number, which depends on the ID value for the NOOK device obtained from the android list targets command.

Example:  android create avd -n Tablet -t 4

Back to Top

3.2.2 Create an AVD - AVD Manager

Note  For Windows 8, Mac, and Linux, we recommend that you only create an AVD from the command line.

To create an AVD, start the AVD Manager:

  1. Get a terminal or command prompt:
    Mac OS: Open a Terminal from Finder > Go > Utilities > Terminal.
    Ubuntu Linux: Get a terminal from Ubuntu Software Center - Search for terminal.
    Windows 8: Scroll across the Metro menu, right-click SDK Manager, and click Run as Administrator. Skip to Step 3.
    Windows 7: Click Start > All Programs > Android SDK Tools.
    Windows XP: Click Start > My Programs > Android SDK Tools.
  2. Mac OS:  Start the SDK Manager by typing:   android and click Manage AVDs.

    clip_image007.png

    Windows 7: Right-click AVD Manager and click Run as administrator, and click Yes at the Administrator prompt.
    Windows XP: Click Run as and then choose The following user: Administrator and provide the administrator password.

    clip_image005.png

  3. In the AVD Manager, click New.

    clip_image022.png

  4. Complete the form - Note  The form that follows is for Android SDK Revision 21. Older versions appear differently.
    • Specify a name for the AVD, the NOOK device type, the NOOK SDK target.
    • Uncheck Hardware keyboard present and Display a skin with hardware controls.
    • Set the Memory Options > RAM size to 512 MB.
    • Click OK.
    AVDCreateR21.png
  5. Click OK at the confirmation window.

Note If you are upgrading a Ubuntu Linux computer to Android SDK Revision 21 and want to delete existing AVDs, see this article at Stack Overflow: http://stackoverflow.com/questions/7978715/cant-delete-virtual-device-from-eclipse-android.

Back to Top

3.3 Start the Emulator

  • Windows 7/XP - Work best if you create an AVD with the AVD Manager and run the emulator from the command line.
  • Windows 8, Mac, and Linux - Work best if you create an AVD from the command line, and you can then run the emulator by any means. If you created the AVD from the AVD Manager, to get the NOOK skins to display, you must run the emulator from the command line.

Start the NOOK Emulator from:

3.3.1 Start Emulator - Command Line

Command Line Summary:

  • List Targets: Example: android list targets
  • Create Android virtual device (for use with the NOOK emulator):  
    • Syntax: android create avd -n AVD_name -t targetID
    • Examples:
      • android create avd -n Color -t 2
      • android create avd -n Tablet -t 4
      • android create avd -n HD -t 6
  • List AVDs: Example: android list avd
  • Install App on the NOOK emulator:
    • Syntax: adb install apk_name
    • Example: adb install test.apk


Windows

If you created the AVD as described in Create an AVD, the Memory options > RAM size was set to 512 MB and you do not need to specify the -memory 512 option on the command line. However if you created the AVD from the command line, add -memory 512 to the end of the emulator-arm command. If you don't specify the -memory command, this message displays: Failed to allocate memory: 8
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

To start the NOOK Emulator from the command line:

  1. Windows 7 or XP: Click Start > All Programs > Accessories. Right-click Command Prompt and click Run as administrator.
    Windows 8: See the Windows 8 Note for how to get a Command Prompt that's run as administrator.
  2. List available Android virtual devices with: android list avd
    Note  If the android command displays Java command options, see Set the PATH Variable > Windows.
  3. Start the emulator:
    Windows:
    NOOK HD:
    emulator-arm -avd <avd_name> -skin BNTV400 -skindir "C:\Program Files (x86)\Android\android-sdk\add-ons\addon-nooksdk-nook-15\skins"
    NOOK HD+:
    emulator-arm -avd <avd_name> -skin BNTV600 -skindir "C:\Program Files (x86)\Android\android-sdk\add-ons\addon-nooksdk-nook-15\skins"
    NOOK Tablet:
    emulator-arm -avd <avd_name> -skin NOOKTablet -skindir "C:\Program Files (x86)\Android\android-sdk\add-ons\addon-nook_tablet-barnes_and_noble_inc-10\skins"
    NOOK Color:
    emulator-arm -avd <avd_name> -skin NOOKcolor -skindir "C:\Program Files (x86)\Android\android-sdk\add-ons\addon-nookcolor-barnes_and_noble_inc-8\skins"
    See Operating the AVD for more information on the controls.
  4. Install your app on the emulator. For information, see Install App on Emulator.
  5. Stop the emulator from the command line by pressing CTRL+C twice or click the emulator's power symbol: clip_image001.png to stop the app.

Mac OS

To run the NOOK Emulator from the command line:

  1. Click Finder > Go > Utilities > Terminal
  2. List available Android virtual devices with: android list avd
  3. Start the emulator - substitute the AVD name and the path to where you unzipped the Android SDK software:
    If you created the AVD from the command line, use emulator-arm -avd <avd>
    If you created the AVD from the AVD Manager or Eclipse, use:

    NOOK HD:
    emulator-arm -avd <avd name> -skin BNTV400 -skindir  <android-sdk>/add-ons/addon-nook_sdk-barnes_and_noble_inc-15/skins
    NOOK HD+:
    emulator-arm -avd <avd name> -skin BNTV600 -skindir  <android-sdk>/add-ons/addon-nook_sdk-barnes_and_noble_inc-15/skins
    NOOK Tablet:
    emulator-arm -avd <avd name> -skin NOOKTablet -skindir  <android-sdk>/add-ons/addon-nook_tablet-barnes_and_noble_inc-10/skins
    NOOK Color:
    emulator-arm -avd <avd name> -skin NOOKcolor -skindir  <android-sdk>/add-ons/addon-nookcolor-barnes_and_noble_inc-8/skins
    See Operating the AVD for more information on the controls.

    Note  Mac OS may display the following message when starting the emulator:
    emulator-arm[14022:1107] Warning once: This app, or a library it uses, is using NSQuickDrawView, which has been deprecated. Apps should cease use of QuickDraw and move to Quartz.

    You can ignore this message as it pertains to the Android implementation and not to the NOOK software.
    You may also see this message, which Mac Internet users report is connected with the use of Mac OS X Mountain Lion:
    emulator-arm[14489] <Error>: The function 'CGSFlushWindow' is obsolete and will be removed in an upcoming update. Unfortunately, this application, or a library it uses, is using this obsolete function, and is thereby contributing to an overall degradation of system performance. Please use `CGSFlushWindowContentRegion' instead.
  4. Stop the emulator by pressing CMD+Q or click the emulator's power symbol to stop the app.

Ubuntu Linux

To run the NOOK Emulator from the command line:

  1. Get a command prompt: Click Ubuntu Software Center and type terminal at the search prompt. Click a terminal such as the Gnome Terminal and click Install.
  2. List available Android virtual devices with: android list avd
  3. Start the emulator:
    If you created the AVD from the command line, use emulator-arm -avd <avd>
    If you created the AVD from the AVD Manager or Eclipse, use one of the following commands and substitute the AVD name and the path to where you extracted the Android SDK software - the default is /home/user/Download - if you extracted or moved the folder elsewhere, fix the commands that follow:

    NOOK HD:
    emulator-arm -avd <avd name> -skin BNTV400 -skindir /home/user/Downloads/android-sdk-linux/add-ons/addon-nook_sdk-barnes_and_noble_inc-15/skins
    NOOK HD+:
    emulator-arm -avd <avd name> -skin BNTV600 -skindir /home/user/Downloads/android-sdk-linux/add-ons/addon-nook_sdk-barnes_and_noble_inc-15/skins
    NOOK Tablet:
    emulator-arm -avd <avd name> -skin NOOKTablet -skindir /home/user/Downloads/android-sdk-linux/add-ons/addon-nook_tablet-barnes_and_noble_inc-10/skins
    NOOK Color:
    emulator-arm -avd <avd name> -skin NOOKcolor -skindir /home/user/Downloads/android-sdk-linux/add-ons/addon-nookcolor-barnes_and_noble_inc-8/skins
    See Operating the AVD for more information on the controls.

Back to Top

3.3.2 Start Emulator - AVD Manager

This section describes how to start the NOOK Emulator from the AVD Manager.

Windows

To start the AVD Manager:

  • Windows 8: Scroll across the Metro menu to the far right and right-click AVD Manager and click Run as administrator.
  • Note Windows 7/XP do not display NOOK skins when the emulator is run from the AVD Manager.
    Windows 7: Click Start > All Programs > Android SDK Tools.
    Windows XP: Click Start > My Programs > Android SDK Tools.

    Right-click AVD Manager and click Run as administrator.
    In Windows XP, click Run as and then choose The following user: Administrator and provide the administrator password.

    clip_image005.png

Mac OS

To start the AVD Manager:

  1. Open a Terminal from Finder > Go > Utilities > Terminal
  2. Start the SDK Manager by typing:   android
  3. In the SDK Manager, click Tools > Manage AVDs.

    clip_image007.png

Both Windows and Mac OS.

  1. Click an AVD entry in the Android Virtual Device Manager. In the example that follows, HD is the AVD entry. If there are no AVD entries, see Create an AVD.
  2. Click Start.

    EclipseLaunchANewAVD.png
  3. In Launch Options, click the check box for Scale display to real size. In Windows 8, you can take the defaults and not set any options.
  4. Click the Launch button. If the emulator displays too small, set the Screen Size to a larger value such as 4.

    clip_image011_0000.png

  5. If the Video Source prompt appears, click OK.

    clip_image013_0000.png

    The emulator screen appears for the NOOK device.

  6. If an error occurs instead of the emulator, start the emulator from a command prompt
  7. In Eclipse, click Run > Run Configurations, click Target > Always prompt to pick device > Run
  8. In Android Device Chooser, click Choose a running Android device, click the running emulator entry, and click OK.

Back to Top

3.3.3 Start Emulator - Eclipse

Note Windows 7/XP do not display NOOK skins when the emulator is run from Eclipse.

To run the emulator:

  1. Start Eclipse.
  2. If needed, click the AVD Manager button clip_image015_0000.png to create a new AVD or to edit an existing AVD.
  3. Click the Run button down arrow and click Run Configurations.

    EclipseRunConfig.png 
  4. Click Target. If the Target tab is not present, click the Android Application down arrow and click New_configuration.

    EclipseTargetTab.png 
  5. From the Target tab, click Always prompt to pick device and click Run.

    EclipseAlwaysPromptToPickDevice.png 

  6. Click Launch a new Android Virtual Device, click the device you want to start, and click Start.

    EclipseLaunchANewAVD.png 

  7. Click Launch to launch the emulator.

    EclipseLaunchOptionsForHD.png 

  8. The emulator appears.
     
    EclipseEmulator.png 
  9. If an error occurs instead of the emulator, start the emulator from a command prompt with this command (right-click Command Prompt and click Run as administrator):  
    emulator -avd AVD_Name -memory 512
  10. In Eclipse, click Run > Run Configurations, click Target > Always prompt to pick device > Run.
  11. In Android Device Chooser, click Choose a running Android device, click the running emulator entry, and click OK.
  12. Set Command Parameters: You can apply command parameters to the emulator by clicking Run > Run Configurations within Eclipse:
  13. Set the command parameters as required and click Close.

    clip_image019.png

3.4 Install an App on the Emulator

Before installing an app on the NOOK Emulator:

  • Ensure the NOOK Emulator is running. For more information, see the previous section, Start the Emulator.
  • You need an .APK build file for your app to install on the emulator.

Note  If the ADB command fails, see the Troubleshooting section in this guide.

To install the app on the emulator:

Command Line:

  1. Open a command line as either a Windows command prompt or a Mac or Linux terminal. In Windows, right-click Command Prompt and click Run as administrator. See the Windows 8 Note to get a Command Prompt that is run as administrator.
  2. Change directory to where your .APK file resides on your computer.
  3. Install the app using the adb install <APK_Filename>. Use the -r option to replace the APK if you've installed it before.

    When the install succeeds, the adb command copies the APK to the emulator and displays Success, for example:
    > adb install -r test.apk
    203 KB/s (32627027 bytes in 156.231s)
            pkg: /data/local/tmp/test.apk
    Success

Eclipse:

  1. Click Run > Run Configurations.

    clip_image061.png
  2. Click the Target tab and click Always prompt to pick device.

    clip_image063.png
  3. Click Run. The Android Device Chooser appears.
  4. Click Launch a new Android Virtual Device, click the device entry, and click Start.

    EclipseDeviceChooser4Emu.png 

  5. In the Launch Options, click Scale display to real size, specify a size, and click Launch.

    EclipseLaunchOptions4Emu.png

    For information about starting your app on the emulator, see the next section, "Operate the Emulator."

Back to Top

3.5 Operate the Emulator

To use the emulator:

  1. Wait approximately 2 minutes after starting the emulator to view the home page.
  2. NOOK HD:
    Click the Apps button to find your app.

    AppsButtonOnHD_.png

    NOOK Color and NOOK Tablet - Click the grid above the NOOK button.

     AppsButton.png

    You may also see the standard Android display. You can access the apps by clicking the grid in the upper right.

    APPSmenuOnHD.png
  3. Start the app you installed and verify its functionality.
  4. You can toggle between Portrait and Landscape modes using the CTRL-F11 or CTRL-F12 keys. In Mac, you may need to set System Preferences > Keyboard > Set function keys as standard function keys and use right-click F11 or F12. For other shortcuts, see http://developer.android.com/tools/help/emulator.html
  5. The emulator also lets you use search, view settings, and other functions.
    Note: If the emulator appears to stop, dismiss the window and restart the emulator.
  6. To exit, click the power symbol:  clip_image001.png to stop or dismiss the app.

    EclipseEmulator.png

 

Back to Top

3.6 Run the HelloWorld App on the Emulator

The HelloWorld sample app shows you how to begin developing a NOOK app and run the emulator from Eclipse.

Note The Android SDK provides sample apps to get started. You can get Android sample code in the Android SDK Manager by choosing the Android repository. However, the sample code may not work in the emulator due to features that are NOT present in the emulator image. 

  1. Start SDK Manager and install Extras > Android Support Library. If it's already installed, ensure that it's at least revision 8. To start the SDK Manager, open a command prompt or terminal and type android. If you are using Windows, right-click the Command Prompt selection and click Run as Administrator.
  2. In Eclipse, start a new Android project: click File > New > Android Application Project.

    EclipseFileNewAndroidAppProject.png

  3. Complete the New Android App form.

    EclipseHwICSAppName.png

    1. Specify the app Name as HelloWorld. The Project Name automatically populates. Also specify a package name such a com.bn.ex.helloworld
    2. Set the Build SDK to Android 4.0.3 and the Minimum Required SDK to Android 2.2.
    3. Click Next.
  4. For Configure Project, click Next.

    EclipseConfigProject.png
  5. For Configure Launcher Icon, click Next.

    EclipseConfigLauncherIcon.png
  6. For Create Activity, click Next.

    clip_image029.png
  7. Click Finish.

    clip_image031.png

    If you see the error Activity name must be specified, it means you need to update Eclipse. Click Cancel and click Help > Check for Updates and install the updates. For more information, see the Stack Overflow article, Hierarchical Parent Error when creating new android project.

    The project auto compiles and displays the HelloWorld in the layout editor.

    EclipseHelloWorldPanel.png

  8. Click Window > Preferences, check NOOKcolor, and click OK.

    clip_image035.png

  9. Right-click the HelloWorld project and click Run As > Android Application.

    RunEmuInEclipse.png

    The NOOK emulator window appears and after a few minutes runs the Hello World app on the emulator. MainActivity displays in the upper corner and Hello world in the center of the screen.

    clip_image039.png
  10. In Eclipse, click Run > Run Configurations, click Target > Always prompt to pick device > Run
  11. In Android Device Chooser, click Choose a running Android device, click the running emulator entry, and click OK.

Back to Top

3.7 Accessing the SD Card from the Emulator

By default, the SD card on the NOOK Emulator is read-only. The file system access for the SD card is /mnt/sdcard.

To give write access to the emulator SD card, open a command line and type the following:

  1. Open an Android Debug Bridge (ADB) shell:  adb shell
  2. Change to super user:  su
  3. Create a mount point:  mount -o rw,remount rootfs /
  4. Open access permissions to the SD card:  chmod 777 /mnt/sdcard

Back to Top

 

 

4.0 Sideloading Apps

You can sideload apps to your NOOK device after your device becomes visible to the Android Debug Bridge (ADB) command. Sideloading means manually installing apps to the NOOK device and then making the apps visible to the NOOK app user interface.

Note The preferred way to install apps on to a NOOK HD and NOOK HD+ is to utilize the ADB commands, for example, adb install filename.apk. Do not use the "unknown sources" menu on the device to install applications--The NOOK software disables this menu and its method of installation.

Quick Reference
4.1 Install Android Drivers (Windows Only)
4.2 Enable ADB on NOOK HD & NOOK HD+
4.3 Provision NOOK Device (NOOK Color & Tablet Only)
4.4 Add NOOK Device ID for ADB Access
4.5 Use ADB to Access a NOOK Device<
4.6 Get Windows to see the NOOK Device
    4.6.1 Recreate NOOK HD and NOOK HD+ Device
    4.6.2 Install Google USB Driver
    4.6.3 Get Android Composite ADB Interface Driver
    4.6.4 Uninstall Default USB Drivers
        4.6.4.1 Locate USB Controllers
        4.6.4.2 More Than One USB Mass Storage Device
4.7 Install an App on a NOOK Device
    4.7.1 Install an App Using Eclipse
    4.7.2 Upgrade an App on a NOOK Device
    4.7.3 Delete an App from a NOOK Device
4.8 Access Apps You Sideload

Prerequisites Before sideloading an app, install Java, the Android SDK, and the NOOK SDK Add-on.

Quick Tip  Attach your NOOK device to your computer using the USB cable. On a NOOK HD or NOOK HD+, first Enable ADB access: Click the Settings icon in the top bar of the device, click All Settings > Device informationDeveloper options > Enable ADB. Click OK at the Allow USB debugging prompt.  A check mark appears on Enable ADB.

Try these commands from the command line (be sure to first set the Path variable -- See Set the PATH Variable):

  1. android update adb
  2. adb kill-server
  3. adb start-server
  4. adb devices
Windows Note  If the android command displays Java command options, see Set the PATH Variable. Windows command prompts must be run as administrator. See Windows 8 Note to get a command prompt for Windows 8.

If the adb devices command lists the serial number of your NOOK device, skip to Install Apps on the Device and start sideloading. The adb devices command should list the serial number and "device":

adb devices
List of devices attached
4242424242424242        device

>

Note If ADB fails to start, see the Troubleshooting section. For additional help, see Getting the ADB Devices Command to Work.

Back to Top

4.1 Install Android Drivers (Windows Only)

This section gets the drivers for your computer to communicate with the NOOK device. (Mac OS and Linux don't require separate drivers to communicate with a NOOK device.) If you are new to Windows 8, see Windows 8 Note.

To download and install Android drivers on a Windows computer:

  1. Unplug the USB cable from your NOOK device.
  2. Log on to the NOOK Developer site at http://www.nookdeveloper.com
  3. Click, or copy and paste this URL into your browser's address bar:
    https://nookdeveloper.zendesk.com/entries/22084221-windows-drivers-for-nook

    If you see "You do not have access to this topic" or "403: Access Forbidden", go to http://nookdeveloper.com and log in.
  4. Right click the usb_driver_r04-windows.zip file and click Save link as. Locate the folder to store the file and click Save.

    WindowsDriversForNOOK.png
  5. Unzip the driver file, which creates the usb_driver_r04-windows directory. Open this directory.
  6. Windows 8 only - Requires restarting your computer - Disable driver signature enforcement:
    1. Review the Windows 8 Note for how to access the Control Panel.
    2. Disable automatic Windows updates:
      Click Control Panel > Windows Update > Change settings > Never check for updates > OK.
    3. Click the Windows Key + r to get the Run window.
    4. Type: shutdown -r -o -t 0
      This command requests a restart (-r) with access to options (-o) and to start immediately (-t 0).
    5. In the Choose an option menu, click Troubleshoot > Advanced options > Startup Settings > Restart
    6. Press 7 (Disable driver signature enforcement):

      W8StartupSettings.png
  7. Open Device Manager: Press Windows Key + r, type devmgmt.msc, and click OK.
  8. Expand Other devices and look for the name of the NOOK device. If a NOOK device is present and has a yellow symbol to the left of the name, right-click the device name and click Update Driver Software. If the NOOK device is not in the Other devices category, expand other categories in the Device Manager to look for the NOOK device.

    A NOOK device may also be recognized by your computer as Android Phone > Android Composite ADB Interface.

    When a NOOK HD or NOOK HD+ connects, it appears as a listing under Portable Devices in the Device Manager as BNTV400 for the NOOK HD or BNTV600 for the NOOK HD+. 
  9. If a NOOK device does not display under Other devices or Portable Devices for the NOOK HD and NOOK HD+:
    1. Connect the USB cable to the NOOK device and to your computer.
    2. Close and reopen the Device Manager window.
  10. In the Device Manager window, right-click the entry under either Other devices or Portable Devices and click Update driver software.

    UpdateDriverSoftware.png 
  11. In the Update Driver Software window, click Browse my computer for driver software.

    clip_image006_0001.png
  12. Click Browse and locate the usb_driver_r04-windows directory where you unzipped the driver software in Step 4, and click OK.

    clip_image008_0002.png
  13. In the Update Driver Software window, click Let me pick from a list of device drivers on my computer.

    4.1_LetMePickDriver.png
  14. In the Update Driver Software window, click Have Disk.

    4.1_HaveDisk.png
     
  15. In the Install From Disk menu, click Browse.

    4.1_InstallFromDiskBrowse.png 
  16. In the Locate File menu, navigate to where you unzipped the Windows driver files in Step 5, click the INF driver file in the usb_driver_r04-windows folder, and click Open.

    4.1_ClickINF_file.png
     
  17. In the Install From Disk menu, click OK.

     4.1_InstallFromDiskOK.png

  18. If after clicking OK, this message appears, "The folder you specified doesn't contain a compatible driver for your device. If the folder contains a driver, make sure it is designed to work with Windows for x64-based systems" then:

     4.1_SelectDeviceErrorMessage.png
    1. In the Device Manager window, check to see if an entry appears under Android Phone for the Android Composite ADB Interface.

       4.1_AndroidPhoneACAI.png
    2. In the Device Manager window, if the Android Composite ADB Interface option appears, right-click and click Update driver software:

      4.1_ACAIdriverUpdate.png 
    3. In the Update Driver Software - Android Composite ADB Interface menu, click Browse my computer for driver software.
       
      4.1_UpdateACAIBrowseMyComputer.png 
    4. In the Browse for driver software window, click Let me pick from a list of device drivers on my computer.

      UpdateDriverSoftwareBrowse.png

    5. In the next Update Driver Software window - Android Composite ADB Interface menu, ensure that the Model is set to Android Composite ADB Interface and click Have Disk.

      4.1_SelectDeviceDriverToInstall.png 
    6. In the Install from Disk menu, click Browse.

       4.1_InstallFromDiskBrowse.png
    7. In the Locate File menu, click the android_winubsb.inf file and click Open.

      4.1_ClickINF_file.png 
    8. In the Install from Disk menu, click OK.

      4.1_InstallFromDiskOK.png 
    9. Click Next.

       4.1_GotDriverClickNext.png

      Windows 8 only: Skip to Step 20.
  19. In the Windows Security window, click Install this driver software anyway.

    4.1_RED.png

  20. In the Update Driver Software window, Installing driver software appears.

    4.1_InstallingDriverSw.png 
  21. In the Update Driver Software window, at the success display, click Close.

     4.1_DriverSuccess.png
  22. In the System Settings Change menu, restart your computer by clicking Yes.
    Note This menu doesn't appear in Windows 8.

    4.1_ComputerRestart.png
  23. Windows 8 only: Reboot your computer to release the disable driver signature enforcement:
    1. Press Windows Key + r to get a run prompt.
    2. Type: shutdown -r -t 0  to restart your computer.

Back to Top

4.2 Enable ADB on NOOK HD & NOOK HD+

To enable device communication between your computer and a NOOK HD or NOOK HD+ device, you must first enable ADB.

  1. On your NOOK device, click the Settings gear icon in the top bar.

    NOOKHDSettingsIcon.png

  2. Click All Settings.

    SettingsAllSettings.png 
  3. ClickDevice Information Developer options.

    DeveloperOptions.png

  4. Click the Enable ADB check mark.

     EnableADBcloseUp.png
  5. Click OK at the Allow USB debugging prompt.

    USBDebugConfirm.png
  6. After enabling ADB, the Android robot icon appears in the center of the status bar at the top of the device display.

    AndroidRobotADBEnabled.png
     

Back to Top

4.3 Provision NOOK Device (NOOK Color & Tablet Only)

Notes  

  • You must have NOOK App Developer access before you can submit apps for the NOOK. 
  • NOOK Color and NOOK Tablet developers require a provision file that enables the NOOK device to communicate with the Android Debug Bridge (ADB) command.
  • NOOK HD & NOOK HD+ don't use a provisioning file to gain access to ADB--the ADB command works after you enable ADB on your device. For more information, see Enable ADB on NOOK HD & NOOK HD+.
  • The provision file expires every 6 months and must be renewed.

The following procedures enable communication between a NOOK device and your computer.

  1. Plug the USB cable into your NOOK device and your computer.
  2. Power on your NOOK device and check for a bug icon in the lower left of the screen.
    If already provisioned, a bug icon displays in the lower left corner of your device.  clip_image020.png
    If this icon is present in the NOOK device, skip the remainder of this section.
  3. In Windows, if the NOOK device appears in the AutoPlay window, dismiss the AutoPlay window.
  4. Browse to http://nookdeveloper.com and log on to the NOOK Developer site.
  5. Click TOOLS & SERVICES at the top of the page.
  6. Click Developer Mode in the left navigation area of the page.
  7. Specify:
    1. Device Name - This can be any name. The name just lets you differentiate one device from another. Provisioning works with the serial number not the name.
    2. Serial Number - Printed on the inside of the SD card flap at the back of your NOOK device and in your NOOK device in the Settings menu > About your NOOK.
  8. Click Add Device - Note Adobe Flash is required to use the provision tool.

    clip_image022_0001.png
  9. Click Download Provision for your NOOK device.

    clip_image024_0001.png
  10. In Windows in the Save As window, select your NOOK device and click Save. In Mac, save the provision file in the root (lowest level) directory of your NOOK device.
    When provisioned, the bug icon appears in the lower left corner of your device.
     clip_image020.png
  11. When done, eject the NOOK device.
    • Windows 7/XP, click Start > Computer, right-click the NOOK device, and click Eject.
      Windows 8: In Metro view, click Desktop, click Libraries, right-click the NOOK device, and click Eject.
    • Mac OS: In the Finder, click the Eject symbol.
    • Ubuntu Linux: In the Home Folder, click the Eject symbol.

Back to Top

4.4 Add NOOK Device ID for ADB Access

For the Android Debug Bridge (ADB) command on your computer to communicate with a NOOK device, you need to insert "0x2080", which is the NOOK device ID, at the end of the adb_usb.ini file on your computer. The location of this file differs by the computer OS -- Fortunately, in most cases, you don't need to locate the file since the Android SDK provides a command for you to handle this. Unfortunately and rarely, the command doesn't always work as expected.

To insert the NOOK device ID:

  1. Open a command line and type: android update adb

    To open a command line:
    Windows: Right-click Command Prompt and click Run as administrator. See the Windows 8 Note to get a Command Prompt that is run as administrator.
    Mac OS: Click Finder > Go > Utilities > Terminal
    Ubuntu Linux: Click Dash Home and search for terminal
     
  2. Verify that the command was successful:

    Use the command line to view the adb_usb.ini initialization file:
    Windows (all) type:    type "%USERPROFILE%\.android\adb_usb.ini"
    Mac OS and Linux type:   cat ~/.android/adb_usb.ini

    The results should appear as:
    # ANDROID 3RD PARTY USB VENDOR ID LIST -- DO NOT EDIT.
    # USE 'android update adb' TO GENERATE.
    # 1 USB VENDOR ID PER LINE.
    0x2080
    
  3. If 0x2080 is not the last line in the adb_usb.ini file, fix it:

    Windows (all):  Type: echo 0x2080 >> "%USERPROFILE%\.android\adb_usb.ini"
    Mac OS & Ubuntu Linux: Type: echo -e '\n0x2080' >> ~/.android/adb_usb.ini
  4. For Mac OS ensure that the file only contains '0x2080' on a single line without any spaces or empty lines after it.

Back to Top

4.5 Use ADB to Access a NOOK Device

This section ensures that you can access a NOOK device using the Android Debug Bridge (ADB) command set.

You need to have previously completed these tasks to complete this section: Install Java, Install the Android SDK, Install NOOK SDK Add-on, Request NOOK App Developer Access, Provision NOOK Device, and Add NOOK Device ID for ADB Access.

Note  Ensure that your NOOK device has the provision bug symbol in the lower left of the screen. See Provision Your NOOK Device for more information.

  1. Plug your NOOK device into its USB cable and connect it to your computer.
  2. Power on the NOOK device to ensure that it's available for access.
  3. Remove any other Android devices from USB slots on your computer.
  4. Windows: If the AutoPlay prompt appears, dismiss the window.
  5. Get a command prompt:
    Windows: Windows Key + r, type cmd, and click OK
    MAC OS: Click Finder > Go > Utilities > Terminal
    Linux:  Click Dash Home > Terminal
  6. Type: adb devices


Results:

Successful

Under List of devices attached, the NOOK device serial number displays:

> adb devices
List of devices attached
4242424242424242        device

>

Everything works. Proceed to Install an App on a NOOK Device. The device value indicates that the device is online.

Unsuccessful

Under List of devices attached, no serial number displays:

> adb devices
List of devices attached

>

If the NOOK device serial number does not appear and you're using Windows, proceed to the next section. If you have a second NOOK device, try connecting that unit to your computer to see if the problem persists. For additional tips, see Getting the ADB Devices Command to Work.

 

Back to Top

4.6 Get Windows to see the NOOK Device

If the adb devices command did not display the serial number of the NOOK device, use the sections that follow to troubleshoot the issue. To use this section, you need to have completed the prerequisites and encountered the Unsuccessful state in the previous section Use ADB to Access a NOOK Device.

Important   If you are using a Mac or a Linux computer, skip this section and continue at Install Apps on the Device.

4.6.1 Recreate NOOK HD and NOOK HD+ Device

If you are connecting to a NOOK HD or NOOK HD+ and were unable to get adb devices to display the serial number of your NOOK device:

  1. Plug the USB cable from your NOOK HD or NOOK HD+ to your computer.
  2. Start Device Manager -- Press Windows Key + r, type devmgmt.msc, and click OK.
  3. Locate Portable Devices and the NOOK device name - BNTV400 for the NOOK HD or BNTV600 for the NOOK HD+.
  4. Right-click the NOOK device name and click Uninstall.

    DeviceManagerUninstallNOOKDevice.png
  5.  Click OK to confirm the device uninstall.
  6. Unplug the USB cable to the NOOK device.
  7. Plug the USB cable from your NOOK HD or NOOK HD+ to your computer. The NOOK device reappears under Portable Devices and Android Composite ADB Interface appears under Android Phone.

    4.6_DeviceManager.png 

  8. Start a Command Prompt:  Windows 7/XP: Click Start and type: command. Right-click Command Prompt and click Run as administrator. See the Windows 8 Note to get a Command Prompt that is run as administrator.
  9. Type: adb devices  -- If the serial number of your NOOK device appears, skip the remainder of this section and continue with Install Apps on the Device. The command should appear as follows, where 4242424242424242 is the serial number of your NOOK device.

    adb devices
    List of devices attached
    4242424242424242        device
    >

    If the serial number doesn't appear, try these commands:

    1. android update adb
    2. adb kill-server
    3. adb start-server
    4. adb devices

      If the serial number still doesn't appear, continue with the next section. For additional help, see Getting the ADB Devices Command to Work.

Back to Top

4.6.2 Install Google USB Driver

  1. Windows 8: Scroll Metro view, right-click SDK Manager, and click Run as administrator.
    Windows 7/XP: Click Start > All Programs > Android SDK Tools
    Right-click SDK Manager and click Run as administrator.

    clip_image009.png
  2. In the Android SDK Manager window, under Extras, click Google USB Driver, and click Install 1 package.

    clip_image031_0000.png
  3. In the Choose Packages to Install menu, if the package appears with a question mark, click Accept, and click Install.

    clip_image033_0000.png

    When successful, the SDK Manager lists the package as Installed.

    clip_image035_0000.png

    If the SDK Manager runs, but does not install the package, ensure you used Run as administrator to start the AVD Manager.

Back to Top

4.6.3 Get Android Composite ADB Interface Driver 

This section describes how to get Windows to install additional drivers in the Device Manager. The goal is for Windows to install the Android Composite ADB Interface (ACAI) driver in the Android Phone category of Device Manager. Once the ACAI driver appears, you should be able to see the NOOK device in the Command Prompt using the adb devices command.

To get Windows to install the Android Composite ADB Interface driver:

  1. Click Start, right-click Computer, and click Properties. Click Device Manager.

    clip_image004_0002.png
  2. In the Device Manager window, if Android Phone displays, skip to Step 12.

    clip_image037.png
  3. In the Device Manager window, click Action > Add legacy hardware.

    clip_image039_0000.png
  4. In the Add Hardware wizard, click Next.
  5. In the Add Hardware wizard, click Install the hardware I manually select from a list (Advanced) and click Next.

    clip_image041.png
  6. In the Add Hardware wizard > Common hardware types list, leave the setting at Show All Devices and click Next.

    clip_image043.png
  7. In the Add Hardware wizard > Select the device driver you want to install for this hardware, click Have Disk.

    clip_image045.png
  8. In the Install From Disk menu, click Browse. Navigate to:
    C:\Program Files (x86)\Android\android-sdk\extras\google\usb_driver\android_winusb.inf

    clip_image047.png

    After locating the android_winusb.inf file, click OK.

  9. In the Locate File menu, click Open.

    clip_image049.png
  10. Click OK in the Install From Disk window.
  11. Complete the installation by clicking Next, Next, Install, and Finish.
  12. After the installation completes, Android Phone should now be visible in the Device Manager. Expand Android Phone to show Android ADB Interface.

    clip_image051.png

    Important  If you see the Android Composite ADB Interface driver, retest the adb devices command in the Command Prompt (run the command prompt as administrator). If the NOOK device serial number appears in the adb devices command, your installation is successful and you can continue to Install Apps on a NOOK Device. If the NOOK device still does not appear in the adb devices command, continue.

  13. If the Android ADB Interface has a yellow warning icon beside the name, double-click Android ADB Interface to see the warning. The typical status is "This device cannot start. (Code 10) . This is normal and you can ignore it. Click OK to dismiss.

    clip_image053.png

Continue with the next section, Uninstall NOOK USB Drivers.

Back to Top

4.6.4 Uninstall Default USB Drivers

In this section, you uninstall the default USB driver that Windows automatically installed for the attached NOOK device. The purpose is to get the Android Composite ADB Interface driver to appear in the Android Phone category. If you already have this driver, you can skip this section.

4.6.4.1 Locate USB Controllers

In the Device Manager, expand Universal Serial Bus controllers. The driver is labeled USB Mass Storage Device.

clip_image055.png

Back to Top

4.6.4.2 More Than One USB Mass Storage Device

If there is more than one USB Mass Storage Device, either delete all of them and Windows should re-install any later, or find the correct one for the NOOK device as follows.

To find the Mass Storage driver to keep:

  1. Open a text file with Notepad or another editor.
  2. Unplug the NOOK device's USB connection from your computer.
  3. In the USB Mass Storage Device Properties window, double-click each USB Mass Device, click the General tab, select and copy the Location value, paste the string into the text file, and click OK.

    clip_image057.png

    For example, on one system it was Port_#0001.Hub_#0004. Each location is different and may be a long list of numbers. These are the drivers to leave alone.
  4. Plug the USB cable for the NOOK device back into your computer and locate any new USB Mass Storage Device items. You may need to compare your text file with the Location values to the new items to determine which is new.
  5. In the Device Manger window, for the new USB Mass Storage Device items, right-click and click Uninstall.

    clip_image059.png
  6. Unplug and re-plug the USB cable between the NOOK device and your computer. Windows re-installs a Mass Device driver, which you can now ignore. The ADB should now also install another driver, the Android Composite ADB Interface driver in the Android Phone category. Once this driver appears, return to the Command Prompt and retest the adb devices command. If the NOOK device's serial number appears in the adb devices command, you're now done.

Note  Repeat this process for each NOOK device that doesn't appear in the adb devices command. Once done, Windows seems to keep it all straight as you plug and unplug devices. Also note that you can attach multiple NOOK devices to Windows at the same time once you have gone through this process for each NOOK device, this includes a mix of NOOK devices or multiples of the same NOOK device type.

Back to Top

4.7 Install an App on a NOOK Device

After the Android Debug Bridge (ADB) lists the serial number of the NOOK device with the adb devices command, you're ready to sideload your apps to the NOOK device by installing an app Android package (APK) file on the NOOK device. For more information on the ADB command, see http://developer.android.com/tools/help/adb.html.

Note  If you are using Eclipse, the ADT plugin enables you to install files without using a command line. For more information, see Install an App Using Eclipse.

To install an app on a NOOK device:

  1. Connect the USB cable from the NOOK device to your computer.
  2. Change directory to where the APK file resides.
  3. Install the app.
    Windows command prompt (right-click and click Run as administrator):
    Mac OS or Ubuntu Linux Terminal:
    Run the following command where the <apk_file> is the APK file (use the -s serial number option if you have multiple devices or emulator sessions connected or running):

    adb [-s <serial#>] install <apk_file>


    Example: adb install HelloWorld.apk
  4. Reboot the NOOK device. From the command prompt, type the adb reboot command.
  5. To access your app, see Access Apps You Sideload.

Back to Top

4.7.1 Install an App Using Eclipse

To install an app on a NOOK device:

  1. Connect the USB cable from the NOOK device to your computer.
  2. In Eclipse, click Run > Run Configurations.

    clip_image061.png
  3. Click the Target tab and click Always prompt to pick device.

    clip_image063.png
  4. Click OK. The Android Device Chooser appears.
  5. Click the entry for the NOOK device and click OK to install your app on the NOOK device.

    clip_image065.png
  6. After installing your app on the NOOK device, eject it:
    1. Windows: If your NOOK device is a NOOK Color or NOOK Tablet, eject the NOOK device by opening Windows Explorer from your Desktop view, right-click the device, and click Eject. You can directly disconnect a NOOK HD or NOOK HD+ from the computer without first ejecting it.
    2. Mac OS: Locate the NOOK device in the Finder and click the Eject symbol to the right of the device name.
    3. Ubuntu Linux: Open the Home Folder and click the Eject symbol to the right of the device name.
  7. From the NOOK device, press the NOOK button, and click Apps:

    NOOK Color and NOOK Tablet: While holding the Volume Up button, tap the Libraries symbol to view the extras menu. You can then test your app from the extras menu.

    NOOK HD and NOOK HD+:  While holding the Volume Up button, tap the Apps legend in the status bar at the top of the screen to view the extras menu. You can test your app from the extras menu.
    Note You can only test your app in the default profile. The reason for this is that each app only contains one set of app data, which is shared across all profiles on the device. Essentially if one profile buys your app from the store, they can choose to share that app with other profiles on the device. However, there is still only one copy of your app on the device with one set of app data, so if someone buys a game app and beats 10 levels, then you switch to another profile on the device, they will start at level 10, not the first level.

Back to Top

4.7.2 Upgrade an App on a NOOK Device

To upgrade an app on a NOOK device, use the adb install command with the -r option to replace the current version. Follow the directions in Install an App on a NOOK Device and add the -r option to the command,

For example:  adb install -r MyAmazingApp.apk

4.7.3 Delete an App from a NOOK Device

Deleting an app requires finding the app's package name.

Note If you need additional help uninstalling apps, see Helper application to uninstall apps.
To delete an app on a NOOK device:

  1. Locate the package name for the app.

    Windows:

    Use a command such as:

    aapt l -a myapp.apk | findstr "package="

    Mac OS:

    Use a command such as:

    aapt l -a myapp.apk | grep "package="

    Example output:

    A: package="com.myapp.myloc" (Raw: "com.myapp.myloc")
  2. Use the adb uninstall command to delete the package name of the app, for example:

    adb uninstall com.myapp.myloc

Back to Top

4.8 Access Apps You Sideload

To access apps you sideload:

NOOK HD & NOOK HD+

  1. On your NOOK device, click the APPS menu icon.

    AppsButtonOnHD_.png
  2. Hold and press the Volume+ button.
  3. While pressing the Volume+ button, tap and hold for 2 seconds Apps label at the top of the screen.

    AppsScreen.png

    The extras menu appears.

    ExtrasMenu.png
  4. Start your app. 

    Note You can only test your app in the default profile. The reason for this is that each app only contains one set of app data, which is shared across all profiles on the device. Essentially if one profile buys your app from the store, they can choose to share that app with other profiles on the device. However, there is still only one copy of your app on the device with one set of app data, so if someone buys a game app and beats 10 levels, then you switch to another profile on the device, they will start at level 10, not the first level.

NOOK Tablet & NOOK Color

  1. On the NOOK device, press the NOOK button, and tap Apps.
  2. While holding the Volume Up button, tap the library symbol to view the Extras menu:

    LibraryOnNOOK.png
  3. You can then test your app from the Extras menu.

Back to Top

 

Appendix A: Notes

A.1 Change Log

A.2 Windows 8 Note

To simplify Windows 8 access, we recommend these shortcuts:

  • Command Prompt: Press Windows Key + r, type cmd, and click OK - this works for most access not requiring admin rights.
  • Command Prompt with Admin Rights: Press Windows Key + c, click Search, type c, right-click Command Prompt, click Run as administrator, and click Yes. The command prompt window displays Administrator: Command Prompt in the title bar.
  • Control Panel: Press Windows Key + r, type control, and click OK.
  • Device Manager: Press Windows Key + r, type devmgmt.msc, and click OK.
  • Environment Variables: Press Windows Key + r, type sysdm.cpl, click OK, click the Advanced tab and Environment Variables.

 

 

Appendix B: Troubleshooting

Use this section to diagnose errors.

B.1 Error Messages

The connection to adb is down, and a severe error has occured
You must restart adb and Eclipse

This error occurs when Eclipse can't start ADB.

To correct:

  1. Open a command line:
    Mac OS: Click Finder > Go > Utilities > Terminal
    Linux: Click Dash Home and in the search, type Terminal
    Windows 7/XP: Click Start > All Programs > Accessories, right-click Command Prompt, and click Run as administrator.
    Windows 8: See Windows 8 Note
  2. Type the android update adb command.
    Mac OS: Type sudo android update adb and type your system password when prompted.

Error: C:\Program Files (x86)\Android\android-sdk\.android\adb_usb.ini (Access is denied)

This error occurs if you attempt to run the android update adb command from a command prompt without administrator privileges.

To correct, open a command line with administrator privileges and re-submit the command.

ADB server didn't ACK

This error indicates that the ADB server failed to start. To correct this, open a command line with administrator privileges and type the android update adb command. For Mac OS, open a terminal and type sudo android update adb and type your system password when prompted.

After doing this command you will need to update the adb_usb.ini file as described in Section 4.4 again since this will erase your existing adb_usb.ini file.  Once the file is updated do 'adb kill-server' followed by 'adb start-server' and then try 'adb devices' again and see if it detects the NOOK.

B.2 Getting the ADB Devices Command to Work

The goal is for the adb devices command to list the serial number of your NOOK device.

  1. If not connected already, connect the NOOK device to your computer using the USB cable, power on the NOOK device, and open the desktop view.
  2. Update the ADB initialization file: android update adb
  3. View the adb_usb.ini file and ensure that the last line is 0x2080:
    Windows 7/8: Locate the \Users\<login>\.android folder and view the adb_usb.ini file. If the last line is not 0x2080, edit the file and add this line. Note If the ANDROID_SDK_HOME environment variable points to another folder location other than the \Users\<login>\.android folder, the adb_usb.ini file may not get updated with 0x2080 as the last line.
    Mac OS and Linux: Open a Terminal and enter this command: cat ~/.android/adb_usb.ini
    If the last line is not 0x2080, type: echo -e '\n0x2080' >> ~/.android/adb_usb.ini
  4. Stop the ADB server: adb kill-server
  5. Restart the ADB server: adb start-server
  6. Eject the NOOK device, remove the USB cable, and reconnect the cable to your computer.
  7. See if NOOK device serial number appears by entering: adb devices

If you are using a Windows computer, ensure that you complete these sections:

 
Topic is closed for comments