Latest Entries »

Fastboot is a command line tool used to directly flash the filesystem in Android devices from a host via USB. It allows flashing of unsigned partition images. It is disabled in production devices since USB support has been disabled in the bootloader. You must have an Engineering SPL, or an SPL that is S-OFF.

After installing the Android SDK or ADB Standalone you can use ‘fastboot’ in addition to the more common ADB.


With the exception of the Google Nexus One (which has an OEM unlock), when you boot the device into the bootloader, you should see S-OFF (security off) on the top line. If you see S-ON, or you see a four-color rainbow background, the SPL does not support fastboot. You will need to install a fastboot compatable SPL, such as HardSPL or any of the Engineering SPLs for various devices. See thedevice specific page for further instructions.
Verify SPL S-OFF

Access bootloader

  1. Make sure you have ADB or the SDK installed.
  2. Linux & OS X only: Download fastboot for the appropriate operating system for your computer.
  3. Place the executable in the proper place, usually:
    • Linux: ~/android_sdk/tools/ or ~/bin/
    • OS X:
    • Windows: C:\Android_SDK\Tools or C:\Program Files\adb
  4. Turn off the device.
  5. Boot device into bootloader
  6. Make sure the device is in FASTBOOT and not HBOOT
  7. Connect the device to the computer via USB.
  8. On your computer, open terminal and run:
    fastboot devices
You should see something similar to:
List of devices attached
HTXXXXXXXXXX	device

fastboot –help

usage: fastboot [ <option> ] <command>

commands:
 update <filename>				reflash device from update.zip
 flashall					flash boot + recovery + system
 flash <partition> [ <filename> ]		write a file to a flash partion
 erase <partition>				erase a flash partition
 getvar <variable>				display a bootloader variable
 boot <kernel> [ <ramdisk> ]			download and boot kernel
 flash:raw boot <kernel> [ <ramdisk> ]		create bootimage and flash it
 devices					list all connected devices
 continue					continue with autoboot
 reboot						reboot device normally
 reboot-bootloader				reboot device into bootloader

options:
 -w						erase userdata and cache
 -s <serial number>				specify device serial number
 -p <product>					specify product name
 -c <cmdline>					override kernel commandline
 -i <vendor id>					specify a custom USB vendor id
 -b <base_addr>					specify a custom kernel base address
 -n <page size>					specify the nand page size. default:2048

Typical Partition Layout

For Reference when flashing partitions

Name Nandroid .img Information Contained Mount Point Notes
splash1 N/A Boot image (“T-mobile G1″ image) mtdblock0? size: 320x480x2. Different from bootanimation.zip.
recovery N/A A ‘backup’ kernel, initrd, and OS
for system recovery / maintenance
mtdblock1 Can flash custom recovery.img (Amon_Ra, ClockworkMod, etc).
Accessed by holding [home] while booting.
boot boot.img The main kernel and initrd mtdblock2 Can flash custom boot.img
system system.img The main OS mtdblock3 This is the /system partition
cache cache.img Temp storage mtdblock4 Unused. Can be re-partitioned.
userdata data.img User data and settings mtdblock5 This is the /data partition

Examples

Manual Nandroid restore

Make a Nandroid backup, and copy the folder off your SD card to your desktop.

cd ~/Desktop/path/to/backup/
fastboot flash userdata data.img
fastboot flash system system.img
fastboot flash boot boot.img
fastboot reboot

Flash Custom Recovery.img

fastboot flash recovery /path/to/<recovery>.img
fastboot reboot

Flash Custom boot.img

You should make a Nandroid backup first, in case you need to recover your boot.img

fastboot flash boot /path/to/<boot>.img
fastboot reboot

Development

If you are developing a kernel, you may find it helpful to delete your boot.img and recovery.img to force booting into fastboot:

fastboot erase boot
fastboot erase recovery

You can then manually boot from your custom kernel and a ramdisk:

fastboot boot <kernel> <ramdisk>

Once you have a working kernel and ramdisk, you can automagically combine them within fastboot:

fastboot flash:raw boot <kernel> <ramdisk>
Source : Cyanogenmod

Fastboot is a command line tool used to directly flash the filesystem in Android devices from a host via USB. It allows flashing of unsigned partition images. It is disabled in production devices since USB support has been disabled in the bootloader. You must have an Engineering SPL, or an SPL that is S-OFF.

After installing the Android SDK or ADB Standalone you can use ‘fastboot’ in addition to the more common ADB.


With the exception of the Google Nexus One (which has an OEM unlock), when you boot the device into the bootloader, you should see S-OFF (security off) on the top line. If you see S-ON, or you see a four-color rainbow background, the SPL does not support fastboot. You will need to install a fastboot compatable SPL, such as HardSPL or any of the Engineering SPLs for various devices. See thedevice specific page for further instructions.
Verify SPL S-OFF

Access bootloader

  1. Make sure you have ADB or the SDK installed.
  2. Linux & OS X only: Download fastboot for the appropriate operating system for your computer.
  3. Place the executable in the proper place, usually:
    • Linux: ~/android_sdk/tools/ or ~/bin/
    • OS X:
    • Windows: C:\Android_SDK\Tools or C:\Program Files\adb
  4. Turn off the device.
  5. Boot device into bootloader
  6. Make sure the device is in FASTBOOT and not HBOOT
  7. Connect the device to the computer via USB.
  8. On your computer, open terminal and run:
    fastboot devices
You should see something similar to:
List of devices attached
HTXXXXXXXXXX	device

fastboot –help

usage: fastboot [ <option> ] <command>

commands:
 update <filename>				reflash device from update.zip
 flashall					flash boot + recovery + system
 flash <partition> [ <filename> ]		write a file to a flash partion
 erase <partition>				erase a flash partition
 getvar <variable>				display a bootloader variable
 boot <kernel> [ <ramdisk> ]			download and boot kernel
 flash:raw boot <kernel> [ <ramdisk> ]		create bootimage and flash it
 devices					list all connected devices
 continue					continue with autoboot
 reboot						reboot device normally
 reboot-bootloader				reboot device into bootloader

options:
 -w						erase userdata and cache
 -s <serial number>				specify device serial number
 -p <product>					specify product name
 -c <cmdline>					override kernel commandline
 -i <vendor id>					specify a custom USB vendor id
 -b <base_addr>					specify a custom kernel base address
 -n <page size>					specify the nand page size. default:2048

Typical Partition Layout

For Reference when flashing partitions

Name Nandroid .img Information Contained Mount Point Notes
splash1 N/A Boot image (“T-mobile G1″ image) mtdblock0? size: 320x480x2. Different from bootanimation.zip.
recovery N/A A ‘backup’ kernel, initrd, and OS
for system recovery / maintenance
mtdblock1 Can flash custom recovery.img (Amon_Ra, ClockworkMod, etc).
Accessed by holding [home] while booting.
boot boot.img The main kernel and initrd mtdblock2 Can flash custom boot.img
system system.img The main OS mtdblock3 This is the /system partition
cache cache.img Temp storage mtdblock4 Unused. Can be re-partitioned.
userdata data.img User data and settings mtdblock5 This is the /data partition

Examples

Manual Nandroid restore

Make a Nandroid backup, and copy the folder off your SD card to your desktop.

cd ~/Desktop/path/to/backup/
fastboot flash userdata data.img
fastboot flash system system.img
fastboot flash boot boot.img
fastboot reboot

Flash Custom Recovery.img

fastboot flash recovery /path/to/<recovery>.img
fastboot reboot

Flash Custom boot.img

You should make a Nandroid backup first, in case you need to recover your boot.img

fastboot flash boot /path/to/<boot>.img
fastboot reboot

Development

If you are developing a kernel, you may find it helpful to delete your boot.img and recovery.img to force booting into fastboot:

fastboot erase boot
fastboot erase recovery

You can then manually boot from your custom kernel and a ramdisk:

fastboot boot <kernel> <ramdisk>

Once you have a working kernel and ramdisk, you can automagically combine them within fastboot:

fastboot flash:raw boot <kernel> <ramdisk>
Source : Cyanogenmod

Nexus S 4G: Full Update Guide

Before you do anything — Make a backup

Don’t forget to back up your data. If you have synced the device with a Google account, then the contacts, calendar, Gmail, & select other Google-related data will not be lost and will come back after the next sync. However, you should backup anything you want to keep that is not stored on the SD card:

It would also be a good idea to backup everything stored on the SD card in the rare case the SD card must be formatted to resolve any major problems.

MyBackup RootSMS Backup & Restore, and Call Backup & Restore are all free applications that can assist with backing up your data.

Unlocking the Bootloader

WARNING: UNLOCKING THE NEXUS S 4G’S BOOTLOADER WILL VOID THE WARRANTY.

If the Bootloader on the Nexus S has already been unlocked, you may skip this section.

  1. You will need fastboot on the computer to unlock the bootloader on the Nexus S 4G. Follow the Android SDK guide, to get the fastboot on the computer.
  2. Power the Nexus S down, and hold Volume Up & the Power button until booted into the bootloader. You should see a white screen with three skating androids.
  3. Connect the Nexus S 4G to the computer via USB.
  4. On the computer, open terminal and run:
    fastboot oem unlock
  5. On the Nexus S 4G, a prompt will open up asking you if you are sure you want to unlock the bootloader and again warning you that doing so will void your warranty. If you agree to these terms, press Volume Up to select Yes, and then press the Power button to confirm.
    NOTE: Unlocking the bootloader wipes the device.
  6. The Nexus S 4G will reboot.

Installing the ClockworkMod Recovery Image

If you have already flashed a custom recovery image, skip this section.

  1. Download the latest version of the ClockworkMod Recovery:
    • ClockworkMod Recovery 3.1.0.1: Download
  2. Place the ClockworkMod Recovery Image in the same folder as fastboot (the /tools folder with the Android SDK folder).
  3. Power the Nexus S 4G down, and hold Volume Up & the Power button until booted into the bootloader. You should see a white screen with three skating androids.
  4. Connect the Nexus S 4G to the computer via USB.
  5. On the computer, open terminal and run:
    fastboot flash recovery recovery-clockwork-3.1.0.1-crespo4g.img
  6. The ClockworkMod Recovery should now be installed on the Nexus S 4G.

Flashing CyanogenMod

NOTE: In order to flash CyanogenMod via ROM Manager, root access is required. Attaining root access is outside the scope of this wiki page

Method via Recovery

  1. Download the latest version of CyanogenMod.
    Optional: Download the Google Apps for the device.
  2. Place the CyanogenMod update.zip file on the root of the SD card.
    Optional: Place the Google Apps .zip on the root of the SD card also.
  3. Boot into the ClockworkMod Recovery.
  4. Once the device boots into the ClockworkMod Recovery, use the side volume buttons to move around, and either the power button or the trackball to select.
    Optional: Select backup and restore to create a backup of current installation on the Nexus S 4G.
  5. Select the option to Wipe data/factory reset.
  6. Then select the option to Wipe cache partition.
  7. Select Install zip from sdcard.
  8. Select Choose zip from sdcard.
  9. Select the CyanogenMod update.zip.
    Optional: Install the Google Apps by performing steps 7 - 9 again and choosing the Google Apps update.zip.
  10. Once the installation has finished, select +++++Go Back+++++ to get back to the main menu, and select the Reboot system now option. The Nexus S 4G should now boot into CyanogenMod.

Method via ROM Manager

  1. Launch RomManager.
    Optional: Choose the first option in the app, Flash ClockworkMod Recovery to update to the latest version.
  2. Select the Download ROM option from the main menu in the ROM Manager.
  3. Select the CyanogenMod option, and then choose the latest version of CyanogenMod from the menu.
    Optional: When you select the latest version of CyanogenMod, check the Google Apps* option.
  4. Once the ROM is finished downloading, it asks if you would like to Backup Existing ROM and Wipe Data and Cache.
  5. If Superuser prompts for root permissions check to Remember and then Allow.
  6. The Nexus S 4G will now reboot into the recovery, wipe data and cache, and then install CyanogenMod. When it’s finished installing it will reboot into CyanogenMod.
Follow

Get every new post delivered to your Inbox.