Firefox OS/TCP/Flashing the Flatfish bootloader

From MozillaWiki
Jump to: navigation, search

We recommend you that you flash your Flatfish device with this bootloader update (version 2.0) if you have not already done so. Flashing the bootloader is not strictly necessary in order to flash Firefox OS but it does offer advantages. You only need update the bootloader once as subsequent flashing and resets will not affect it.

This bootloader update fixes the problem of not being able to flash a working OS should your tablet become completely disabled by allowing you to enter fastboot mode using the tablet buttons.

Note: This method is Windows only but works from Windows inside a virtual machine such as VirtualBox on Linux. See the special instructions at the bottom of this page to accomplish this.

Linux users then you can update the bootloader on Windows (or Mac) as described below and then follow these these instructions to flash Firefox OS.

Mac OS X users, you can flash the bootloader using LiveSuite for Mac. Just follow the bricked device instructions. (This has been tested on OS X 10.9) Sorry, but Mac users are currently unable to flash the bootloader from a virtual machine. You still need a virtual machine to flash Firefox OS.

This will delete all internal user data (such as installed apps).

  1. Downloads and installs:
    • Download the recovery image
    • Download known-working build files (img files) from the build status page of Firefox OS. Place them into a folder on your computer.
    • Download this script and place it in the same folder as the Firefox OS build files.
    • Extract this file into the same folder.
    • Download and install PhoenixSuit
      • Windows 8.1 users: you will need to disable driver signature verification prior to installing PhoenixSuit.
      • Windows 8 64-bit users: It may fail to install the USB Device Driver. This is ok.
  2. Ensure the your tablet is booted and running Firefox OS normally (if you cannot boot, follow these instructions)
  3. Open PhoenixSuit
  4. Plug the tablet into your computer via the USB cord
  5. Once device information (e.g. Model: flatfish) shows on the PhoenixSuit window, click the Firmware button.
  6. Click Image and locate the recovery image file (sun6i_boot-fastboot_v2.0.img).
  7. When prompted to upgrade the device firmware, click Yes.
  8. Click Yes for the mandatory/forced format.
    The image will be written and after a quick reboot your device should now display FASTBOOT to indicate it is in fastboot mode.
    The bootloader has now been flashed. You may now close PhoenixSuit.

Flashing Firefox OS:

  • Linux Users: Follow these instructions making sure to write userdata.img.
  • Windows users: Run the flash-all-fastboot file you placed in the folder with your build files. This will flash a working OS.
    • If it stops at < waiting for device > try unplugging and replugging the cord. If this does not work, follow these instructions to install USB drivers and run flash-all-fastboot again.

Remember, this is development software and you will run into issues with the OS (that's why you're here!) so please report them. Here are a few notable issues with the current stable build:

  • At the end of the intial First Time Experience setup you will see a File not Found error. Shut down the tablet and restart to move past this.
  • If your screen starts shutting down after only a few seconds when inside an app, go to Settings > Screen lock and tap the toggle to disable it.

After everything is complete, you are free to uninstall PhoenixSuit if desired, but when prompted, do not remove the ADB/USB drivers.

Enter Fastboot mode using the hardware buttons

In the future, if you need to enter fastboot mode manually:

  1. Power off the device.
  2. Press and HOLD the power key (do not release until after the next step)
  3. When the boot logo (Firefox OS Contribution Program) appears, press and HOLD the Volume+ key until the Fastboot logo appears. You may now release both buttons.

Special Instructions for Virtual Machines

During the process to flash the bootloader, the device will lose the USB connection momentarily and it must be picked up again immediately, so set your virtual machine to capture all connected USB devices automatically. Below are instructions for VirtualBox.

In VirtualBox, go into the USB area of the Virtual Machine's settings (if the machine is running: Machine > Settings) and create a general filter, the top option on the right toolbar, which will capture all USB connections on your computer. VirtualBox USB Setting.png

You can remove this filter after the flash is successful if desired.

Repairing a bricked device

If you have never flashed this updated bootloader (2.0 or above) and are unable to boot the device normally:

  1. Open PhoenixSuit (or LiveSuite on a Mac).
  2. Click the Firmware button then the Image button and locate the fastboot recovery image file (sun6i_boot-fastboot_v2.0.img).
  3. Power off the tablet completely and plug the USB cable into just your tablet but nothing else (not your computer or a power adapter).
  4. While holding the volume(-) button plug in the USB cable to your computer.
    If you do not immediately see a prompt to format in PhoenixSuit, press the power button repeatedly (around 10x).
  5. In PhoenixSuit click the Yes button to allow Format mode.
    The image will be written and after a quick reboot your device should now display FASTBOOT to indicate it is in fastboot mode.
    The bootloader has now been flashed. You may now close PhoenixSuit.
  6. You may now flash a working OS (continue from the point further up this page that says You may now close PhoenixSuit.)