[Guide] How To Setup And Use Fastboot

What, If Any Other Tutorials Would You Like Me To Make?

  • Tutorial on setting up and using ADB

    Votes: 434 51.5%
  • Creating flashable .zips to be used in recovery

    Votes: 486 57.7%
  • Whatever I want!

    Votes: 195 23.1%
  • Nothing! I make terrible useless guides!

    Votes: 34 4.0%

  • Total voters
    843
Search This thread

demkantor

Inactive Recognized Contributor
Nov 10, 2011
6,860
3,765
mpls
@jujuk
Unfortunately I know little about Acer tablets, what model do you have?
Also can you get a recovery log or recovery.fstab?
Either this or get me a list of partitions for your tablet
In recovery try
adb shell
mount
Or
busybox df -hm
Or
ls -l /dev/block

Sent from my Nexus 4 using XDA Premium 4 mobile app
 
  • Like
Reactions: jujuk

jujuk

Member
Nov 7, 2013
12
0
@jujuk
Unfortunately I know little about Acer tablets, what model do you have?
Also can you get a recovery log or recovery.fstab?
Either this or get me a list of partitions for your tablet
In recovery try
adb shell
mount
Or
busybox df -hm
Or
ls -l /dev/block

Sent from my Nexus 4 using XDA Premium 4 mobile app

iconia tab A200 32GB
how to get recovery log??

C:\andro\sdk\platform-tools>adb shell
~ # ←[6nmount
mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
~ # ←[6nbusybox df -hm
busybox df -hm
Filesystem Size Used Available Use% Mounted on
tmpfs 362.9M 52.0K 362.9M 0% /dev
~ # ←[6nls -l /dev/block
ls -l /dev/block
brw------- 1 root root 7, 0 Nov 7 06:03 loop0
brw------- 1 root root 7, 1 Nov 7 06:03 loop1
brw------- 1 root root 7, 2 Nov 7 06:03 loop2
brw------- 1 root root 7, 3 Nov 7 06:03 loop3
brw------- 1 root root 7, 4 Nov 7 06:03 loop4
brw------- 1 root root 7, 5 Nov 7 06:03 loop5
brw------- 1 root root 7, 6 Nov 7 06:03 loop6
brw------- 1 root root 7, 7 Nov 7 06:03 loop7
-rw-rw-rw- 1 root root 1088 Nov 7 06:04 mmcblk0p5
~ # ←[6n^C
C:\andro\sdk\platform-tools>


---------- Post added at 06:54 AM ---------- Previous post was at 06:08 AM ----------

To prevent spam on the XDA forums, ALL new users prevented from posting outside links in their messages. After approximately 10 posts, you will be able to post outside links. Thank you for understanding!

i got that messege..sorry for PM you..
this my recovery log
Starting recovery on Thu Nov 7 06:03:34 2013
Loading volume table...
recovery filesystem table
=========================
0 /tmp ramdisk (null) (null)
1 /system ext4 /dev/block/mmcblk0p3 (null)
2 /data ext4 /dev/block/mmcblk0p8 (null)
3 /cache ext4 /dev/block/mmcblk0p4 (null)
4 /misc emmc /dev/block/mmcblk0p5 (null)
5 /flex ext4 /dev/block/mmcblk0p6 (null)
6 /sdcard vfat /dev/block/mmcblk1p1 (null)
7 /boot emmc /dev/block/mmcblk0p2 (null)
8 /recovery emmc /dev/block/mmcblk0p1 (null)

I:Internal path defined: '/data/media'
I:External path defined: '/sdcard'
I:Defaulting to external storage.
Pixel format: 1280x800 @ 32bpp
Pixel format: RGB_565
framebuffer: fd 3 (1280 x 800)
I:Loading package: TWRP (/script/ui.xml)
E:failed to mount /data (No such file or directory)
E:failed to mount /data (No such file or directory)
E:failed to mount /data (No such file or directory)
E:failed to mount /data (No such file or directory)
E:failed to mount /data (No such file or directory)
E:failed to mount /data (No such file or directory)
E:failed to mount /data (No such file or directory)
E:failed to mount /data (No such file or directory)
E:failed to mount /data (No such file or directory)
E:failed to mount /data (No such file or directory)
E:failed to mount /data (No such file or directory)
E:failed to mount /data (No such file or directory)
E:Unable to mount /data/media during GUI startup.
I:Loading package: TWRP (/res/ui.xml)
I:Loading resources...
I:Loading variables...
I:Loading pages...
I:Loading page main
I:Loading page main2
I:Loading page install
I:Loading page flash_confirm
I:Loading page flash_zip
I:Loading page flash_done
I:Loading page clear_vars
I:Loading page confirm_action
I:Loading page action_page
I:Loading page action_complete
I:Loading page reboot
I:Loading page mount
I:Loading page usb_mount
I:Loading page usb_umount
I:Loading page wipe
I:Loading page backup
I:Loading page backup_run
I:Loading page restore
I:Unable to open '/sdcard/TWRP/BACKUPS/0a74424643ff9217'
I:Loading page restore_select
I:Loading page restore_run
I:Loading page settings
I:Loading page timezone
I:Loading page advanced
I:Loading page partsdcard
I:Loading page htcdumlock
I:Loading page lock
I:Loading page filemanagerlist
I:Loading page filemanageroptions
I:Loading page choosedestinationfolder
I:Loading page filemanagerconfirm
I:Loading page filemanageracction
I:Switching packages (TWRP)
Processing arguments (1)...
stat /dev/block/mmcblk0p5 try 1: No such file or directory
I:Set page: 'clear_vars'
I:Set page: 'main2'
stat /dev/block/mmcblk0p5 try 2: No such file or directory
stat /dev/block/mmcblk0p5 try 3: No such file or directory
stat /dev/block/mmcblk0p5 try 4: No such file or directory
stat /dev/block/mmcblk0p5 try 5: No such file or directory
stat /dev/block/mmcblk0p5 try 6: No such file or directory
stat /dev/block/mmcblk0p5 try 7: No such file or directory
stat /dev/block/mmcblk0p5 try 8: No such file or directory
stat /dev/block/mmcblk0p5 try 9: No such file or directory
stat /dev/block/mmcblk0p5 try 10: No such file or directory
failed to stat /dev/block/mmcblk0p5
E:Can't open /dev/block/mmcblk0p5
(No such file or directory)
E:failed to mount /cache (No such file or directory)
E:Can't mount /cache/recovery/command
stat /dev/block/mmcblk0p5 try 1: No such file or directory
stat /dev/block/mmcblk0p5 try 2: No such file or directory
stat /dev/block/mmcblk0p5 try 3: No such file or directory
stat /dev/block/mmcblk0p5 try 4: No such file or directory
stat /dev/block/mmcblk0p5 try 5: No such file or directory
stat /dev/block/mmcblk0p5 try 6: No such file or directory
stat /dev/block/mmcblk0p5 try 7: No such file or directory
stat /dev/block/mmcblk0p5 try 8: No such file or directory
stat /dev/block/mmcblk0p5 try 9: No such file or directory
stat /dev/block/mmcblk0p5 try 10: No such file or directory
failed to stat /dev/block/mmcblk0p5
I:=> Installing busybox into /sbin
ln: /sbin/mke2fs: File exists
ln: /sbin/sh: File exists
ln: /sbin/tune2fs: File exists
I:=> Linking mtab
I:=> Getting locations
W:Device does not support /proc/emmc
W:Device does not support /proc/mtd
* Verifying filesystems...
I:=> Let's update filesystem types via verifyFst aka blkid.
* Verifying partition sizes...
E:Unable to mount /system
E:Unable to mount /data
E:Unable to mount /cache
E:Unable to mount /sdcard
du: /data/media/.android_secure: No such file or directory
+----------+-----------------------------+--------+----------+----------+---+---+
| Mount | Block Device | fst | Size(KB) | Used(KB) | M | B |
+----------+-----------------------------+--------+----------+----------+---+---+
| | | | 0 | 0 | 0 | u |
| system | /dev/block/mmcblk0p3 | ext4 | 0 | 0 | 1 | f |
| data | /dev/block/mmcblk0p8 | ext4 | 0 | 0 | 1 | f |
| boot | /dev/block/mmcblk0p2 | emmc | 0 | 0 | 0 | i |
| recovery | /dev/block/mmcblk0p1 | emmc | 0 | 0 | 0 | i |
| cache | /dev/block/mmcblk0p4 | ext4 | 0 | 0 | 1 | f |
| sdcard | /dev/block/mmcblk1p1 | vfat | 0 | 0 | 1 | n |
| | | | 0 | 0 | 0 | n |
| andsec | /data/media | vfat | 0 | 0 | 0 | f |
| sd-ext | /dev/block/mmcblk1p2 | | 0 | 0 | 1 | f |
| | | | 0 | 0 | 0 | i |
| | | | 0 | 0 | 0 | n |
| | | | 0 | 0 | 0 | n |
+----------+-----------------------------+--------+----------+----------+---+---+
I:boot information:
mnt: 'boot'
blk: '/dev/block/mmcblk0p2'
dev: '/dev/block/mmcblk0p2'
fst: 'emmc'
fnm: ''
format location: 'boot'
mountable: 0
backup method: 2
memory type: 1

I:system information:
mnt: 'system'
blk: '/dev/block/mmcblk0p3'
dev: '/dev/block/mmcblk0p3'
fst: 'ext4'
fnm: ''
format location: 'system'
mountable: 1
backup method: 3
memory type: 1

I:data information:
mnt: 'data'
blk: '/dev/block/mmcblk0p8'
dev: '/dev/block/mmcblk0p8'
fst: 'ext4'
fnm: ''
format location: 'userdata'
mountable: 1
backup method: 3
memory type: 1

I:cache information:
mnt: 'cache'
blk: '/dev/block/mmcblk0p4'
dev: '/dev/block/mmcblk0p4'
fst: 'ext4'
fnm: ''
format location: 'cache'
mountable: 1
backup method: 3
memory type: 1

I:recovery information:
mnt: 'recovery'
blk: '/dev/block/mmcblk0p1'
dev: '/dev/block/mmcblk0p1'
fst: 'emmc'
fnm: ''
format location: 'recovery'
mountable: 0
backup method: 2
memory type: 1

I:sdcext information:
mnt: 'sdcard'
blk: '/dev/block/mmcblk1p1'
dev: '/dev/block/mmcblk1p1'
fst: 'vfat'
fnm: ''
format location: 'sdcard'
mountable: 1
backup method: 1
memory type: 1

I:sdcint information:
mnt: ''
blk: ''
dev: ''
fst: ''
fnm: ''
format location: ''
mountable: 0
backup method: 1
memory type: 0

I:sd-ext information:
mnt: 'sd-ext'
blk: '/dev/block/mmcblk1p2'
dev: ''
fst: ''
fnm: ''
format location: ''
mountable: 1
backup method: 3
memory type: 0

I:android_secure information:
mnt: '.android_secure'
blk: '/data/media'
dev: '/data/media/.android_secure'
fst: 'vfat'
fnm: ''
format location: ''
mountable: 0
backup method: 3
memory type: 0

I:special 1 information:
mnt: ''
blk: ''
dev: ''
fst: ''
fnm: ''
format location: ''
mountable: 0
backup method: 2
memory type: 0

I:special 2 information:
mnt: ''
blk: ''
dev: ''
fst: ''
fnm: ''
format location: ''
mountable: 0
backup method: 1
memory type: 0

I:special 3 information:
mnt: ''
blk: ''
dev: ''
fst: ''
fnm: ''
format location: ''
mountable: 0
backup method: 1
memory type: 0

Command: "/sbin/recovery"

ro.secure=0
ro.allow.mock.location=1
ro.debuggable=1
persist.sys.usb.config=mtp,adb
ro.build.id=IMM76L
ro.build.display.id=cm_a200-eng 4.0.4 IMM76L eng.nic.20120611.184517 test-keys
ro.build.version.incremental=eng.nic.20120611.184517
ro.build.version.sdk=15
ro.build.version.codename=REL
ro.build.version.release=4.0.4
ro.build.date=Mon Jun 11 18:45:38 CDT 2012
ro.build.date.utc=0
ro.build.type=eng
ro.build.user=nic
ro.build.host=nics-ubuntu
ro.build.tags=test-keys
ro.product.model=A200
ro.product.brand=Acer
ro.product.name=picasso_e
ro.product.device=a200
ro.product.board=picasso_e
ro.product.cpu.abi=armeabi-v7a
ro.product.cpu.abi2=armeabi
ro.product.manufacturer=Acer
ro.product.locale.language=en
ro.product.locale.region=US
ro.wifi.channels=
ro.board.platform=tegra
ro.build.product=a200
ro.build.description=picasso_e-user 4.0.3 IMM76D 000001586 release-keys
ro.build.fingerprint=acer/a200/picasso_e:4.0.33/IMM76D/000001586:user/release-keys
ro.build.characteristics=tablet
ro.cm.device=a200
ro.rommanager.developerid=cyanogenmod
keyguard.no_require_sim=true
ro.url.legal=http://www.google.com/intl/%s/mobile/android/basic/phone-legal.html
ro.url.legal.android_privacy=http://www.google.com/intl/%s/mobile/android/basic/privacy.html
ro.com.google.clientidbase=android-google
ro.com.android.wifi-watchlist=GoogleGuest
ro.setupwizard.enterprise_mode=1
ro.com.android.dateformat=MM-dd-yyyy
ro.com.android.dataroaming=false
ro.cm.version=9-20120611-UNOFFICIAL-a200
ro.modversion=9-20120611-UNOFFICIAL-a200
ro.config.ringtone=CyanTone.ogg
ro.config.notification_sound=CyanMessage.ogg
ro.config.alarm_alert=CyanAlarm.ogg
wifi.interface=wlan0
wifi.supplicant_scan_interval=15
ro.opengles.version=131072
dalvik.vm.heapstartsize=5m
dalvik.vm.heapgrowthlimit=48m
dalvik.vm.heapsize=256m
ro.dinfo.radio=Wifi
ro.kernel.android.checkjni=1
ro.setupwizard.mode=OPTIONAL
net.bt.name=Android
net.change=net.bt.name
dalvik.vm.stack-trace-file=/data/anr/traces.txt
ro.factorytest=0
ro.serialno=0a74424643ff9217
ro.bootmode=unknown
ro.baseband=unknown
ro.carrier=wifi-only
ro.bootloader=unknown
ro.hardware=picasso_e
ro.revision=0
ro.emmc=0
init.svc.recovery=running
service.adb.root=1
init.svc.adbd=running

E:failed to mount /data (No such file or directory)
E:failed to mount /data (No such file or directory)
E:Unable to mount /data
I:Attempt to load settings from settings file...
E:failed to mount /cache (No such file or directory)
E:Can't mount /cache/recovery/log
E:Can't open /cache/recovery/log
E:failed to mount /cache (No such file or directory)
E:Can't mount /cache/recovery/last_log
E:Can't open /cache/recovery/last_log
E:failed to mount /cache (No such file or directory)
W:Can't unlink /cache/recovery/command
I:Switching packages (TWRP)
I:Set page: 'advanced'
I:Set page: 'confirm_action'
I:Set page: 'action_page'
 

demkantor

Inactive Recognized Contributor
Nov 10, 2011
6,860
3,765
mpls
@jujuk
well it looks like you have some corrupt partitions which hopefully you can solve with
adb shell
mke2fs /dev/block/mmcblk0p4
mke2fs /dev/block/mmcblk0p8
reboot recovery

if this fails you i would use the tegra nvflash tool - this should work
if not its possible you have a fried emmc, but i have a good feeling about this
best of luck!
 
  • Like
Reactions: jujuk

jujuk

Member
Nov 7, 2013
12
0
@demkantor
@jujuk
well it looks like you have some corrupt partitions which hopefully you can solve with
adb shell
mke2fs /dev/block/mmcblk0p4
mke2fs /dev/block/mmcblk0p8
reboot recovery

if this fails you i would use the tegra nvflash tool - this should work
if not its possible you have a fried emmc, but i have a good feeling about this
best of luck!

C:\andro\sdk\platform-tools>adb shell
~ # ←[6nmke2fs /dev/block/mmcblkp4
mke2fs /dev/block/mmcblkp4
mke2fs 1.41.12 (17-May-2010)
Could not stat /dev/block/mmcblkp4 --- No such file or directory

The device apparently does not exist; did you specify it correctly?
~ # ←[6nmke2fs /dev/block/mmcblkp8
mke2fs /dev/block/mmcblkp8
mke2fs 1.41.12 (17-May-2010)
Could not stat /dev/block/mmcblkp8 --- No such file or directory

The device apparently does not exist; did you specify it correctly?
~ # ←[6n


i try nvflash..press res+power
and just blank,,what i must to do?? still confuse with my tab..:crying:

i got apx driver woks,,but asus transformer..
 
Last edited:

demkantor

Inactive Recognized Contributor
Nov 10, 2011
6,860
3,765
mpls
Unless someone has made a GUI for your tablet I believe all nvflash commands must be entered into cmd
When your in nvflash mode the proper drivers should install on PC then you need to open cmd like in fastboot and type in appropriate commands, see here
http://xdaforums.com/wiki/Talk:Nvflash

Sent from my Nexus 4 using XDA Premium 4 mobile app
 
  • Like
Reactions: jujuk

jujuk

Member
Nov 7, 2013
12
0
Unless someone has made a GUI for your tablet I believe all nvflash commands must be entered into cmd
When your in nvflash mode the proper drivers should install on PC then you need to open cmd like in fastboot and type in appropriate commands, see here
http://xdaforums.com/wiki/Talk:Nvflash

Sent from my Nexus 4 using XDA Premium 4 mobile app

@demkantor


oh my...
i did not understand that comand..:crying:

http://xdaforums.com/showthread.php?t=1927818

thanks for advice me..thank you very much..
i am really confuse now..hahaha
 

jujuk

Member
Nov 7, 2013
12
0
@demkantor

please tell me how to delete and repartition internal sdcard with nvflash..
i dont have any clue anymore..
i dont know to ask who??:crying:
 

demkantor

Inactive Recognized Contributor
Nov 10, 2011
6,860
3,765
mpls
@jujuk
The Acer.zip you have, if you extract the contents what is in there? Hopefully this will have the needed files for a full restore of stock firmware, but you'll have to link me the .zip or I can't tell
@Droxtor
Thanks! Let me know if you have any questions

Sent from my Nexus 4 using XDA Premium 4 mobile app
 

jujuk

Member
Nov 7, 2013
12
0
Last edited:

demkantor

Inactive Recognized Contributor
Nov 10, 2011
6,860
3,765
mpls
@jujuk
This may work but it doesn't contain all partitions, specifically you want to flash a new bootloader. But you could try just the partitions that are in there and it should work but you probably will have issues with cache and data and SD still without the extra partitions
Does Acer have full firmware package?

Sent from my Nexus 4 using XDA Premium 4 mobile app
 

jujuk

Member
Nov 7, 2013
12
0
@jujuk
This may work but it doesn't contain all partitions, specifically you want to flash a new bootloader. But you could try just the partitions that are in there and it should work but you probably will have issues with cache and data and SD still without the extra partitions
Does Acer have full firmware package?

Sent from my Nexus 4 using XDA Premium 4 mobile app

@demkantor

i dont know where i get full firmware package
 

demkantor

Inactive Recognized Contributor
Nov 10, 2011
6,860
3,765
mpls
I couldn't tell you either, but I would look at the manufactures website as you can often find a download there. Also search the popular forums or find people who seem knowledgeable and own the tablet, they may know where to look
But again you could try to just flash the partitions that your Acer.zip contains

Sent from my Nexus 4 using XDA Premium 4 mobile app
 

jujuk

Member
Nov 7, 2013
12
0
I couldn't tell you either, but I would look at the manufactures website as you can often find a download there. Also search the popular forums or find people who seem knowledgeable and own the tablet, they may know where to look
But again you could try to just flash the partitions that your Acer.zip contains

Sent from my Nexus 4 using XDA Premium 4 mobile app

i cant flash acer.zip with twrp coz cant mount sdcard,data
i cant flash using fastboot too..

C:\andro\sdk\platform-tools>fastboot update acer.zip
archive does not contain 'android-info.txt'
archive does not contain 'android-product.txt'
error: update package has no android-info.txt or android-product.txt

and i cant find system.img for do this command
fastboot system system.img
 

demkantor

Inactive Recognized Contributor
Nov 10, 2011
6,860
3,765
mpls
Yes we have already determined fastboot won't work for your situation, you need to extract the contents from Acer.zip and use nvflash to flash them to your device using the guide I linked you

Sent from my Nexus 4 using XDA Premium 4 mobile app
 

jujuk

Member
Nov 7, 2013
12
0
Yes we have already determined fastboot won't work for your situation, you need to extract the contents from Acer.zip and use nvflash to flash them to your device using the guide I linked you

Sent from my Nexus 4 using XDA Premium 4 mobile app

oh sir,, i am very bad in english..
i extract acer.zip and the content is
folder
CPS
EC
META-INF
recovery
system
boot.img
bootloader.blob
flexrom.img

i downloaded nvflash binnary from xda for asus transformer

then i copy extracted file to them..

i run
C:\andro\tf201_nvflashpack>nvflash --resume --download 4 bootloader.blob
Nvflash started
[resume mode]
just stuck at resume mode..i wait for an hour..

i try that from this forum
http://forum.frandroid.com/topic/143483-tuto-nvflash-tf201-ics-jb-bootloader/
 
Last edited:

demkantor

Inactive Recognized Contributor
Nov 10, 2011
6,860
3,765
mpls
oh sir,, i am very bad in english..
i extract acer.zip and the content is


i downloaded nvflash binnary from xda for asus transformer

then i copy extracted file to them..

i run

just stuck at resume mode..i wait for an hour..

i try that from this forum
http://forum.frandroid.com/topic/143483-tuto-nvflash-tf201-ics-jb-bootloader/

from the guide i linked you
--create
command usage:
Code:
nvflash --bct <bct> --setbct --configfile <cfg> --create --odmdata <N> --bl <bootloader> --go
used to do full initialization of the target device using the config file cfg start from creating all partitions, formatting them all, download images to their respective partitions and syncing bct at end
wherever you see <> replace this will file name
 

demkantor

Inactive Recognized Contributor
Nov 10, 2011
6,860
3,765
mpls
My phone is a HTC One SV- C525 and I'm currently using Windows XP SP3 32 bit! Thanks a lot

OK, then you need to download the fastboot binary as described in my post, either through the SDK or minimal fastboot/adb
Then make sure you have proper drivers for phone, often easiest way would direct from HTC website but I'm sure a quick search in device forum will turn these up
Now boot into bootloader mode and plug in phone to PC via USB
Open cmd and type
fastboot devices
If still nothing then try to cd into directory fastboot is located in (on PC) or add path in environmental variables
Let me know how this works

Sent from my Nexus 7 using Tapatalk 2
 
  • Like
Reactions: toldmango

toldmango

Member
Sep 8, 2013
27
5
OK, then you need to download the fastboot binary as described in my post, either through the SDK or minimal fastboot/adb
Then make sure you have proper drivers for phone, often easiest way would direct from HTC website but I'm sure a quick search in device forum will turn these up
Now boot into bootloader mode and plug in phone to PC via USB
Open cmd and type
fastboot devices
If still nothing then try to cd into directory fastboot is located in (on PC) or add path in environmental variables
Let me know how this works

Sent from my Nexus 7 using Tapatalk 2

I did what you said and the command is now working under fastboot into bootloader, I do have the serial number listed. Thank you so. But then I have another question. Now I type "adb devices" it just shows "list of attached devices" and nothing really listed while before it show up the serial number. Is that normal?..
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 178
    Introduction:
    I have found that many people are unaware how to use fastboot, which if you have ever owned an HTC phone or something from the Nexus line you know how important it can be.
    About a year ago I got sick of answering questions about fastboot so I made a guide, but it was device specific. Not too bad but I was constantly giving the links to it for other phones... of course more questions just popped up.
    So here i am making a comprehensive yet easy to follow (I hope) guide on how to set up and use fastboot. I will cover the basics for Windows and Liunx (sorry Apple users, just cant stand the product/company)

    I plan to make a series of guides for XDA-University Thus far there is this guide and:
    [Guide] How To Create Recovery Flashable .zips / update.zips

    First a short explanation:
    Fastboot, like ADB, is a tool to communicate from PC to Android phone. There are times when it is a must to use, and times when it is just helpful.
    ADB is used within your recovery or within your OS, but when you are in bootloader mode and need to communicate with your phone then you need fastboot.

    And you may ask why would i ever need this?
    Well many reasons. Main one is knowledge, learning the ins and outs of fastboot, like learning ADB, can get you out of many jams.
    And if you want to unlock your bootloader this is done through fastboot. Granted HTC's unlock is... well crap, but for a Nexus this is how its done.
    One other reason I have to stress is learning for safety reasons, This is about the safest way possible to flash firmware to your phone (ie Radio, Hboot, Recovery)

    Lastly you may want to know the limitations,
    There are many of course, this isnt JTAG, it will not resurrect a hard brick, but it often save peoples phones from 'soft bricks' and lots of time when know how and when to use it.
    Think of fastboot as the program that takes over when ADB cant be used, it works with firmware more than software.

    So where do i get fastboot? There are a few ways but most often I would recommend getting it from the Android SDK as it is will be up to date.
    or you can use THIS HANDY TOOL created by @shimp208

    I will go over the Download and Installation Process in the Next Post
    Then i will go over useful commands.
    *Just a note, This guide is to always be considered under construction as I plan to continue to make additions such as more commands and pictures
    I will continue to attempt to clarifiy when needed and add what I have missed. I have yet to drop any project or guide I have made on XDA and will help where I can
    As always I encourage questions I may miss something or be vague, it is best to understand fully then not ask.
    85
    Setting up fastboot on Windows and Linux

    What is Fastboot?
    Fastboot is a protocol designed to flash signed/unsigned partitions to android phones directly into the phones flash memory. If you are familiar with ADB think of it in the same way.
    If you're not, just understand it is a tool designed to help flash images such as recoveries, bootloaders, kernels, etc. to your android phone. For the most part you can not use much of fastboot unless you are rooted and have an engineering SPL (Hboot/Bootloader)
    If using a Nexus device you in a sense have an engineering bootloader already so don't need to worry about it like HTC folks need. But Some Nexus lines will have different bootloaders with different capabilities.
    This however is not a tutorial to root your phone so i will not explain this. I will though go over SOME basics as in unlocking your bootloader to allow it to be rooted.
    How do I get fastboot for Windows?

    Fastboot.exe can be downloaded to your computer from Google's SDK found
    HERE download the proper package depending on what system you are using.
    also
    you will need the proper drivers to allow your PC and phone to communicate. You will find these in your devices specific forum or possibly you can use PdaNet


    Okay i got it, whats next?
    After you downloaded the SDK package to your PC see where it is located, somewhere like this for Windows
    C:\android\android-sdk-windows\platform-tools
    Of course put it where you like, just know where fastboot.exe lies

    *If you want to skip the SDK, you can get ADB and Fastboot by themselves with THIS HANDY LITTLE TOOL created by shimp208
    Note: After you have ADB and Fastboot you will may want to finish following this guide to add a path in environmental variables.


    For Windows:
    Although not necessary, but to make it easier i really suggest doing these steps:
    left click the Windows (start) button > right click on computer > choose properties > go to advanced system settings > advanced tab > environmental variables > in the first box (user variables for _____) click new > name it
    > the value is the path from earlier
    C:\android\android-sdk-windows\platform-tools
    (yours may differ from this so double check it!) > in the second box (system variables) find a variable named
    if one doesn't exist make one > double click on it > at the very end of the variable value add the same line as before but with a ; in front of it. like this:
    ;C:\android\android-sdk-windows\platform-tools
    alright click ok and you are done!
    EnviromentalVariables.jpg


    Why did I just do all that?
    Well this allows you to open a command line from anywhere on your computer without changing directories to use fastboot. Pretty much we told your PC that when you type
    or
    into CMD where to find it. As you learn how useful fastboot and adb are this will help a lot as CDing to where you want to be is wasted time.

    So I still don't know what to do or how to do it!
    All right lets start simple, click the windows button and in the search field type
    you will notice a window pop up that looks suspiciously like DOS. View attachment 1980110
    Here you will see a blinking cursor after your directory, lets try this type
    Code:
    fastboot
    a whole bunch of probably unfamiliar stuff should now pop up View attachment 1386065 (for the most part this is a list of commands that can be used in fastboot) if you get something like
    fastboot is not recognized as internal or external command operable program or batch file
    then we need to troubleshoot, but for now i will assume it worked.
    Now try typing
    Code:
    fastboot devices
    ...and nothing will happen, Why? because there isn't a device attached. Make sure you have android debugging turned on in your phone (not really needed for fastboot but you do need for ADB), plug it into your computer and boot into fastboot mode. On many phones hold volume down while powering on, if this wont bring you to bootloader mode then see your device specific forum, if needed choose fastboot. Again try typing
    Code:
    fastboot devices
    this time you should have a list of attached devices, this is displayed as the serial number to each. Being many commands will "do" things to your phone try typing
    Code:
    fastboot reboot
    If your phone is now back and running your existing OS, congratulations! :good: You now at least have fastboot set up and working properly. Now lets try a few things out and see why this can be so helpful!


    How do I get fastboot for Linux?

    To get fastboot installed on your Linux box first download appropriate SDK package From Here
    *Not all Linux distros are the same and I don't consider myself a Linux guru, I will explain what I know about the few distributions I've used but remember if something don't work look up specifics for yours HERE
    After SDK is downloaded extract contents into home folder, maybe in a folder called Android, your choice.
    Now we need to make sure we have the latest java JDK installed found HERE or if you prefer you can get it from the terminal
    Code:
    sudo apt-get update
    sudo apt-get install openjdk-6-jdk
    or if using Ubuntu, the software center. (I have heard people complain about JDK7 so to be safe stick with JDK 6 for now)
    **I have a 64bit machine so I needed the 32bit libraries, you may not need this. If you do run this from terminal
    Code:
    sudo apt-get install ia32-libs
    **As pointed out to me by trevd, if you are using Ubuntu 12.10 or newer you should simply open a terminal and run these two commands
    Code:
    sudo apt-get install android-tools-fastboot
    and
    Code:
    sudo apt-get install android-tools-fastboot
    If you never plan on developing for android or using other tools that come with the SDK
    then this should be all you need. And you may also skip the JDK install. As most people will never attempt to create
    an app or ROM or mod their phone in a way that they would need more than this, these simple commands should suffice.


    Downloading Fastboot
    ummm.. isn't that what I just did? Possibly, but as far as I know ADB, fastboot and everything else in platform-tools wont automatically download with the SDK.
    Other have told me it does, so feel free to navigate to the platform-tools folder and see if you see these applications.
    If you skipped installing the SDK and just installed fastboot and ADB from the command line you can skip down to creating a path. So if you got them, skip this, if you don't, do this:
    From in a terminal type
    Code:
    cd ~/android-sdk-linux/tools
    ./android
    **note depending on what you named the folder the downloaded and extracted SDK is in you may need to change your cd command to something else.
    Now a new window will pop up, Click on "Available Packages" and you will be see two boxes. One is Android Repository and the other is Third-party Add-ons.
    Click on "Android Repository" then click on Install Selected. now click on "Accept All" and then click on the Install button.
    Personally I like downloading all that is possible here, you may have limited space or bandwidth so all you 'need' is the contents of platform-tools.
    If you want to download some API's later go for it, they aren't needed unless you are developing.


    Adding a Path
    Just like in windows changing directories can be brutally annoying so lets add a path. Open a Terminal and type:
    Code:
    nano ~/.bashrc
    or you can use gedit, whatever you have/like to use (sudo gedit ~/.bashrc)
    At the end of this text (or at the begining add the following
    Code:
    Android tools
    export PATH=~/android-sdk-linux/platform-tools:~/android-sdk-linux/tools:$PATH
    **again be sure this is your path (neat trick, find fastboot from within platform-tools, right click on it, go to properties, highlight the location/path and copy/paste this)
    Now click save, this will make so you no longer need to type ./adb all the time
    I have been told a reboot is needed here but I don't think so, just type this into a command line:
    Code:
    source ~/.bashrc


    Drivers? I don't need no stinking drivers!
    True, sorta, but more than likely we will need to add the android rules so your device can communicate with PC. Open a Terminal and Type
    Code:
    gksudo gedit /etc/udev/rules.d/51-android.rules
    now add the following lines:
    Code:
    SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="0502", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="1004", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="22b8", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="0fce", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="0489", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", SYMLINK+="android_adb", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8", MODE="0666", GROUP="plugdev"
    Depending on your device this should be all you need and then some, feel free to check out THIS for the most up to date vendor list.
    View attachment 1980099
    Now for a test!
    So plug your phone into PC via usb, have it in fastboot mode (from within bootloader) and open a new terminal, type:
    Code:
    fastboot devices
    If you see a string of #s and letters then success! :good: you are ready to learn the ins and outs of fastboot!
    69
    Using Fastboot To Unlock Your Bootloader

    Do You need to unlock your bootloader?
    For many phones this is necessary to root, for others it is a poor way to root your phone as you may not have full access.
    Many HTC model phones can be rooted with various exploits, sometimes removing the radio secure flags completely.
    If you have one of these devices than I recommend this, as true radio s-off is far superior to an unlocked bootloader.
    But other phones, including the Nexus line, will be fine just unlocking and do not need to worry, Although some phones like the Nexus One can profit from a new bootloader altogether.
    To begin the rooting process you simply need to unlock your bootloader with this command from a terminal/CMD
    Code:
    fastboot oem unlock
    and the reverse of course is
    Code:
    fastboot oem lock

    Be prepared for a full wipe of your phone when unlocking the bootloader!

    But quickly if you have an HTC and choose to unlock your bootloader to root your phone follow these step:
    Select your phone from the list HERE (you will need to create a log in)
    there will be some legal mumbojumbo to click through (just saying you void your warranty but you knew this!)
    you may need HTC sync found HERE as well as the proper RUU for your phone, the HTCDev site will inform you.
    After which the site will move you through the steps to gain fastboot access, but if you followed my guide above just skip it all.
    next you will need to get the identifier token, this is unique to your device and really just getting probably voids your warranty,
    even if you stopped the guide here. to do so, open terminal/CMD and type
    Code:
    fastboot oem get_identifier_token
    copy and paste this information into the prompt at the bottom of the page. Now wait for an email to get your token....
    once you get the email with the token you can now follow their steps to unlock your bootloader...
    really if at all possible i recommend not to do this method of rooting. But if you do, follow these same next steps that the Nexus devices will be doing...


    Now that your bootloader is unlocked:
    We will flash a custom recovery to your phone, then a custom already rooted ROM. To flash the recovery go to your device specific forum HERE and find the developers section.
    Look for a custom recovery option and consider reading up on it there.
    Different Android phones will have different custom recovery options depending on the developers for it. The most common is ClockworkMod, there are both touch and none touch recovery options.
    some others are TWRP, 4EXT, AmonRa and Cannibal. Find out what your options are, pick one and download it.
    If possible check the MD5Sum, Windows use: THIS and Linux use a terminal and type
    Code:
    md5sum <filename>
    of course replace <filename> with the file name.
    View attachment 1980095
    If you prefer, GTK Hash is a nice program as well.
    Now this should be an image not a zip, so if the extension is .img your good, if its in a .zip or .jar or whatever extract the image.
    Take this image and (for simplistic sake) name it
    **if using windows be sure to pay attention if your file extensions are hidden, don't name it recovery.img.img!
    So be sure your phone is in fastboot mode and connected to PC, open a terminal/cmd in the same location that recovery.img is in
    (cd to that directory or windows users can hold shift > right click in the folder it's in > choose open command here)
    Code:
    fastboot erase recovery
    fastboot flash recovery recovery.img
    **erase recovery is not necessary but i am OCD about wiping...
    now if you get an okay! then your good :good:
    Code:
    sending 'recovery' (4930 KB)...
    OKAY [  0.521s]
    writing 'recovery'...
    OKAY [  0.489s]
    finished. total time: 1.10s
    If not let me know what the output is and ill help you fix it. (I will also make a troubleshooting section in my final post)

    Great! Now Let's Flash a ROM
    In that same developers section for your phone, you should pick out a ROM of your licking. If possible i would suggest an older version of CyanogeMod as these builds tend to be quite stable.
    Also some phones may have newer ROMs requiring you to do various things to your phone. Such as changing radios or bootloaders or other things we haven't gotten to yet.
    So for now try to read the OP of the ROM you like and make sure you meet all requirements.
    So Im not going deep into how to flash a ROM from recovery as this is not part of a fastboot guide.
    But pretty much just pick a ROM and anything else you may need (gapps, kernel, etc) and put on root of SDcard (no other folder)
    Then boot to recovery, wipe all you can (I'll teach you fastboot wiping soon!) and then flash ROM + whatever else you need to and then reboot.

    Another Issue With HTC's Unlocked Bootloaders
    Well if this not yet another reason to try to gain true radio s-off for your phone...
    From with in that ROM that you flashed you also need to unzip and extract the kernel (boot.img) this will need to be flashed through fastboot.
    Once all the above steps are completed reboot into fastboot mode, if your recovery doesn't have a quick way to do so just open a terminal/cmd and type:
    Code:
    adb reboot-bootloader
    from here you will need to then open a terminal/cmd in the same location as that boot.img is and type:
    Code:
    fastboot flash boot boot.img
    If it says okay you are finally done!!! Well done with flashing your first ROM but can you flash a ROM in fastboot? I mean do you need recovery at all?
    There are ways, and ill teach ya in the next post!
    55
    Flashing a ROM through Fastboot

    So Why Do I Need To Do This?
    You don't, normally you would flash a ROM through recovery, but why not have another way? Maybe your recovery partition on your phone is corrupt?
    Maybe you just want to say "I learned something new!" whatever your reason here are the simple steps:

    To start:
    We need to download the ROM of choice to your computer. Once complete find the folder that ROM is in and open terminal/cmd to that directory
    (quickest way for windows; just hold shift and right click within that folder > open command window here) of course make sure your phone is plugged into computer and in fastboot mode.

    Lets see how quick and easy this really is...
    In the command line type:
    Code:
    fastboot devices
    Seeing your serial number means we know all is good
    Now lets type these commands:
    Code:
    fastboot erase system -w
    fastboot erase boot
    fastboot update superawesomerom.zip
    Of course replace <superawesomerom.zip> with the correct file name

    and last but not least:
    Code:
    fastboot reboot

    *Its been a little while since i did this but the phone might automatically reboot after flash so no need to run the reboot command

    As your phone boots into the new ROM, pat yourself on the back...

    A Note on Erasing/Formatting
    You may have noticed earlier that I had you erase your recovery before flashing a new one,
    now here I had you erase system and boot, you may be wondering why.
    I find that a large amount of complaints in developer threads are due to people not properly wiping before a flash.
    Of course there is times when a 'dirty' flash is fine, but if you're ever not sure, wipe as cleanly as possible.
    fastboot allows for about the cleanest of wipes by the way. And each partition can be done separately too.
    Code:
    fastboot erase system
    fastboot erase data
    fastboot erase cache
    can all be done individually, but to do these all in one command
    Code:
    fastboot erase system -w
    If possible I recommend to do these steps before flashing a ROM, and now that you know you can do this all within fastboot mode i suggest to try it out, its quick and painless!
    Don't forget to wipe your kernel too! (fastboot erase boot)

    ~Important~ If your device uses an emulated SD card (as in no removable micro SD but an SD partition on phone)
    Then be careful wiping data/userdata as this will erase all contents of internal SD - you are forewarned!

    What about just flashing a single partition?
    Sure this can be done, hell you can restore a nandroid if you want!
    well first you need to make a nandroid back up (unfortunately fastboot cant make a nandroid for you :crying: ) Put it some where on your computer.
    Personally I only keep maybe 2 or 3 nandroids on my phone's SD card as why waste space. I do however keep almost all my nandroids on my computer separated into different folders for different phones. So my path to a nandroid backup would be something like:
    android/htcg2/nandroids/<nameofnandroid>
    But here's the catch, most newer recoveries do tar backups I believe TWRP uses .win, these can not be flashed in their current form!
    However most older recoveries use yaffs2 format for their backups, these will always work. Pretty much if you get a backup with various partitions as .img you're good to go!
    **Hypothetically speaking here: you installed a new recovery and want to flash a nandroid made in old recovery but the two recoveries used different formats...
    Well you can flash the images with fastboot, then make a new nandroid and you got them back!
    ...Maybe I'm stretching... oh well, here's how to!

    Now the obvious stuff:
    Have phone plugged into PC via USB and in fastboot mode, open terminal/cmd and change directories to that folder where your nandroid is in (or again just hold shift and right click > open command window here if using windows)
    Now in terminal/cmd type:

    Code:
    fastboot devices
    all is good when serial number is displayed, now type:
    Code:
    fastboot erase system -w
    fastboot erase boot
    *This isn't 100% necessary but I'm a firm believer in wiping before any flash, even a backup
    Code:
    fastboot flash userdata data.img
    fastboot flash system system.img
    fastboot flash boot boot.img
    fastboot reboot
    (of course change the image names if needed)
    And you did it! :good: now you are almost a pro at using fastboot!
    keep playing around, you'll get the hang of it and will quickly see that this is one of the best tools in the Android SDK.
    It makes things much faster and easier and in many cases safer than the alternatives. Any questions... feel free to ask!
    Happy Flashing!
    44
    What About Flashing Firmware?

    Flashing any firmware to your phone can be dangerous but if possible the best and safest way is with fastboot.
    Hypothetically you flash a new Hboot through recovery and this Hboot was corrupt in some way, if the flash takes you will have a bricked phone, hard bricked, only JTAG can bring it back.
    But with fastboot you get to input your command to terminal/cmd an see the output, if something goes wrong, just DO NOT REBOOT until you fix the problem.
    And again, checking MD5sums is nice when flashing software but a must when flashing firmware.
    I will again recommend THIS for windows and using the terminal for Linux

    Okay, Time To flash A New Bootloader!
    Some phones will not allow bootloader flashes unless you remove the radio secure flags, if you have a phone like this check the developers thread for a how to.
    To begin, find the appropriate bootloader (sometimes referred to as an Hboot or SPL) for your phone,
    Now download and check MD5sum, have your phone in fastboot mode and open a terminal/cmd in the location your Hboot.img is stored.
    Code:
    fastboot devices
    fastboot flash hboot hboot.img
    and of course replace 'hboot.img' with whatever you titled your image
    **Do not reboot if you see 'sending.... failed' need to see the 'okay!'
    I am not trying to scare you as these instances are so rare, but knowing what to do ahead of time is just common sense.

    Not all devices use the same terminology for partitions, so if the above does not work than consider changing to this command:
    Code:
    fastboot flash bootloader bootloader.img
    Again replacing <bootloader.img> with the name of your image

    Now flashing a new bootloader will more than likely repartition your phone, so from here you probably should flash a new recovery, then flash a new ROM.
    Be prepared to do all this before flashing a new Hboot!

    I'm ready to flash a new radio!
    Flashing a radio can also be dangerous, but again the safest way to do so is within fastboot. So if possible always flash radios in fastboot mode!
    **I am not referring to the FM radio in your car, rather your cellular Radio, you know where you get reception... don't ask me how to add a FM radio to your phone!
    Also know OEMs commonly use baseband and radio as interchangeable terms, for the most part this is the exact same thing

    First things first, know why you are flashing a new Radio. Is it because you have poor reception? Poor data speeds? Poor battery life?
    Yes a new radio can cure all this, but NO ONE can tell you which radio is best for your phone, not even someone living in the same city.
    The best radio for my phone will not for sure be the best for yours, even if you live down the road from me. Don't ask what Radio is best! and only flash a radio meant for your device!

    Now that that's out of the way, lets do the same steps as before:
    Download appropriate radio
    Extract if needed (should be in .img format)
    For simplistic sake name it 'radio.img'
    Plug in phone to PC and open a terminal/cmd in the same location as your radio.img
    Code:
    fastboot devices
    fastboot flash radio radio.img
    fastboot reboot-bootloader
    Again only reboot if all goes well (It will if you follow all direction)
    Upon rebooting your bootloader you will notice your radio version has changed, congrats! You're becoming a pro! :D

    *note, occasionally OEMs package another image called rcdata.img along with a firmware release, if they do I also recommend to flash this along with the radio
    Code:
    fastboot flash rcdata rcdata.img
    **another note, if possible try to match the ril libraries between your ROM and radio, this is device specific and you will need to see your developers thread for this info.
    It is not always possible or necessary to do so, but many do say it help quite a lot
    Flashing a Kernel
    Earlier I went over flashing kernels as part of HTC Unlocked Bootloader Flashing, the process is the same for anyone else as well.
    Locate the Kernel you want to flash
    navigate to the folder it is in (should be in .img format and lets name it boot.img)
    Code:
    fastboot flash boot boot.img

    But lets say you are a developer and have worked on a new kernel for your device, a quick and easy way to test it out may be to fastboot load the kernel:
    Code:
    fastboot erase boot
    fastboot boot kernel ramdisk
    As usual replace file/image names accordingly
    If you do not want to erase the current kernel, just skip erasing.
    But I would just have a working kernel.img handy and erase, this way I know there are no residual effects from previous kernel - choice is yours

    Code:
    fastboot flash:raw boot kernel ramdisk 
    fastboot reboot
    Test it out and see how things go! Good luck! :good:

    As always, if you have questions or comments feel free to leave them here!
    Happy Flashing!