See Rooting new hardware FIRST if you have a nook original with a 1003* serial# or above.
Belated congratulations to [mbm] and pokey9000 for rooting the Nook Color. Check out our Nook Color portal also.
User:TimRiker has been re-despamming. New user registration disabled for a while. Need wiki help? Contact an Administrator.

Emulator

From nookDevs

Jump to: navigation, search

It is possible to run the nook firmware in the Android Emulator, as discovered by Steven Troughton-Smith.

Quick Script Instructions

Because the instructions for creating the nook image are simple terminal commands, a member of the nookDevs community has created a downloadable script to automate the process. To download and execute the script, follow these instructions (be sure to read the notes below):

  1. Run the following in a terminal
    cd /tmp/
    wget http://programdotrun.com/downloads/nook1.4/1.4nookImage.sh
    sh 1.4nookImage.sh
  2. When the terminal prompts you to copy system.img, we need to first create a AVD using the Android AVD Manager (step 14 below). If the android SDK tools are in the path, a simple ‘android’ command will start it, otherwise find the Android SDK tools directory and run ‘android’.
    1. Click “New” to create a new AVD
    2. Use the following properties:
      Name: nook
      Target: Android 1.5
      Skin: Click Resolution and fill in 488 x 944 (see note below concerning screen size)
    3. Click “Create AVD”
  3. Rename system.img in your images directory to good.img. Copy good.img to the ~/nook_dev/ directory.
  4. Hit enter in the terminal, and when the script is done, copy ~/nook_dev/system.img into the images/ directory.

Notes:

  • Make sure you have the [Android SDK] installed.
  • The above instructions will put everything in ~/nook_dev/
  • The directory where the android sdk is installed will be referred to as android_sdk
  • The images/ directory that is refered to is android_sdk/platforms/android-3/images/
  • The screen size currently does not fit all of the eink display. Any wider and the emulator just won’t start. This is the biggest that will work and should be fine for development

You can now start on step 19 below.


Raw Instructions for Unix/Linux

In order to do this, you will need to:

  1. Download the Android SDK and install it. Install the Platform 1.5 SDK using tools/android in the Android SDK.
  2. Grab the original 1.0.0 image from bn.com (mirrored here: multiupload).
  3. Run dd if=signed_bravo_update.1.0.0.dat of=signed-bravo-update.1.0.0.tar.gz bs=8 skip=19 (On Windows use this tool. At the command line run gzip-extract signed-bravo-update.1.0.0.tar.gz bravo_update.dat. NOTE: gzip-extract requires the .net framework. Afterwards rename bravo_update.dat to signed-bravo-update.1.0.0.tar.gz)
  4. Extract signed-bravo-update.1.0.0.tar.gz.
  5. Rename bravo_update.dat to bravo_update.tar.gz and extract it.
  6. Extract root.tgz.
  7. Extract root/system/framework/services.jar with your favorite unzip utility.
  8. Download and install smali. You need at least baksmali-1.1.jar and smali-1.1.jar. For your sanity, grab the wrapper scripts as well.
  9. Run
    baksmali classes.dex
    on the classes.dex from services.jar to disassemble services.jar
  10. Edit out/com/android/server/ServerThread.smali and remove the line
    if-lt v0, v1, :cond_483
    This should be line 966. (In version 1.0.0)
  11. Run
    smali out/
    to re-assemble classes.dex with our fixes.
  12. Rename out.dex to classes.dex and copy this classes.dex to services directory, overwriting the original classes.dex.
  13. Delete the out directory and re-jar the contents of the services directory (not the directory itself!).
    jar -cf services.jar classes.dex
  14. Make an Android Device (AVD entry) in the Android Emulator and name it nook (case sensitive.) Set the target platform 1.5 and skin/screen size of 480 by 944. (The real resolution is more like 600x944 but the emulator won't start at that size. But in order to see the touch-screen, it needs to be at least 944 pixels tall, and the touch display is 480 pixels across, so 480x944 is a reasonable compromise for development.)
    1. If you are unable to create the AVDs (something like Error: Ignoring platform 'google_apis-3-r03': build.prop is missing. ) then install Eclipse, install the Android plugins for Eclipse and you will be able to create the AVDs from there.
  15. grab lib/libaudioflinger.so from stock system.img supplied with Android SDK using unix utility unyaffs to extract the file
  16. overwrite the libaudioflinger.so from the system/lib directory in the nook firmware with the stock Android SDK one.
  17. use mkyaffs2image to make a system.img of the system/ of the nook firmware (how to build mkyaffs2image on OS X).
    mkyaffs2image ./system/ system.img
  18. rename system.img in the 1.5 firmware platform, android-sdk-linux_86/platforms/android-3/images, to system.good and copy in replacement system.img file you just created (it will be bigger than the SDK Android system.img (approximately 108Mb). You can download here: system.img
  19. Run the emulator by using command line
    emulator @nook -shell -show-kernel -verbose
    The emulator will take a few minutes to boot.
  20. You will NOT be able to register your emulated Nook with BN.com but you can sideload epub books by placing them in system/media/guides when you create your replacement system.img file mentioned in step 17.
Personal tools
Navigation
Nook Classic
Nook Simple Touch
Nook Tablet
Google AdSense